1

I'm not sure why this doesn't work. I have the exact same pattern for addresses and it does fine.

bytes32[] public someStorage; function addToStorage(bytes32 someData) { someStorage.push(someData); } 

Then using web3:

instance.addToStorage("Some Data", {from: web3.eth.accounts[0], gas:1000000}) 

I get a tx address but in testrpc console I see a matching Runtime Error: Invalid Opcode and it always consumes the max gas that I set.

1 Answer 1

2

Looks like this is a result of truffle not updating the contract artifacts in the build folder.

I've had a couple gotcha's like this and found that compiling with truffle migrate --reset can help

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.