@mrrobot3_3 getting a different error now...

truffle(develop)> let account = await web3.eth.getAccounts()
undefined
truffle(develop)> let wbnb = await WBNB.deployed()
undefined
truffle(develop)> let name = wbnb.name(account[0])
undefined
truffle(develop)> Uncaught Error: Returned error: Key not found in database

Jun 12, 2021, 6:09 PM
I verified that account holds an array of accounts so account[0] should be fine.
Jun 12, 2021, 6:09 PM
Hmm put await on function call as well
Jun 12, 2021, 6:40 PM
I'm pretty sure I tried that. I'll try again..
@mrrobot3_3

yeah.. same error. I verified the ABI is in there...

truffle(develop)> account[0]
'0x641c360A6259f9dA1A158c1344Eb1A8aa73c3788'
truffle(develop)> wbnb.address
'0x87A741C0115B2abf93D53E36F2BaF87461325727'
truffle(develop)> wbnb.abi[0]
{
constant: true,
inputs: [],
name: 'name',
outputs: [ { name: '', type: 'string' } ],
payable: false,
stateMutability: 'view',
type: 'function',
signature: '0x06fdde03'
}
truffle(develop)> let name3 = await wbnb.name(account[0])
Uncaught Error: Returned error: Key not found in database
Jun 12, 2021, 6:55 PM
Maybe try call()?
Like
wbnb.name.call()
Jun 12, 2021, 7:58 PM
Unfortunately it's the same result.. "Key not found in database" 😔
Jun 12, 2021, 9:22 PM

© 2024 Draquery.com All rights reserved.