I have multiple instances of a contract and I am not able to access at the instances "older" than the last deployed one. With TruffleContract I have the
at(address) function that (slowly) retrieves the contract with address
I deploy 3 contracts "MyContract" c1, c2, c3, each one with a different storage variables. Then with TruffleContract I can call these functions:
const getContract = require('truffle-contract') const contractJSON = require('./MyContract.json') const contract = getContract(contractJSON) contract.setProvider(web3.currentProvider) const instance_c3 = await contract.deployed() // returns the last deployed, c3 const instance_c2 = await contract.at(address_c2) // retrieve c2
How does it work with Drizzle?