Files
smom-dbis-138/test/mainnet-checkpoint/TokenTransferFilterV1.t.sol
T
defiQUGandCursor 651fb59786 Add mainnet checkpoint stack: ISO attestation, participant Etherscan surface, and services.
Ship AddressActivityRegistry V1/V2, ISO20022IntakeGateway, Chain138ParticipantSurface,
checkpoint hub contracts, checkpoint-core package, aggregator/indexer/sdk services,
relay profile guards, M00 diamond bridge facet, and OMNL compliance contracts.

Co-authored-by: Cursor <[email protected]>
2026-06-24 21:54:05 -07:00

34 lines
1.2 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Test} from "forge-std/Test.sol";
import {TokenTransferFilterExtension} from "../../contracts/mainnet-checkpoint/extensions/TokenTransferFilterExtension.sol";
import {CheckpointStorage} from "../../contracts/mainnet-checkpoint/storage/CheckpointStorage.sol";
import {CheckpointLeaf} from "../../contracts/mainnet-checkpoint/libraries/CheckpointLeaf.sol";
contract TokenTransferFilterV1Test is Test {
TokenTransferFilterExtension filter;
function setUp() public {
filter = new TokenTransferFilterExtension();
filter.setAllowNative(true, 0);
}
function testBeforeSubmitAcceptsAbiEncodedV1Leaves() public view {
CheckpointLeaf.PaymentLeafV1[] memory leaves = new CheckpointLeaf.PaymentLeafV1[](1);
leaves[0] = CheckpointLeaf.PaymentLeafV1({
txHash: keccak256("tx"),
from: address(1),
to: address(2),
value: 0,
blockNumber: 1,
blockTimestamp: 1,
gasUsed: 21000,
success: true
});
bytes memory data = abi.encode(leaves);
CheckpointStorage.CheckpointHeader memory header;
filter.beforeSubmit(header, data);
}
}