curl -X 'POST' \
'https://deep-index.moralis.io/api/v2/0x45c54210128a065de780C4B0Df3d16664f7f859e/function?chain=bsc&function_name=userInfo' \
-H 'accept: application/json' \
-H 'X-API-' \
-H 'Content-Type: application/json' \
-d '{
"abi": [{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IMasterChefV2","name":"_masterchefV2","type":"address"},
__many other things__
{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},
{"internalType":"uint256","name":"lastDepositedTime","type":"uint256"},{"internalType":"uint256","name":"cakeAtLastUserAction","type":"uint256"},{"internalType":"uint256","name":"lastUserActionTime","type":"uint256"},{"internalType":"uint256","name":"lockStartTime","type":"uint256"},{"internalType":"uint256","name":"lockEndTime","type":"uint256"},{"internalType":"uint256","name":"userBoostedShare","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"uint256","name":"lockedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},
__many other things__
],
"params": { "address": "0xF2c71B372a6e374C57B86de5c9f691f138cbeEb5" }
}'
Results in:
Error: response status is 400
Response body
{
"message": " is required"
}
What am I doing wrong?
I already tried adding/removing square brackets, removing “params” or “address”, without success…
Same inputs on Bscscan.com gives correct results so I guess is just a matter of syntax.
Thank you