From f18e5e06a69c2c5c216c4c29b65185f97201e391 Mon Sep 17 00:00:00 2001 From: envin Date: Wed, 20 Nov 2024 10:59:48 +0100 Subject: [PATCH] feat(solidity): support isNative and not EVM emitters --- solidity/scripts/Deploy.s.sol | 5 ++++- solidity/scripts/PAM.s.sol | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/solidity/scripts/Deploy.s.sol b/solidity/scripts/Deploy.s.sol index b01c298e..d75d694f 100644 --- a/solidity/scripts/Deploy.s.sol +++ b/solidity/scripts/Deploy.s.sol @@ -27,6 +27,7 @@ contract Deploy is Script, DeployHelper { string memory name, string memory symbol, bool local, + bool isNative, bool freezing ) public { vm.startBroadcast(); @@ -44,6 +45,7 @@ contract Deploy is Script, DeployHelper { Adapter adapter = new Adapter( address(xerc20), erc20, + isNative, address(feesManager), address(pam) ); @@ -72,8 +74,9 @@ contract Deploy is Script, DeployHelper { string memory name, string memory symbol, bool local, + bool isNative, bool freezing ) public { - run(address(0), erc20, name, symbol, local, freezing); + run(address(0), erc20, name, symbol, local, isNative, freezing); } } diff --git a/solidity/scripts/PAM.s.sol b/solidity/scripts/PAM.s.sol index c96e33cc..adcb7f6b 100644 --- a/solidity/scripts/PAM.s.sol +++ b/solidity/scripts/PAM.s.sol @@ -16,6 +16,18 @@ contract PAMScript is Script { vm.stopBroadcast(); } + // Call if emitter is not in a EVM chain + function setEmitter( + address pam, + uint256 chainid, + bytes32 emitter + ) external { + vm.startBroadcast(); + PAM(pam).setEmitter(bytes32(chainid), emitter); + vm.stopBroadcast(); + } + + // Call if emitter is in a EVM chain function setEmitter( address pam, uint256 chainid,