web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

How use web3.js with "Read as Proxy" and "Write as Proxy"

Open max1404 opened this issue 3 years ago • 2 comments

hello developers,

i check the issues and the documentation - but but I couldn't find any information on how to use web3.js as "Read as Proxy" and "Write as Proxy" (EIP-1967) with a smartcontract on ethereum.

Am I just missing a buzzword for the search? Is it possible with Web3.js? If so, can someone drop a few lines of code?

Can I use the proxy contract including abi directly? without reference to the actual contract?

Thanks

max1404 avatar Aug 04 '22 12:08 max1404

I got the same problem too, have u solved it?

TurboTu avatar Aug 09 '22 13:08 TurboTu

I got some tips @max1404 https://ethereum.stackexchange.com/questions/103143/how-do-i-get-the-implementation-contract-address-from-the-proxy-contract-address

TurboTu avatar Aug 09 '22 13:08 TurboTu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Oct 09 '22 00:10 github-actions[bot]

@TurboTu Were you able to solve our problem? Do you have some code snippets for me? I couldn't do it. Thanks

max1404 avatar Oct 09 '22 12:10 max1404

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Dec 09 '22 01:12 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Feb 11 '23 00:02 github-actions[bot]

Hi there, please let us know if this is still an issue for you. As far as I'm aware, there's nothing in our documentation related to ERC-1967. With that said, if you're interested in interacting with the contract the proxy is pointing to, you'd need to get the address and the ABI of the implementation contract (the link shared above mentions how to get the address. Alternatively you could try looking up the proxy contract on a block explorer and see if the implementation contract address is available) in order to interact with it using web3.js

spacesailor24 avatar Mar 29 '23 05:03 spacesailor24

Hey @max1404, we are closing this issue and recommend upgrading to v4 production released a couple weeks ago.

https://docs.web3js.org/ https://docs.web3js.org/guides/web3_upgrade_guide/x/ https://www.npmjs.com/package/web3/v/4.0.1 https://github.com/web3/web3.js/releases/tag/v4.0.1

mconnelly8 avatar Jun 21 '23 17:06 mconnelly8