Skip to content

Commit 29c71a9

Browse files
committed
Embed approver contract into script
Signed-off-by: Luis Mastrangelo <luis@swirldslabs.com>
1 parent 1481d8e commit 29c71a9

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

examples/foundry-hts/script/ApproveToken.s.sol

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ pragma solidity ^0.8.0;
33

44
import {Script, VmSafe} from "forge-std/Script.sol";
55
import {IERC20} from "hedera-forking/IERC20.sol";
6+
import {IHRC719} from "hedera-forking/IHRC719.sol";
67
import {Hsc} from "hedera-forking/Hsc.sol";
7-
import {Approver} from "../src/Approver.sol";
8+
9+
contract Approver {
10+
function associate(address tokenAddress) external {
11+
IHRC719(tokenAddress).associate();
12+
}
13+
14+
function approve(address tokenAddress, address account, uint256 amount) external {
15+
IERC20(tokenAddress).approve(account, amount);
16+
}
17+
}
818

919
/**
1020
* Usage

examples/foundry-hts/src/Approver.sol

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)