Created
December 21, 2019 06:43
-
-
Save viraj124/3a5ba679dbc93f8cda3bb6e3d3608423 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async loadBlockchainData() { | |
const web3 = window.web3 | |
var instaKyberABI = { // compound connnector mint/deposit ABI | |
constant: false, | |
inputs: [ | |
{ | |
name: "src", | |
type: "address" | |
}, | |
{ | |
name: "dest", | |
type: "address" | |
}, | |
{ | |
name: "srcAmt", | |
type: "uint" | |
}, | |
{ | |
name: "maxDestAmt", | |
type: "uint" | |
}, | |
{ | |
name: "slippageRate", | |
type: "uint" | |
} | |
], | |
name: "buy", | |
outputs: [ | |
{ | |
name: "destAmt", | |
type: "uint" | |
} | |
], | |
payable: true, | |
stateMutability: "payable", | |
type: "function" | |
}; | |
var args = [ | |
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', | |
'0xDb0040451F373949A4Be60dcd7b6B8D6E42658B6', | |
"100000000000000000", | |
"1000000000000000000000", | |
1 // Amount you want to deposit in wei | |
] | |
const data = await web3.eth.abi.encodeFunctionCall(instaKyberABI, args) | |
console.log(data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment