ghost-dao-contracts/test/gatekeeper/Gatekeeper.t.sol

545 lines
31 KiB
Solidity

pragma solidity 0.8.20;
import {Test} from "forge-std/Test.sol";
import {Gatekeeper} from "../../src/Gatekeeper.sol";
import {FullMath} from "../../src/libraries/FullMath.sol";
import {GhostPacking} from "../../src/libraries/Packing.sol";
import {IStorageHistory} from "../../src/interfaces/IStorageHistory.sol";
import {StorageHistory} from "../../src/types/StorageHistory.sol";
import {WETH9} from "../../src/mocks/WETH9.sol";
contract MockGovernance is Test {
address public immutable GATEKEEPER;
address public immutable DUMMY_ADDRESS;
bool public auditCalled;
enum STATUS {
RESERVEDEPOSITOR,
RESERVETOKEN,
LIQUIDITYDEPOSITOR,
LIQUIDITYTOKEN,
REWARDMANAGER
}
constructor(address gatekeeper, address dummyAddress) {
GATEKEEPER = gatekeeper;
DUMMY_ADDRESS = dummyAddress;
auditCalled = false;
}
function setDistributor(address distributor) external view {
require(msg.sender == GATEKEEPER);
assertEq(distributor, DUMMY_ADDRESS);
}
function setWarmupPeriod(uint256 warmupPeriod) external view {
require(msg.sender == GATEKEEPER);
assertEq(warmupPeriod, 69);
}
function setBounty(uint256 bounty) external view {
require(msg.sender == GATEKEEPER);
assertEq(bounty, 69);
}
function setAdjustment(uint256 rate, uint256 target, bool add) external view {
require(msg.sender == GATEKEEPER);
assertEq(rate, 69);
assertEq(target, 420);
assertEq(add, true);
}
function updateGatekeeperAddress(address gatekeeper) external view {
require(msg.sender == GATEKEEPER);
assertEq(gatekeeper, DUMMY_ADDRESS);
}
function addPool(address pool) external view {
require(msg.sender == GATEKEEPER);
assertEq(pool, DUMMY_ADDRESS);
}
function removePool(uint256 index) external view {
require(msg.sender == GATEKEEPER);
assertEq(index, 1337);
}
function close(uint256 id) external view {
require(msg.sender == GATEKEEPER);
assertEq(id, 420);
}
function create(
uint256[4] calldata market,
uint256[2] calldata terms,
address quoteToken,
uint32[2] calldata intervals,
bool[2] calldata booleans
) external view {
require(msg.sender == GATEKEEPER);
assertEq(market[0], 69);
assertEq(market[1], 420);
assertEq(market[2], 1337);
assertEq(market[3], 0);
assertEq(terms[0], 420);
assertEq(terms[1], 1337);
assertEq(quoteToken, DUMMY_ADDRESS);
assertEq(intervals[0], 34);
assertEq(intervals[1], 35);
assertEq(booleans[0], true);
assertEq(booleans[1], true);
}
function enable(STATUS status, address token, address calculator) external view {
require(msg.sender == GATEKEEPER);
if (status != STATUS.RESERVETOKEN) revert();
assertEq(token, DUMMY_ADDRESS);
assertEq(calculator, DUMMY_ADDRESS);
}
function disable(STATUS status, address token) external view {
require(msg.sender == GATEKEEPER);
if (status != STATUS.LIQUIDITYTOKEN) revert();
assertEq(token, DUMMY_ADDRESS);
}
function forfeitReserves(address router, uint256 liquidity, bool destroyerMode) external view {
require(msg.sender == GATEKEEPER);
assertEq(router, DUMMY_ADDRESS);
assertEq(liquidity, 420);
assertEq(destroyerMode, true);
}
function redeemReserve(address router, uint256 amount) external view {
require(msg.sender == GATEKEEPER);
assertEq(router, DUMMY_ADDRESS);
assertEq(amount, 420);
}
function withdraw(address token, uint256 amount) external view {
require(msg.sender == GATEKEEPER);
assertEq(token, DUMMY_ADDRESS);
assertEq(amount, 420);
}
function auditReserves() external {
require(msg.sender == GATEKEEPER);
auditCalled = true;
}
}
contract MockStaking is Test {
Gatekeeper public gatekeeper;
WETH9 public mockReserve;
mapping(address => uint256) private _recalledAmounts;
mapping(address => uint256) private _phantomedAmounts;
constructor() {
mockReserve = new WETH9();
StorageHistory history = new StorageHistory();
gatekeeper = new Gatekeeper(address(history), address(this));
gatekeeper.initialize(address(0));
history.setOwner(address(gatekeeper));
}
function runGhost(bytes32 receiver, uint256 amount) external {
gatekeeper.ghost(receiver, amount);
}
function runRecall(
uint256 exodusSession,
uint256 amount,
uint256 packed,
address caller
) external {
vm.prank(address(gatekeeper), caller);
gatekeeper.recall(exodusSession, amount, packed);
}
function recall(address receiver, uint256 amount) external {
_recalledAmounts[receiver] += amount;
}
function recall(uint256 amount, uint256) external returns (address, uint256){
_recalledAmounts[tx.origin] += amount;
return (address(mockReserve), 0);
}
function phantomRefund(address who, uint256 amount) external {
_phantomedAmounts[who] += amount;
}
function recalledAmount(address who) external view returns (uint256) {
return _recalledAmounts[who];
}
function totalReserves() external pure returns (uint256) {
return type(uint256).max;
}
function baseSupply() external pure returns (uint256) {
return type(uint256).max;
}
}
contract GatekeeperTest is Test {
using GhostPacking for GhostPacking.RequestPayload;
address constant ALICE = 0x0000000000000000000000000000000000000001;
address constant BOB = 0x0000000000000000000000000000000000000002;
uint256 constant INIT_AMOUNT = 69 * 1e18;
address constant DUMMY_ADDRESS = address(0x0101010101010101010101010101010101010101);
MockGovernance governance;
Gatekeeper gatekeeper;
MockStaking staking;
event ThreadInserted(uint256 index, uint256 session);
function setUp() public {
vm.prank(ALICE, ALICE);
staking = new MockStaking();
gatekeeper = staking.gatekeeper();
MockGovernance tempGov = new MockGovernance(address(gatekeeper), DUMMY_ADDRESS);
bytes memory govBytecode = address(tempGov).code;
vm.etch(DUMMY_ADDRESS, govBytecode);
governance = MockGovernance(DUMMY_ADDRESS);
}
function test_correctInitialization() public view {
assertEq(gatekeeper.staking(), address(staking));
assertEq(gatekeeper.ghostedSupply(), 0);
}
function test_ghostTokensWork(uint256 ghostAmount) public {
vm.assume(ghostAmount >= gatekeeper.EXISTENTIAL_DEPOSIT() && ghostAmount < type(uint96).max);
bytes32 receiver = bytes32(abi.encodePacked(ALICE));
uint256 ghostedSupply = gatekeeper.ghostedSupply();
vm.prank(ALICE);
staking.runGhost(receiver, ghostAmount);
assertEq(gatekeeper.ghostedSupply(), ghostedSupply + ghostAmount);
}
function test_couldNotGhostTokensFromArbitraryAddress(address someone) public {
vm.assume(someone != ALICE);
bytes32 receiver = bytes32(abi.encodePacked(ALICE));
vm.expectRevert();
vm.prank(someone);
staking.runGhost(receiver, 69);
assertEq(gatekeeper.ghostedSupply(), 0);
}
function test_ghostTokensEmitsEvent(uint256 ghostAmount) public {
vm.assume(ghostAmount >= gatekeeper.EXISTENTIAL_DEPOSIT());
bytes32 receiver = bytes32(abi.encodePacked(ALICE));
vm.expectEmit(true, true, true, false, address(gatekeeper));
emit ThreadInserted(0, 0);
vm.prank(ALICE);
staking.runGhost(receiver, ghostAmount);
}
function test_recallWork(uint256 exodusSession, uint256 bobAmount, uint32 bobCommission) public {
vm.assume(bobAmount > gatekeeper.EXISTENTIAL_DEPOSIT() && bobAmount < 1_000 ether);
vm.assume(bobCommission > 0 && bobCommission <= type(uint32).max);
address storageHistory = gatekeeper.storageHistory();
uint256 commissionAmount = FullMath.mulDiv(bobAmount, uint256(bobCommission), type(uint32).max);
uint256 bobPacked = GhostPacking.pack(uint32(bobCommission), uint64(block.chainid), BOB);
vm.prank(ALICE);
staking.runGhost(bytes32(abi.encodePacked(ALICE)), bobAmount);
uint256 nativeNeeded = FullMath.mulDiv(commissionAmount, staking.totalReserves(), staking.baseSupply());
vm.deal(ALICE, nativeNeeded + 1 ether);
assertEq(BOB.balance, 0 ether);
vm.prank(ALICE);
staking.runRecall(exodusSession, bobAmount, bobPacked, ALICE);
assert(IStorageHistory(storageHistory).isTransactionExecuted(exodusSession));
}
function test_rotationWorks() public {
vm.warp(block.timestamp + 1);
vm.prank(ALICE);
gatekeeper.updatePublicKeyMetadata(block.timestamp, 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0);
vm.warp(block.timestamp + 1);
// forge-lint: disable-next-line(unsafe-typecast)
uint256 packed = GhostPacking.pack(uint8(0), uint64(block.chainid), uint64(1));
vm.prank(address(gatekeeper));
gatekeeper.rotate(block.timestamp, 0xF9308A019258C31049344F85F89D5229B531C845836F99B08601F113BCE036F9, packed);
vm.warp(block.timestamp + 1);
// forge-lint: disable-next-line(unsafe-typecast)
packed = GhostPacking.pack(uint8(0), uint64(block.chainid), uint64(2));
vm.prank(address(gatekeeper));
gatekeeper.rotate(block.timestamp, 0x3590A94E768F8E1815C2F24B4D80A8E3149316C3518CE7B7AD338368D038CA66, packed);
vm.warp(block.timestamp + 1);
// forge-lint: disable-next-line(unsafe-typecast)
packed = GhostPacking.pack(uint8(0), uint64(block.chainid), uint64(3));
vm.prank(address(gatekeeper));
gatekeeper.rotate(block.timestamp, 0xD4E0D4642DB1613B2C94A81FCD34E39A2A31ACD774CD42525A88CF69EBA2E611, packed);
}
function test_couldNotBridgeBelowExistential(uint256 amount) public {
vm.assume(amount < gatekeeper.EXISTENTIAL_DEPOSIT());
bytes32 receiver = bytes32(abi.encodePacked(ALICE));
vm.expectRevert();
vm.prank(ALICE);
staking.runGhost(receiver, amount);
assertEq(gatekeeper.ghostedSupply(), 0);
}
function test_signatureVerificationsWorks() public {
assertEq(gatekeeper.deployer(), ALICE);
vm.prank(ALICE);
staking.runGhost(bytes32(abi.encodePacked(ALICE)), type(uint104).max);
vm.prank(ALICE);
gatekeeper.updatePublicKeyMetadata(0, 0xa55edb24891a8f92cce26d5ab8e359e6ef6ae36d41e0869676d7020e6135e12b, 0);
(bytes32 prevPublicKey,) = gatekeeper.latestPublicKeyInfo();
// DKG #1 <==> Context ExodusContext { session: 1, network_id: 420 }
vm.expectRevert();
gatekeeper.verify(
hex"e9d50bc10000000000000000000000000000000000000000000000000000000000000001a55edb24891a8f92cce26d5ab8e359e6ef6ae36d41e0869676d7020e6135e12b0000000000000001a40000000000000000000000000000000000000000000000",
0x75414a03277a1c46a19be98841e92e13156296592422fd648d7a11f8fa6e56ac,
0xe1f442c13e62f0af437bf693a8d7098e38545cff6002c941f89eee31f8f170f4
);
// DKG 2 <==> Context ExodusContext { session: 2, network_id: 420 }
vm.expectRevert();
gatekeeper.verify(
hex"e9d50bc10000000000000000000000000000000000000000000000000000000000000002ee504738d924ff901dcee6e762b2c17ac0362a62471d5a942e1eb1eb363e91360000000000000001a40000000000000000000000000000000000000000000000",
0x86890fa31f0564aad657a58bccbe8ce226d6834154d9434bbee2a69142980348,
0xad5ec4d13c6f670050df3a2e28957cec23c376f7127248f700b663177942eab8
);
// DKG 3 <==> Context ExodusContext { session: 18, network_id: 31337 }
vm.expectRevert();
gatekeeper.verify(
hex"e9d50bc1000000000000000000000000000000000000000000000000000000000000001253e8a1afb125e0633c84099e04e4732af1d91eb1cd84da9c5ed1f0005bb375b6000000000000007a690000000000000000000000000000000000000000000000",
0x3a4dc265fe4e7c6915ac9b717a9f11c9179d16b00d0c43a8e52bd4eecb4d7a9b,
0x4cc8152116c4a6fe96b01a7ab20289dc3cf75c1c1529ede794a0f56476c77c7e
);
// Bridge Out - amount: 210; commission: 50%; BOB
// DKG 3 <==> Context ExodusContext { session: 11, network_id: 31337 }
vm.expectRevert();
gatekeeper.verify(
hex"bf06188a000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000d200000000000000000000000000000000000000020000000000007a6980000000",
0xde80d861004bfa78c9a0605a4ad7ad78683cc79d98852e500100fb36e951da1c,
0x2708c643a2a436e10809cfd7d75e38d1d352b35970fe4eca306946fec0c457ec
);
// DKG 2 <==> Context ExodusContext { session: 10, network_id: 31337 }
gatekeeper.verify(
hex"e9d50bc1000000000000000000000000000000000000000000000000000000000000000aee504738d924ff901dcee6e762b2c17ac0362a62471d5a942e1eb1eb363e9136000000000000007a690000000000000000000000000000000000000000000000",
0xa94b3c3959bd94741cb93604293406cbce4e209a7c1dfd75ad22ea87878e15ca,
0xc4a83a7cd52ac5b9a7b9f698bd48726edbbe8741e110444502d7ce062236ee04
);
(bytes32 publicKey, uint64 session) = gatekeeper.latestPublicKeyInfo();
assertTrue(publicKey != prevPublicKey);
assertEq(session, 10);
prevPublicKey = publicKey;
// DKG 3 <==> Context ExodusContext { session: 18, network_id: 31337 }
gatekeeper.verify(
hex"e9d50bc1000000000000000000000000000000000000000000000000000000000000001253e8a1afb125e0633c84099e04e4732af1d91eb1cd84da9c5ed1f0005bb375b6000000000000007a690000000000000000000000000000000000000000000000",
0x3a4dc265fe4e7c6915ac9b717a9f11c9179d16b00d0c43a8e52bd4eecb4d7a9b,
0x4cc8152116c4a6fe96b01a7ab20289dc3cf75c1c1529ede794a0f56476c77c7e
);
(publicKey, session) = gatekeeper.latestPublicKeyInfo();
assertTrue(publicKey != prevPublicKey);
assertEq(session, 18);
uint256 aliceAmountBefore = staking.recalledAmount(ALICE);
uint256 bobAmountBefore = staking.recalledAmount(BOB);
uint256 aliceBalanceBefore = ALICE.balance;
uint256 bobBalanceBefore = BOB.balance;
// Bridge Out - amount: 34; commission: 0%; ALICE
// DKG 2 <==> Context ExodusContext { session: 0, network_id: 31337 }
vm.prank(ALICE, ALICE);
gatekeeper.verify(
hex"bf06188a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000010000000000007a6900000000",
0x8025f985dd8c7507a7451a1055435870ce798df3d122e8d03735efa192691550,
0xb749bb2e5df5477eab850816a19786e6fa653c3d4402cee036fe1e506dad26dc
);
assertEq(aliceAmountBefore + 34, staking.recalledAmount(ALICE));
assertEq(bobAmountBefore, staking.recalledAmount(BOB));
assertEq(aliceBalanceBefore, ALICE.balance);
assertEq(bobBalanceBefore, BOB.balance);
aliceAmountBefore = staking.recalledAmount(ALICE);
bobAmountBefore = staking.recalledAmount(BOB);
aliceBalanceBefore = ALICE.balance;
bobBalanceBefore = BOB.balance;
// Bridge Out - amount: 210; commission: 50%; BOB
// DKG 3 <==> Context ExodusContext { session: 11, network_id: 31337 }
vm.prank(ALICE, ALICE);
gatekeeper.verify(
hex"bf06188a000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000d200000000000000000000000000000000000000020000000000007a6980000000",
0xde80d861004bfa78c9a0605a4ad7ad78683cc79d98852e500100fb36e951da1c,
0x2708c643a2a436e10809cfd7d75e38d1d352b35970fe4eca306946fec0c457ec
);
assertApproxEqAbs(aliceAmountBefore + 105, staking.recalledAmount(ALICE), 1);
assertApproxEqAbs(bobAmountBefore + 105, staking.recalledAmount(BOB), 1);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::Close { id: 420 } }
// DKG 2 <==> Context ExodusContext { session: 8, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000080000000000007a69010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000240aebeb4e00000000000000000000000000000000000000000000000000000000000001a400000000000000000000000000000000000000000000000000000000",
0xb23927f82a762b2c70e40c5b834196f04b0b716d1f94073d9709c983364c34af,
0x7051c41a28436c8b8454fc57aec4a808761a3d996a24eab9e9b225c552737435
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::RemovePool { index: 1337 } }
// DKG 2 <==> Context ExodusContext { session: 7, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000070000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024a38dcbd0000000000000000000000000000000000000000000000000000000000000053900000000000000000000000000000000000000000000000000000000",
0xbfd1fe06886518072eed46b325a6c74b574879294fd0d4c924ee670645d22324,
0x35498be823e5bf6a14e0172229359bf73d26153e94262bd9a51650eb825a99ad
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::Create { market: [69, 420, 1337, 0], terms: [420, 1337], token: 0x0101010101010101010101010101010101010101, intervals: [34, 35], booleans: [true, true] } }
// DKG 2 <==> Context ExodusContext { session: 9, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000090000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000164206eb0f8000000000000000000000000000000000000000000000000000000000000004500000000000000000000000000000000000000000000000000000000000001a40000000000000000000000000000000000000000000000000000000000000539000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a400000000000000000000000000000000000000000000000000000000000005390000000000000000000000000101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000230000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
0x222edcb18d541d904861c9097f8dbfe24d5816b2a71246240033a8e794a6eec6,
0xbc19a2d8be0b79219acc98529846e9427bb48a39110b8d0acb396abb015796e0
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::SetDistributor { distributor: 0x0101010101010101010101010101010101010101 } }
// DKG 2 <==> Context ExodusContext { session: 1, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000010000000000007a690101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002475619ab5000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000",
0xecd3afac10a3845f8f7a60a530531d0af7b94288f4894fc60bef233e11f5f60c,
0x75b8a70d0a5cecbb1da45d87bae698dcb4cfa923051dfc3d5661a1d3a3d278de
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::AddPool { address: 0x0101010101010101010101010101010101010101 } }
// DKG 2 <==> Context ExodusContext { session: 6, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000060000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024d914cd4b000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000",
0x1deec2e18132e321cf3df76880bbd5bf37ba0c6cb7ce3a78fa24fb443dd89e9e,
0x7266cccb8f15c651a016892dc647b1e4ee2bac9261095019c12b2a52e6f40cd8
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::UpdateGatekeeperAddress { new_gatekeeper: 0x0101010101010101010101010101010101010101 } }
// DKG 2 <==> Context ExodusContext { session: 5, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000050000000000007a690101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002484f157cd000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000",
0x650efb1c28a67fcd7a09cd677ee48d29d96ad02baea8d5749faa011c6d20865f,
0xc577b059b0e85879a60b5da621a908da2cc4851f0cf82cf0a000b4149ce91574
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::SetWarmupPeriod { warmup_period: 69 } }
// DKG 2 <==> Context ExodusContext { session: 2, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000020000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024a85667c5000000000000000000000000000000000000000000000000000000000000004500000000000000000000000000000000000000000000000000000000",
0x887b1f90a0b71f75bb1f32d90d64c789d398b884b481257daa108fe8175a6024,
0xd9e041cc4865ef88462efc7332f8e7d9be45a7d1d7f3f6aef31fb84489d31557
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::SetAdjustment { rate: 69, target: 420, add: true } }
// DKG 2 <==> Context ExodusContext { session: 4, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000040000000000007a690101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006446d36ab5000000000000000000000000000000000000000000000000000000000000004500000000000000000000000000000000000000000000000000000000000001a4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
0xc6b5e25e62284b97b9d2fba27e09a49bf99f6abc02316f9d4d66597edef89405,
0x95eacaa6e613e5fe42b65f5f6a04f6e5f5f327d232072ac21e15b513142d2e48
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::SetBounty { bounty: 69 } }
// DKG 2 <==> Context ExodusContext { session: 3, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000030000000000007a69010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000245d87d363000000000000000000000000000000000000000000000000000000000000004500000000000000000000000000000000000000000000000000000000",
0xe9d1462dd8e8e80a3b8007628575179e92c249cd7684a1d28c0313a48f8558af,
0x7a33389110ad43d6b51b8fb5d3e5ffbce9d37ce6986e75bab43ca49707012512
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::ForfeitReserves { router: 0x0101010101010101010101010101010101010101, liquidity: 420, destroyer_mode: true } }
// DKG 3 <==> Context ExodusContext { session: 14, network_id: 31337 }
gatekeeper.verify(
hex"31371426000000000000000000000000000000000000000000000000000000000000000e0000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064f0de236c000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000001a4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000",
0x139c9a2b23abfcc1e844b40e1c0b69c033d591f081e895fbcb597974d9fa1323,
0x940773c75fddc4ff70ce13ea46521ad4f788322a4c40ed6e94490510ecd0b971
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::RedeemReserves { router: 0x0101010101010101010101010101010101010101, amount: 420 } }
// DKG 3 <==> Context ExodusContext { session: 15, network_id: 31337 }
gatekeeper.verify(
hex"31371426000000000000000000000000000000000000000000000000000000000000000f0000000000007a690101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004482a21577000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000001a400000000000000000000000000000000000000000000000000000000",
0xcec7a9d8fa39e27fe4f33968741676d5ae948b8f2e42783e92850f10a90bb748,
0xefb7605b627cbfc46f459642be156391d79e37e03ccb510d0d1eb3e5a325bc22
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::Disable { status: GovernanceStatus::LiquidityToken, address: 0x0101010101010101010101010101010101010101 } }
// DKG 3 <==> Context ExodusContext { session: 13, network_id: 31337 }
gatekeeper.verify(
hex"31371426000000000000000000000000000000000000000000000000000000000000000d0000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044529918310000000000000000000000000000000000000000000000000000000000000003000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000",
0x86fdb0bf333d8c7a539da71dbdd8fe4112b4c5766060177215c5cf30caa36350,
0x2c5c721d036cc7017df36e79159b35de07289672c4b0e0731cccc752097a92d1
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::Enable { status: GovernanceStatus::ReserveToken, address: 0x0101010101010101010101010101010101010101, calculator: 0x0101010101010101010101010101010101010101 } }
// DKG 3 <==> Context ExodusContext { session: 12, network_id: 31337 }
gatekeeper.verify(
hex"31371426000000000000000000000000000000000000000000000000000000000000000c0000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064e4e33ef800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000101010101010101010101010101010101010101000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000",
0xe35f59fd65e5b1e1d6402801b1b549bd331425252c35647102b7380f81260c01,
0x9015326c5ced82020c66066479ecb108f243f1439d1d51fd49b3b1cad0cdb179
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::AuditReserves }
// DKG 3 <==> Context ExodusContext { session: 17, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000110000000000007a69010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000042b7ce50000000000000000000000000000000000000000000000000000000000",
0x2be51afcc627038389309a5b4b74ab70fe01b0ee9e1b75d0ce91120c36d2b081,
0x3dc918d435a6ba882ab66d78d853d83d70f582bdfd1aac028b4b75ffefe277cc
);
// Governance: ExodusRequestType::EvmGovernance { target: 0x0101010101010101010101010101010101010101, action: GovernanceAction::Withdraw { token: 0x0101010101010101010101010101010101010101, amount: 420 } }
// DKG 3 <==> Context ExodusContext { session: 16, network_id: 31337 }
gatekeeper.verify(
hex"3137142600000000000000000000000000000000000000000000000000000000000000100000000000007a6901010101010101010101010101010101010101010000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044f3fef3a3000000000000000000000000010101010101010101010101010101010101010100000000000000000000000000000000000000000000000000000000000001a400000000000000000000000000000000000000000000000000000000",
0xd9a91f2185c7f5055ca90461b4ad27c1a06aa2979e3a7f78f41affedd7172faf,
0x4dcf0a720128e2a9952aecc33717e7fe4de0a4b0c8605e2830593c27e9c03daa
);
address storageHistory = gatekeeper.storageHistory();
for (uint256 exodusSession; exodusSession < 19; exodusSession++) {
assert(IStorageHistory(storageHistory).isTransactionExecuted(exodusSession));
}
assert(!IStorageHistory(storageHistory).isTransactionExecuted(20));
}
}