ERC20_ABI2 = [{“inputs”:[{“internalType”:“contract RewardKaran”,“name”:"_testToken",“type”:“address”}],“payable”:true,“stateMutability”:“payable”,“type”:“constructor”},{“constant”:false,“inputs”:[{“internalType”:“uint256”,“name”:"_value",“type”:“uint256”}],“name”:“changeAPY”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“claimTst”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“customAPY”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“customHasStaked”,“outputs”:[{“internalType”:“bool”,“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“customIsStakingAtm”,“outputs”:[{“internalType”:“bool”,“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“customRewards”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“name”:“customStakers”,“outputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“internalType”:“uint256”,“name”:"_amount",“type”:“uint256”}],“name”:“customStaking”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“customStakingBalance”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“customTotalStaked”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“customUnstake”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“defaultAPY”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“hasStaked”,“outputs”:[{“internalType”:“bool”,“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“isStakingAtm”,“outputs”:[{“internalType”:“bool”,“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“name”,“outputs”:[{“internalType”:“string”,“name”:"",“type”:“string”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“owner”,“outputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“redistributeRewards”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:false,“inputs”:[{“internalType”:“uint256”,“name”:"_amount",“type”:“uint256”}],“name”:“stakeTokens”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“name”:“stakers”,“outputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[{“internalType”:“address”,“name”:"",“type”:“address”}],“name”:“stakingBalance”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“testToken”,“outputs”:[{“internalType”:“contract RewardKaran”,“name”:"",“type”:“address”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:[],“name”:“totalStaked”,“outputs”:[{“internalType”:“uint256”,“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[],“name”:“unstakeTokens”,“outputs”:[],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”}];
async function tsuply(){
y = await Moralis.Web3API.native.runContractFunction({
chain: “mumbai”,
address: “0xf8aDc852F8CaE4395d03AaBF5534051Bf4AEFAD1”,
function_name: “customStakingBalance”,
abi: ERC20_ABI2,
params: { who : “0x4830EDD0C016c556b48C0847E3b0b6b767F20de1”},
})
console.log(y);
}
tsuply();