Hot answers tagged

14

We get these occasionally when we make a change to MyEtherWallet, and we don't use Solidity or web3. It's a JS thing in the BigNumber.js library that web3 also uses. Somewhere you have something that you think is a number but it's actually a string, null, array, object, or something else. This was some code for sending a signed TX via the offline tab. The ...


7

You can call the method directly as follows without sendTransaction: myContractInstance.depositFunds({from: web3.eth.accounts[0], gas: 3000000, value: 100}, function(err, res){});


6

The recent version of Mist (and Ethereum Wallet) will download the appropriate version of geth.exe (Windows) or geth (Linux or OS/X) and save it into the config directory. From Mist Browser: NOTE: client-binaries (e.g. geth) specified in clientBinaries.json will be checked during every startup and downloaded if out-of-date, binaries are stored in the config ...


6

There is so much competition in the JavaScript framework space and they are basically all good if you have good command of it ... I think MeteorJS is popular in this space not because it is better than React but because one important member of the Ethereum Foundation Fabian Vogelsteller (main contributor of the JavaScript library Web3) wrote several books ...


5

The knowledge of a public key (such as Ethereum addresses) should never be used as method of authentication. Public keys are meant to be shared, for instance to receive a payment in a cryptocurrency. If a client can just provide that address to autenticate, then everybody who knows the public address could impersonate the client. The following JavaScript ...


5

Since you are doing this on a test network, you can modify your genesis block to have a gas limit of 0x2fefd8 which is the same as the main network (3,141,592 gas). You will also need to reset that test chain since you'll be changing the genesis block.


5

In windows cmd: meteor add ethereum:web3@=0.18.3 Just add the previous version, worked for me.


4

Using $ meteor add ethereum:tools worked for me. As you may see below, it added web3. Thanks 3stack:bignumber added, version 2.0.0 amplify added, version 1.0.0 ethereum:tools added, version 0.6.0 ethereum:web3 added, version 0.15.3 frozeman:persistent-minimongo added, version 0.1.8 ...


3

Meteor and Truffle are two different frameworks. As you already experienced Meteor is a javascript framework to design single page web applications. Truffle can be used to devlop and test smart contracts which are written in Solidity. In order to test the smart contracts it is recommended to use testrpc. Testrpc simulates a blockchain wich runs on your ...


3

I also faced the similar issue, the possible reason could be, you are entering any parameter wrong. Please check if you are providing correct values of: Contract ABI Contract Address from (address) to (address) amount Take care of any typo. As in my case, I wrote form instead of from.


3

Can you run this in Geth console? > var source = "contract demo { string public name = 'Petros'; function changeName(string _newName){ name = _newName; }}"; > var compiled = web3.eth.compile.solidity(source); > web3.eth.compile.solidity(source, function(err, res) { console.log(JSON.stringify(res)); }); The ABI will be compiled.demo.info.abiDefinition. ...


3

Mix IDE is officially supported by Ethereum, and can be used with geth. But you could use either of them based on your preference. You could also take a look at some other Javascript IDEs, specially atom. As far as I know, Meteor+web3js is sufficient, and trying to use Truffle or Embark will only make it more confusing.


3

No you don't need meteor. But meteor is one of the best tools so yes ou can choose another one but I won't tell you to do so. Meteor is only a way to make client and server code more close to each other and it's a really nice way to share data even in offline mode. You really should have a deep look on it. The ethereum core library is not meteor. What you ...


3

The block gas limit of PI million can be encountered during deployment of some contracts. Here's a process that can help and try redeploying after each step. A quick-fix attempt is to use Solidity's --optimize flag. If further investigation is needed, try to see how much over the block gas limit your deployment is. Start with commenting out parts of the ...


3

I found my problem was that the metamask was on the wrong network


2

I'm building a similar system. Some data stored on the blockchain, some stored in a traditional DB, and my personal approach may interest you. Is safe to login into a classic account with just the web3.eth.accounts[0] and no PW? The question that you are really asking is "Can you trick web3 into believing you control the private key of an address when ...


2

After several days of research on the above components, I have finally been able to make it work. I want to share my researches so others can benefit and contribute. I profit of this message to thanks you all for the posts that has helped me understand the pieces. My design was to have a server (Meteor) to server (Geth) communication and not a browser to ...


2

Update Apr 23 2017 geth 1.6.0 has a breaking change to remove access to the Solidity compiler from within geth. The workaround is detailed in How to compile Solidity contracts within geth with the v1.6.0 **BREAKING CHANGE**? I had the same problem. It's caused by the compiler inserting <stdin>:ContractName in the output object. Use the following ...


2

Update Apr 23 2017 geth 1.6.0 has a breaking change to remove access to the Solidity compiler from within geth. The workaround is detailed in How to compile Solidity contracts within geth with the v1.6.0 **BREAKING CHANGE**? This works.. var source = 'contract demo {string public name = "Petros"; function changeName(string _newName){name = _newName; } }';...


2

Found the answer: everything Metamask is asynchronous, so I need a callback function : 'click .change-name'(){ myContract.changeName('Pitouf', {gas: 300000},function(){}); }, And it's working !


2

There are several possibilities. 1. Run your node with "white IP address" with parameter --rpcaddr. Read this - https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options geth --testnet --fast --cache=512 --ipcdisable --rpcapi eth,web3,net,personal --rpc --rpcaddr 82.115.184.12 --rpccorsdomain "*" And use code like this: var web3 = new Web3(); ...


2

One approach is to use a server such as nodejs and ensure it's got web3 and a blockchain connection. This is approximately what happens when using browser-only solutions like exchanges or etherscan.io. The light client projects are aimed at providing that sort of user experience without the requirement of a full node. Hope it helps.


2

If you use web3 to sign a message and then try to verify that message in a contract, you need to prepend the following string to the message before running ecrecover in a contract: \x19Ethereum Signed Message:\n<length of message> There are the two places where I found this. https://github.com/ethereum/go-ethereum/issues/3731 https://github.com/...


2

Recently came across a project in alpha: https://fortmatic.com Docs seems pretty good, was able to get things working pretty fast. It triggers a modal in an iframe for user auth (similar to Stripe or Plaid) - imo this feels like a better ux as the end users never have to leave the main dapp experience


2

The main thing you are missing is the keyword constant for the functions returning the data. Here's your modified contract code that should work: pragma solidity ^0.4.8; contract Demo { address public user; uint public i = 0; function Demo() { user=msg.sender; } address[10] users; bytes32[10] name; function add(...


2

The result of Meteor Build Client should be static web assets (HTML, CSS, JS) that can be hosted on any web server or content delivery network. Aligning with the goals of a fully decentralized web, these files would eventually live on the Swarm component of the Ethereum network. Strictly speaking, Meteor Build Client has nothing to do with Etheruem, however ...


2

MetaMask is used for end-user interactions. If you want to send a transaction from a server, in an automated way, you need to sign the transaction yourself. I recommend looking at ethereumjs-tx, which is what MetaMask uses internally.


1

if there is no ethereum node up and running, Ethereum Wallet runs its own. But if you already started a node, ethereum wallet should attach to it. The ethereum wallet use only system default ipc and if your geth use another ipc, probably ethereum wallet could not attached to it. You can try followings: Start node with default ipc: geth --testnet Start ...


1

I made some changes to my contracts. I deleted my compiled files and recompiled them. That seemed to do the trick.


1

Had you seen this Auth0 module? https://github.com/auth0/ethereum-authentication-server


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