Open gitpusha opened 4 years ago
This would be extremely useful, making interacting with arbitrary contracts way easier.
We shouldn't need more than the contract's ABI to pull this off. And if the source is verified on Etherscan, we could even pull it from there!
We should extend this with the possibility to pass a custom address for the contract as an argument, together with the appropriate ABI in build-folder in order to make CLI tools work with contract instances, that was created via Factory create method like in this example.
This would also allow interacting with minimal proxies created from the ProxyFactory. See post in the Community Forum: https://forum.openzeppelin.com/t/confusion-with-minimal-proxy-deployment-contract-missing/2329/3?u=abcoathup
@abcoathup I could try to resolve this issue. Is it still relevant?
Hi @kushkamisha,
Thanks for offering to contribute. ๐
The community can now deploy and test upgradeable contracts using OpenZeppelin Upgrades Plugins (https://docs.openzeppelin.com/upgrades-plugins/1.x/) and then interact with deployed contracts using Buidler or Truffle console, so I am not sure if there is still a direct need for this, so I don't think it would be worth doing at this stage.
Hi @kushkamisha,
Thanks for offering to contribute. ๐
The community can now deploy and test upgradeable contracts using OpenZeppelin Upgrades Plugins (https://docs.openzeppelin.com/upgrades-plugins/1.x/) and then interact with deployed contracts using Buidler or Truffle console, so I am not sure if there is still a direct need for this, so I don't think it would be worth doing at this stage.
Okay, then I'll focus on something else๐
It would be sweet to have a
oz
CLI
command
that would let you fetchalready deployed
contract instances
that were not deployed by you viaoz create
.This
command
could be something likeoz fetch
which then let's you select thecontract interface
from thebuild
directory and then pass the<deployed instance address>
.This way I could use the
oz CLI
to interact with any deployed instances, not just the ones I myself deployed from my project.The
fetched
contracts
could then be listed under= Your Contracts = > My Contract
= Fetched Contracts = > Some Contract at address
when you hit
oz send-tx
.Maybe some advanced stuff would be to have some standard
contract interfaces
likeERC20
baked into theSDK
so that I have the option tooz fetch
ERC20
sat
address
without the need for me to include andoz compile
anIERC20
first, to have it available frombuild/
.