Skip to content

Merkle Proof API

Nithin Krishna edited this page Apr 22, 2021 · 5 revisions

API endpoint to retrieve merkle proof.

ETH_WALLET_ADDRESS = "0x...".toLowerCase()
`https://d2jx5y4b0ix99i.cloudfront.net/${ETH_WALLET_ADDRESS}.json`

# Response
r = {
   "rootNode":"0x54e9370868bb4d5e991c185b3df7c69435632ba359b165d50f2b2f1795312929",
   "leafNode":"0x811fb67ea96d4c5cfbda3814ade2cb25aab2549cf3a9096f623f1dbc5c59f1e2",
   "path":[
      "0x811ded561c5132bdfeb654c49014082eb644768a54f618f0cb485b93336380a4",
      "0xc1a4100d96f1d3d80580779b4ba79b2d1ef7f1d599faf968b6c3f29ee408e1f7",
      "0xb847c2e3619623a5aeb9dbca3ed195759f4076dcc1d0913121accea4359ee3af",
      "0xc8d9b0802d36d2864599e6309405384bc88859657906a12afca74f5a6be2ec2c",
      "0x0cea7de2d641a33838f6fa0637518ffb7bdfe511d8745cb88bb757d4c28e0525",
      "0x63bf726f60fd8107f86e94087e5dde5d008b002c58bb6540b397237bef16971f",
      "0x3be9eea7fa3ee86549a7a18f2827b3190710546d4d0ecb6b91196fe3e8ae50fe",
      "0x0115a1980d9ab6101fb92bad92e08c342c2500265fe14a7fded77ffad1932d8c",
      "0xc246883d72db9350c6adf3090f84ea36953eeaf6af8e978e05c63306e9cc7119",
      "0x5535191dfa451646090c026f442fe3d7fc1083f7ab5df6b671ab523e3890ea82",
      "0xd78d5501abb734c0cc53ec7e4454189b081d5dc3881849547bd2b557ad4151fe",
      "0x4bdc7e878506b844cae8ba9894cc4225e99e5debf1c740e0438e421b7b994d79",
      "0x4685b5cf09fef77d8eb85101baf2ff23e541e1a16dd4193519755371386231ac",
      "0x055ee26c97d14695fff3e86bd70cb285a56e63799caacd6d45c3ad80d8f48ab5",
      "0x300ad7daf76511c20e2ca4f874709334540f858d3154a8eaad028e250a8cea65",
      "0x63e6451cd0b3f7cc0b0cbee4a90c576aec1b73af9776c5209d7368950914abf8",
      "0x8125e1cc51cc1d2fa3f2b21d03d96fca7d4d9c2f02bd6fb24bc995a8daa5e36e"
   ],
   "leafData":{
      "index":"75659",
      "account":"0x000000000000000000000000000000000000dead",
      "amount":"2806247940634586200"
   }
}

Claiming with merkle proof

Claim contract: https://etherscan.io/address/0xF497b83CfBd31E7Ba1Ab646F3B50aE0aF52d03A1

* Check if the wallet has claimed: contract.isClaimed(r.leafData.index)
* Claim for wallet: contract.claim(r.leafData.index, r.leafData.account, r.leafData.amount, r.path)
Clone this wiki locally