├── .env.example ├── .eslintignore ├── .eslintrc.json ├── .github └── workflows │ ├── ci.yaml │ ├── lint.yaml │ └── npm-publish.yml ├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── .solcover.js ├── .solhint.json ├── LICENSE ├── README.md ├── contracts ├── mocks │ ├── MockBinaryMerkleTree.sol │ ├── MockMerkleSumTree.sol │ └── MockSparseMerkleTree.sol └── tree │ ├── Constants.sol │ ├── Cryptography.sol │ ├── Utils.sol │ ├── binary │ ├── BinaryMerkleProof.sol │ ├── BinaryMerkleTree.sol │ ├── BinaryMerkleTreeUtils.sol │ ├── Branch.sol │ ├── Node.sol │ └── TreeHasher.sol │ ├── sparse │ ├── Branch.sol │ ├── Node.sol │ ├── Proofs.sol │ ├── SparseMerkleTree.sol │ └── TreeHasher.sol │ └── sum │ ├── SumMerkleProof.sol │ ├── SumMerkleTree.sol │ └── TreeHasher.sol ├── hardhat.config.ts ├── package.json ├── test ├── merkleTreeBinary.ts ├── merkleTreeSparse.ts ├── merkleTreeSum.ts ├── test_helpers │ ├── binaryMerkleTree.ts │ └── sumMerkleTree.ts ├── test_vectors │ └── binary_proofs │ │ ├── Test 0 Leaves.yaml │ │ ├── Test 1 Leaf Index 0.yaml │ │ ├── Test 1 Leaf Invalid Proof Index.yaml │ │ ├── Test 1 Leaf Invalid Root.yaml │ │ ├── Test 10 Leaves Index 4.yaml │ │ ├── Test 100 Leaves Index 10.yaml │ │ ├── Test 1024 Leaves Index 512.yaml │ │ └── Test 1024 Leaves Invalid Root.yaml └── utils │ ├── constants.ts │ ├── cryptography.ts │ ├── encodedValue.ts │ ├── proofTest.ts │ └── utils.ts └── tsconfig.json /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.env.example -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.eslintignore -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.github/workflows/ci.yaml -------------------------------------------------------------------------------- /.github/workflows/lint.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.github/workflows/lint.yaml -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.github/workflows/npm-publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.gitignore -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/fermium 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.prettierignore -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.prettierrc.json -------------------------------------------------------------------------------- /.solcover.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/.solhint.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/README.md -------------------------------------------------------------------------------- /contracts/mocks/MockBinaryMerkleTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/mocks/MockBinaryMerkleTree.sol -------------------------------------------------------------------------------- /contracts/mocks/MockMerkleSumTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/mocks/MockMerkleSumTree.sol -------------------------------------------------------------------------------- /contracts/mocks/MockSparseMerkleTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/mocks/MockSparseMerkleTree.sol -------------------------------------------------------------------------------- /contracts/tree/Constants.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/Constants.sol -------------------------------------------------------------------------------- /contracts/tree/Cryptography.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/Cryptography.sol -------------------------------------------------------------------------------- /contracts/tree/Utils.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/Utils.sol -------------------------------------------------------------------------------- /contracts/tree/binary/BinaryMerkleProof.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/BinaryMerkleProof.sol -------------------------------------------------------------------------------- /contracts/tree/binary/BinaryMerkleTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/BinaryMerkleTree.sol -------------------------------------------------------------------------------- /contracts/tree/binary/BinaryMerkleTreeUtils.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/BinaryMerkleTreeUtils.sol -------------------------------------------------------------------------------- /contracts/tree/binary/Branch.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/Branch.sol -------------------------------------------------------------------------------- /contracts/tree/binary/Node.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/Node.sol -------------------------------------------------------------------------------- /contracts/tree/binary/TreeHasher.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/binary/TreeHasher.sol -------------------------------------------------------------------------------- /contracts/tree/sparse/Branch.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sparse/Branch.sol -------------------------------------------------------------------------------- /contracts/tree/sparse/Node.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sparse/Node.sol -------------------------------------------------------------------------------- /contracts/tree/sparse/Proofs.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sparse/Proofs.sol -------------------------------------------------------------------------------- /contracts/tree/sparse/SparseMerkleTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sparse/SparseMerkleTree.sol -------------------------------------------------------------------------------- /contracts/tree/sparse/TreeHasher.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sparse/TreeHasher.sol -------------------------------------------------------------------------------- /contracts/tree/sum/SumMerkleProof.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sum/SumMerkleProof.sol -------------------------------------------------------------------------------- /contracts/tree/sum/SumMerkleTree.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sum/SumMerkleTree.sol -------------------------------------------------------------------------------- /contracts/tree/sum/TreeHasher.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/contracts/tree/sum/TreeHasher.sol -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/hardhat.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/package.json -------------------------------------------------------------------------------- /test/merkleTreeBinary.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/merkleTreeBinary.ts -------------------------------------------------------------------------------- /test/merkleTreeSparse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/merkleTreeSparse.ts -------------------------------------------------------------------------------- /test/merkleTreeSum.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/merkleTreeSum.ts -------------------------------------------------------------------------------- /test/test_helpers/binaryMerkleTree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_helpers/binaryMerkleTree.ts -------------------------------------------------------------------------------- /test/test_helpers/sumMerkleTree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_helpers/sumMerkleTree.ts -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 0 Leaves.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 0 Leaves.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 1 Leaf Index 0.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 1 Leaf Index 0.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 1 Leaf Invalid Proof Index.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 1 Leaf Invalid Proof Index.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 1 Leaf Invalid Root.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 1 Leaf Invalid Root.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 10 Leaves Index 4.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 10 Leaves Index 4.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 100 Leaves Index 10.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 100 Leaves Index 10.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 1024 Leaves Index 512.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 1024 Leaves Index 512.yaml -------------------------------------------------------------------------------- /test/test_vectors/binary_proofs/Test 1024 Leaves Invalid Root.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/test_vectors/binary_proofs/Test 1024 Leaves Invalid Root.yaml -------------------------------------------------------------------------------- /test/utils/constants.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/utils/constants.ts -------------------------------------------------------------------------------- /test/utils/cryptography.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/utils/cryptography.ts -------------------------------------------------------------------------------- /test/utils/encodedValue.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/utils/encodedValue.ts -------------------------------------------------------------------------------- /test/utils/proofTest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/utils/proofTest.ts -------------------------------------------------------------------------------- /test/utils/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/test/utils/utils.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FuelLabs/fuel-merkle-sol/HEAD/tsconfig.json --------------------------------------------------------------------------------