fetching the logic contracts of the icon-bridge proxy contracts (BTSCore) on ethereum-like chains #616
FidelVe
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to fetch the logic contract address of the icon-bridge proxy contracts on the ethereum-type chains.
According to the eip-1967 standard for proxy contracts the address of the logic contract is to be stored in the storage slot "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" which is the result of the following hash
bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
Following this standard if a developers wants to fetch the logic contract using web3.js they should do the following:
The result of this query is the following:
Undo the 0 padding to obtain the contract address
0xe020d4ad483c7ec90a24d9db502e66564ef9c236
References:
Beta Was this translation helpful? Give feedback.
All reactions