From 7bd9338aa86e19cfdbc02a698c862b399b5746dd Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Tue, 16 Jul 2024 16:59:04 +0530 Subject: [PATCH] merge allowance and takeAllowance contract --- packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol b/packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol index bf96e2e52a..6099077bb7 100644 --- a/packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol +++ b/packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol @@ -4,7 +4,15 @@ pragma solidity ^0.8.0; import "@iscmagic/ISC.sol"; -contract allowance { +contract Allowance { + function allow(address _address, bytes32 _allowanceNFTID) public { + NFTID[] memory nftIDs = new NFTID[](1); + nftIDs[0] = NFTID.wrap(_allowanceNFTID); + ISCAssets memory assets; + assets.nfts = nftIDs; + ISC.sandbox.allow(_address, assets); + } + function takeAllowedFunds( address _address, bytes32 _allowanceNFTID