File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ npm install keychain.js
6464const { Keychain , KeychainWeb3 } = require (' keychain.js' );
6565const Web3 = require (' web3' );
6666const web3 = new Web3 (' YOUR_API_URL' ); // https://ropsten.infura.io/v3/046804e3dd3240b09834531326f310cf
67- const transactionParams = {
67+ const tx = {
6868 to: ' 0xE8899BA12578d60e4D0683a596EDaCbC85eC18CC' ,
6969 value: 100 ,
7070 gas: 21000
7171};
7272const keychain = new Keychain ();
7373const keychainWeb3 = new KeychainWeb3 (keychain, web3);
7474keychain .selectKey ()
75- .then (publicKey => keychainWeb3 .signTransaction (transactionParams , publicKey))
75+ .then (publicKey => keychainWeb3 .signTransaction (tx , publicKey))
7676 .then (result => web3 .eth .sendSignedTransaction (result .rawTransaction ));
7777```
7878
You can’t perform that action at this time.
0 commit comments