Skip to content

Commit

Permalink
Update analog-gmp version (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lohann authored Apr 19, 2024
1 parent 0a64eb5 commit f549ab4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions examples/simple/Counter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ pragma solidity ^0.8.0;

import {Test, console} from "forge-std/Test.sol";
import {IGateway} from "@analog-gmp/interfaces/IGateway.sol";
import {GmpSender, PrimitiveUtils} from "@analog-gmp/Primitives.sol";
import {GmpTestTools} from "@analog-gmp-testing/GmpTestTools.sol";
import {Counter} from "./Counter.sol";

contract CounterTest is Test {
using PrimitiveUtils for address;
using PrimitiveUtils for GmpSender;

Counter public counter;

/**
Expand Down Expand Up @@ -53,9 +57,12 @@ contract CounterTest is Test {
GmpTestTools.switchNetwork(sepoliaId);
assertEq(counter.number(), 0);

// Convert Alice address to GmpSender, passing `false` indicates
// that the sender is an EOA, not a contract
GmpSender sender = alice.toSender(false);

// Deposit funds to pay for the execution cost from Shibuya to Sepolia
bytes32 source = bytes32(uint256(uint160(alice)));
sepoliaGateway.deposit{value: 1 ether}(source, shibuyaId);
sepoliaGateway.deposit{value: 1 ether}(sender, shibuyaId);
assertEq(counter.number(), 0);

// Submit a new GMP from Shibuya to Sepolia
Expand Down
2 changes: 1 addition & 1 deletion lib/contracts

0 comments on commit f549ab4

Please sign in to comment.