banteg / multicall.py

aggregate results of multiple smart contract calls into one
MIT License
246 stars 106 forks source link

Add support for additional arguments in the call function. #4

Open Dirt-Nasty opened 3 years ago

Dirt-Nasty commented 3 years ago

Would it be possible to implement a way to pass additional field into the call function. Right now you are passing {to: address, data: data} into the call but there are some use cases for additional arguments. For example a few of the contracts I interact need a from argument as well.

Example:

self.w3.eth.call({'to': self.target, 'data': calldata, 'from': address})

BobTheBuidler commented 1 year ago

we can probably catch **kwargs and update the params dict with them before contacting the node, wdyt?

DefiDebauchery commented 1 week ago

Are there any other worthwhile args to capture? If it's just from, perhaps it'd just be more straightforward to add it to the class members as tx_from= or origin=?