Skip to main content
added 99 characters in body
Source Link

Turned out that the issue was with the way I had deployed the contract using Truffle. Basically Proxy contract's constructor took the address of ERCToken as an input. So Truffle's deployed method resolved correctly only for the main contract (ERCToken) and never for Proxy.

I had to refactor the constructor code by adding separate function to set the ERCToken address and then deployed the two contracts separately. This resulted in both ERCToken.deployed() and Proxy.deployed() resolving correctly.

Completed async/await code available here: https://github.com/zincoshine/solidity-proxy-example

Turned out that the issue was with the way I had deployed the contract using Truffle. Basically Proxy contract's constructor took the address of ERCToken as an input. So Truffle's deployed method resolved correctly only for the main contract (ERCToken) and never for Proxy.

I had to refactor the constructor code by adding separate function to set the ERCToken address and then deployed the two contracts separately. This resulted in both ERCToken.deployed() and Proxy.deployed() resolving correctly.

Turned out that the issue was with the way I had deployed the contract using Truffle. Basically Proxy contract's constructor took the address of ERCToken as an input. So Truffle's deployed method resolved correctly only for the main contract (ERCToken) and never for Proxy.

I had to refactor the constructor code by adding separate function to set the ERCToken address and then deployed the two contracts separately. This resulted in both ERCToken.deployed() and Proxy.deployed() resolving correctly.

Completed async/await code available here: https://github.com/zincoshine/solidity-proxy-example

Source Link

Turned out that the issue was with the way I had deployed the contract using Truffle. Basically Proxy contract's constructor took the address of ERCToken as an input. So Truffle's deployed method resolved correctly only for the main contract (ERCToken) and never for Proxy.

I had to refactor the constructor code by adding separate function to set the ERCToken address and then deployed the two contracts separately. This resulted in both ERCToken.deployed() and Proxy.deployed() resolving correctly.