Exposes the merkle proof logic from Open Zeppelin 5.x to rainlang as a single
subparsed word merkle-proof-verify, and carries the deterministic deploy
record of the concrete MerkleWords subparser/extern.
The usage is as per the
Open Zeppelin documentation,
where the first argument to merkle-proof-verify is the root, the second is the
leaf and the tail is the proof.
As merkle proofs have a length that depends on the size of the merkle tree the proof is for, the rainlang word is variadic. The whole tail is used as the proof but must be at least length 1.
Note that the merkle-proof-verify word returns 0 or 1 where 1 indicates
that the proof is valid. The rainlang author is responsible for applying
ensure to the return value to revert the transaction on invalid proofs if that
is the desired behaviour.
Follows the rain.deploy
standard:
src/abstract/MerkleWordsDeploySuites.soldeclares themerkle-wordscandidate and the released suites read from the generatedLibReleasedSuites.script/Build.solregenerates, from one compile, the rolling snapshotsrc/generated/candidate/MerkleWords.sol(Zoltu address, codehash, creation and runtime bytecode, dependencies), its alias libsrc/lib/LibMerkleWordsDeploy.sol, and the parse meta and function pointers insrc/generated/MerkleWordsPointers.sol.script/build-meta.shregenerates the proof fixtures andmeta/MerkleWords.rain.meta, whose hash the pointers carry.
Deploy first, by dispatching Manual sol artifacts for the merkle-words
suite. Then release rain-merkle-deploy with a manual sol-v* tag; tagging
never broadcasts.