From f549ab45de4230be885662f3c38d82d21a1187cb Mon Sep 17 00:00:00 2001 From: Lohann Paterno Coutinho Ferreira Date: Fri, 19 Apr 2024 04:22:09 +0100 Subject: [PATCH] Update analog-gmp version (#2) --- examples/simple/Counter.t.sol | 11 +++++++++-- lib/contracts | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/simple/Counter.t.sol b/examples/simple/Counter.t.sol index f6484c5..614c02b 100644 --- a/examples/simple/Counter.t.sol +++ b/examples/simple/Counter.t.sol @@ -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; /** @@ -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 diff --git a/lib/contracts b/lib/contracts index f61efc8..d56ea9f 160000 --- a/lib/contracts +++ b/lib/contracts @@ -1 +1 @@ -Subproject commit f61efc855faed4de87b39bab442bdc69644ed5bb +Subproject commit d56ea9f5763123cbbf1431c9549fea8ec0ecc9f1