async function stake() {
await Moralis.enableWeb3();
var amt=document.getElementById("inpt").value*1000000000;
var add=document.getElementById("btn-login").value;
const bsc40_abi2 = [
{
constant: false,
inputs: [
{
internalType: 'address',
name: 'address',
type: 'address',
},
{
internalType: 'uint256',
name: '_amount',
type: 'uint256',
},
],
name: 'customStaking',
outputs: [
{
internalType: 'bool',
name: 'success',
type: 'bool',
},
],
payable: false,
stateMutability: 'nonpayable',
type: 'function',
},
];
let b = await Moralis.executeFunction({
contractAddress: '0xf8aDc852F8CaE4395d03AaBF5534051Bf4AEFAD1',
functionName: 'customStaking',
abi: bsc40_abi2,
params: {
address:add,
_amount:amt,
},
});
}
issue with this code showing (index):701
Uncaught (in promise) ['address is required']0: "address is required"length: 1[[Prototype]]: Array(0)
stake @ (index):701
await in stake (async)
onclick @ (index):223