Skip to content

Commit

Permalink
merge allowance and takeAllowance contract
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekjain23 committed Jul 16, 2024
1 parent 623de19 commit 7bd9338
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/evm/evmtest/wiki_how_tos/TakeAllowance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7bd9338

Please sign in to comment.