Argument.df_reaching_functions_arguments()
Returns the list of pairs, where the first element is the function and the second element is the argument to which data flow reaches from the argument (it may reach through a chain of calls).
from glider import *
def query():
func = Contracts().with_name('LendingPool').non_interface_contracts().functions().with_arg_count(5).exec(1)
arg = func.arguments().list()[0]
results = [func]
for (f, arg_index) in arg.df_reaching_functions_arguments():
results.append(f)
print(f.source_code() + '\n\n'+str(arg_index))
return funcfunction nftRemove(
uint256 lpTokenAmount,
uint256 minBaseTokenOutputAmount,
uint256 deadline,
uint256[] calldata tokenIds,
bool withFee
) public returns (uint256 baseTokenOutputAmount, uint256 fractionalTokenOutputAmount) {
// remove liquidity and send fractional tokens and base tokens to sender
(baseTokenOutputAmount, fractionalTokenOutputAmount) =
remove(lpTokenAmount, minBaseTokenOutputAmount, tokenIds.length * ONE, deadline);
// unwrap the fractional tokens into NFTs and send to sender
unwrap(tokenIds, withFee);
}Last updated