from glider import*defquery(): func = (Contracts().with_name('Pair').non_interface_contracts().functions().with_arg_count(1).exec(1)[0]) arg = func.arguments().list()[0]print(arg.source_code())print(arg.get_parent().source_code())return []
Output
"root":{1 item"print_output":[2 items0:string"uint256 tokenId"1:string"functionwithdraw(uint256 tokenId) public {// check that the sender is the caviar ownerrequire(caviar.owner() == msg.sender,"Withdraw: not owner");// check that the close period has been setrequire(closeTimestamp !=0,"Withdraw not initiated");// check that the close grace period has passedrequire(block.timestamp >= closeTimestamp,"Not withdrawable yet");// transfer the nft to the caviar ownerERC721(nft).safeTransferFrom(address(this), msg.sender, tokenId);emitWithdraw(tokenId); }"]}