Hot answers tagged

1

Change this: var testContract = contract(customerJson); To this: var testContract = contract({abi: customerJs.abi, unlinked_binary: ByteCode});


1

With web3.js v1.x, you can use this: const PARTIAL_ABI = [{ "anonymous": false, "inputs": [ {"indexed": true , "name": "from" , "type": "address"}, {"indexed": true , "name": "to" , "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}, ], "name": "Transfer", "type": "event", }]; async ...


1

Well, the error says it all. Your smart contract abi definition is not defined in the javascript. You can read more about abi definition here. And btw your code looks a bit of a mess. Replace the 3 definitions of the contract inferfaces: var ApprovalContract = web3.eth.contract(abi).at(contractAddress); var ApprovalContract = new web3.eth.Contract(abi, ...


1

IIRC, solc 0.5.17 is pre-Byzantium and you need to transition to 0.5.2? (not 100% sure which one). Perhaps a kind soul will chime in with the exact version cutoff or else check the release notes for the first release with Byzantium support. You can instruct truffle to use a specific solc version truffle-config.json. You may have to refactor the contract ...


1

Turns out the answer is the format of the string being given to ruby's SHA3 implementation: '0x' + Digest::SHA3.new(256).hexdigest("\xff") will give the same output as: web3.utils.sha3('0xff');


Only top voted, non community-wiki answers of a minimum length are eligible