I'm currently trying to call Etherscan's API eth_call to check data from a smart contract. To do that, I need to pass the function ABI code and data. However, the data I need is stored in a map and I'm not sure what code that would map to.
The contract in question is here with the variable being
mapping (address => bool) public sendAllowed;
However, by doing
Keccack ("sendAllowed(address)") = 2f0c92d385bd4391c0edec32b0ac39252f8a9ecbcfb630748ddb154a80318288
I got the ABI code of 0x2f0c92d3. Plugging that into the Etherscan API, I didn't get the proper data though:
{
jsonrpc: "2.0",
id: 1,
result: "0x"
}
(should return true)
What is the correct ABI code to use for the public getter / how do I properly call the Etherscan API to get the data?
0x, while it should returntrue... – ThePiachu Sep 20 '19 at 15:34address=instead ofto=. This URL works as expected: http://api-rinkeby.etherscan.io/api?module=proxy&action=eth_call&to=0xf455105e41f84e3f980d0908887a311233bb9953&data=0x2f0c92d3000000000000000000000000dc1f5d644e4016f3da89fe002f63fbeb8e071cf1 – user19510 Sep 20 '19 at 16:01