Looked at multiple answer for this question but they seem to be out of date.
I committed a contract to the testnet chain, closed my geth console and upon starting the console again would like to redeploy contract. I know that I have to load the .abi file in and then instantiate a new local contract, but I keep getting an error. Below is code:
loadScript(Token.abi); \\ script assigning abi string to variable 'Token'
var myContract = eth.contract(Token); \\ works fine
var myContractInstance = myContract.at('0x808eca33fef859f9aa54c24780962b0519e274b8') \\ here the error is returned
The error given is
TypeError: 'filter is not a function'
I don't see the .at() function anywhere in the documentation so I assume it is deprecated? Any ideas?
EDIT:
I did find the .at() function on the api wiki, but for some reason it does not seem to work.
eth.contract(JSON.parse(abiDefinition)). See https://ethereum.stackexchange.com/questions/16798/web3-uncaught-typeerror-contract-abi-filter-is-not-a-function for more details. – Ismael Sep 29 '17 at 05:01eth.contract(Token)instead ofeth.contract(Token.abi). Just the error doesn't trigger immediately, only when the it is used inmyContract.at('xxxx'). – Ismael Sep 30 '17 at 03:17