New answers tagged

1

Solved rolling back open zeppelin to 2.5.1 and using pragma 0.5.0, drizzle may have some incompatibility issues with the last open zeppelin version


1

I forgot to specify in the call method the account from I was sending the transaction from. checkAccount = async () => { const accounts = await web3.eth.getAccounts(); const data = await tacosavings.methods.getAccount().call({ from: accounts[0] }); const { 0: money, 1: timeLeft } = data; this.setState({ message: `Your ...


2

if I finish following the tutorial and build a signed TXN with these wrong R+S values, the txn works This seems to suggest the signing by secp256k1.ecdsaSign is correct, but just not deterministic, i.e. it changes every time you sign, even with the same key and data. Notice the tutorial uses private_key.sign_deterministic, so, to produce the same result, ...


0

In case someone stumbles upon this, here is what i did to solve the issue. I made every name unique for each "form section" (unique header, form names, id...) and then referenced those. Some of the id's were not unique. I also used # to reference id's. <!DOCTYPE html> <html lang="en"> <body> <h4 id="candidateName"></...


0

This seem to have been entirely a problem with Infura. I suspect it is in regard to their rate limits. Nevertheless we have now set up our own ethereum node using geth and are able to isssue as many transactions as we want pretty much problem free!


0

Function web3.eth.getTransactionCount returns a promise, which you need to resolve. Hence you are using this function incorrectly here: "nonce": web3.utils.toHex(web3.eth.getTransactionCount(account1))


1

A truffle-contract object, which represents the DToken contract deployed on the network. This object exposes all the public and external functions of the DToken contract.


1

Your syntax (web3.eth.contract with a lower-case c) implies that you're using web3.js v0.x. However, web3.eth.defaultChain is supported only starting from web3.js v1.x.


0

Using only BN.js let num = -1234; let bytes32 = "0x"+(new BN(String(num))).toTwos(256).toString('hex',64); Using web3.js let num = -1234; let bytes32 = web3.eth.abi.encodeParameter('int256', String(num)); This is working in smart-contract like this: pragma solidity ^0.5.0; contract TestConversion { int256 val; function set(bytes32 _val) public { ...


1

It is same as a get call that you make with a function written in the smart contract using api like web3. You will have to write a function to return the details when RFID card number is passed as an argument to the function.


0

The right way to do this via web3 + java: //Check if the object is definied if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } //Init my constant const ...


0

you have to shift the sending function to the main file which contains the myContract instance(where you deployed/assigned your contract which includes your abis).You can do that by assigning id to tags on frontend .You better try REACTJS ,it will be useful.


Top 50 recent answers are included