Is it possible to call functions from contracts within a migration? I try to interact with a contract that has already been deployed by another migration, but truffle doesn't recognize that this function exists within the contract! If migrations can't call contract functions, how do I interact with the contract without using truffle develop?
My migration: enter image description here
Truffle:
Try This:
let myNewContract = await MyNewContract.at((await MyOldContract.deployed()).address);
That will create an object using your new logic contract that is located at the address of your proxy (the permanent address).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.