I need the pending balance of my contract. As far as I understand I could do it with web3:
web3.eth.call(callObject [, defaultBlock] [, callback])
Can I pass defaultBlock to truffle-contract abstraction as well or I need to call web3 directly?
I.e. When I'm trying to pass a defaultBlock to a truffle-contract call:
import { default as Contract } from "truffle-contract";
let contractDef = Contract(artifacts);
contractDef.setProvider(provider);
let instance = await contractDef.deployed();
let balance = await myContract.instance.balanceOf(
address,
"pending"
);
I get:
Error: Invalid number of arguments to Solidity function