Skip to content

Commit

Permalink
feat(solidity): support isNative and not EVM emitters
Browse files Browse the repository at this point in the history
  • Loading branch information
envin3 committed Nov 20, 2024
1 parent 060157e commit f18e5e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion solidity/scripts/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ contract Deploy is Script, DeployHelper {
string memory name,
string memory symbol,
bool local,
bool isNative,
bool freezing
) public {
vm.startBroadcast();
Expand All @@ -44,6 +45,7 @@ contract Deploy is Script, DeployHelper {
Adapter adapter = new Adapter(
address(xerc20),
erc20,
isNative,
address(feesManager),
address(pam)
);
Expand Down Expand Up @@ -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);
}
}
12 changes: 12 additions & 0 deletions solidity/scripts/PAM.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f18e5e0

Please sign in to comment.