ethereumjs / ethereumjs-tx

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx
Mozilla Public License 2.0
779 stars 235 forks source link

Send ethereum #158

Closed Naderakhlagh closed 5 years ago

Naderakhlagh commented 5 years ago

const transactionParameters = { nonce: '0x00', // ignored by MetaMask gasPrice: '0x09184e72a000', // customizable by user during MetaMask confirmation. gasLimit: '0x2710', // customizable by user during MetaMask confirmation. to: '0xac46b2d99f08737a038aa61a7568696a2084e6b1

000000000000', // Required except during contract publications. from: web3.eth.accounts[0], // must match user's active address. value: '0x00', // Only required to send ether to the recipient from the initiating external account. data: '0x7f7465737432600057'ac46b2d99f08737a038aa61a7568696a2084e6b1; // Optional, but used for defining smart contract creation and interaction. chainId: 3 // Used to prevent transaction reuse across blockchains. Auto-filled by MetaMask. }

ethereum.sendAsync({ method: 'eth_sendTransaction', params: [transactionParameters], from: ethereum.selectedAddress, 0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8}, callback)

holgerd77 commented 5 years ago

Too low effort on problem description, will close.