Replies: 1 comment 2 replies
-
@ManuWeb3 Can you leave a timestamp? |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
Hey all,
1).
What exactly is the purpose of
const proxyBoxV1 = await ethers.getContractAt("Box", transparentProxy.address)
in the below script ?And, again when this syntax was used for the second time for
getContractAt(BoxV2, transparentProxy.address)
.I know we use
getContractAt()
to return Promise(Contract) for which we input the ABI and the contract_address.How can we load BoxV2's ABI at
transparentProxy.address
and what we're trying to achieve with that ?I'm not able to understand what Patrick meant by the following:
"to work with the functions of BoxV2.sol, we're gonna give BoxV2.sol's ABI. However, we're gonna load it at transparentProxy.address"
upgrade-box.js
=====================
2).
How can we use
transparentProxy.address
as the first input parameter in theupgrade()
?const upgradeTx = await boxProxyAdmin.upgrade(transparentProxy.address, boxV2.address)
I checked the syntax of
upgrade()
inProxyAdmin.sol
(below) and it takesTransparentUpgradeableProxy proxy
as the argument which is a deployed instance (proxy
) ofTransparentUpgradeableProxy
Smart Contract.whereas we passed its address and Not the deployed instance and still it worked.
How ?
Syntax of upgrade()
=======================
Beta Was this translation helpful? Give feedback.
All reactions