So I have got further with the tutorial for creating and deploying an upgradeable contract. As per the tutorial (https://docs.zeppelinos.org/docs/upgrading.html) I have managed to deploy the initial contract, add the new increment function and all looks good. However when I try and add a new state variable and initialization function (initializeT) then I get the following errors when trying to access the variable from the truffle console:
truffle(development)> mc = await MyContract.at('0x66eB4e0368B726d4737fFaa9a3d16AE225F06493') undefined truffle(development)> mc.s() 'hitchiker' truffle(development)> (await mc.x()).toString() '44' truffle(development)> (await mc.t()).toString() Error: Invalid number of parameters for "t". Got 0 expected 2!
The contract was upgraded as follows:
rick@archlinux ~/dev/zos npx zos update MyContract --init initializeT --args 99
Using session with network development, sender address 0xED609586F5bE1ADc8d3f9f5a7cEA8Dab45a42A53, timeout 600 seconds
Upgrading proxy to logic contract 0x3203620c4aF995FB247C001885708ebf77E45d45 and initializing by calling initializeT with:
- _t (uint256): “99”
Upgrading proxy at 0x66eB4e0368B726d4737fFaa9a3d16AE225F06493 and calling initializeT with:
- _t (uint256): “99”…
TX receipt received: 0x9b834a4431be17d3772f0da6de215544fe3def1c407630db6b3bfbcf43979309
Instance at 0x66eB4e0368B726d4737fFaa9a3d16AE225F06493 upgraded
Any ideas where I am going wrong here?