-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I've read the reply here and got the basic idea of how the multicall magic is done.
At present, the multicall.sol
in this repo is a general-purpose contract that does multicall. I'm wondering if we can run custom Solidity code (to be more precisely, compiled bytecode). This is useful when the multiple calls are dependent.
Here's a theoretical example which is meaning less is real world. I want to get the owner of an NFT. After I get the owner of the NFT, I'll check whether the owner address is an odd or even integer. If it's odd, then I want to get the owner's USDC balance. Otherwise (i.e., it's even), I want to get the owner's USDT balance.
I don't think the current general-purpose multicall contract can handle this case. I'm wondering if we can let users write custom logic in Solidity and manually compile it into EVM bytecode. And this piece of bytecode will be run, and we can get the return values.