Skip to content

Commit 86abf29

Browse files
authored
use tokenless_transceiver (#2)
* use tokenless_transceiver
1 parent 665c4df commit 86abf29

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

.gitmodules

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
[submodule "lib/openzeppelin-contracts"]
1111
path = lib/openzeppelin-contracts
1212
url = https://github.com/OpenZeppelin/openzeppelin-contracts
13-
[submodule "lib/example-native-token-transfers"]
14-
path = lib/example-native-token-transfers
15-
url = https://github.com/wormhole-foundation/example-native-token-transfers
1613
[submodule "lib/wormhole-solidity-sdk"]
1714
path = lib/wormhole-solidity-sdk
1815
url = https://github.com/wormhole-foundation/wormhole-solidity-sdk
@@ -25,3 +22,7 @@
2522
[submodule "lib/openzeppelin-foundry-upgrades"]
2623
path = lib/openzeppelin-foundry-upgrades
2724
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
25+
[submodule "lib/native-token-transfers"]
26+
path = lib/native-token-transfers
27+
url = https://github.com/wormholelabs-xyz/native-token-transfers
28+
branch = cs/generic-ntt-refactor

lib/example-native-token-transfers

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/native-token-transfers

Submodule native-token-transfers added at ba0b016

remappings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@axelar-network/axelar-gmp-sdk-solidity=lib/axelar-gmp-sdk-solidity/
2-
@wormhole-foundation/native_token_transfer=lib/example-native-token-transfers/evm/src
2+
@wormhole-foundation/native_token_transfer=lib/native-token-transfers/evm/src
33
@openzeppelin/foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/

test/axelar/AxelarTransceiver.t.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ contract AxelarTransceiverTest is Test {
5353
address managerImplementation = address(
5454
new NttManager(
5555
address(token),
56-
IManagerBase.Mode.LOCKING,
56+
INttManager.Mode.LOCKING,
5757
1,
5858
RATE_LIMIT_DURATION,
5959
SKIP_RATE_LIMITING
@@ -68,6 +68,11 @@ contract AxelarTransceiverTest is Test {
6868
transceiver.initialize();
6969
vm.prank(OWNER);
7070
manager.setTransceiver(address(transceiver));
71+
72+
vm.prank(OWNER);
73+
manager.setReceiveTransceiverForChain(2, address(transceiver));
74+
vm.prank(OWNER);
75+
manager.setThreshold(2, 1);
7176
}
7277

7378
function test_setAxelarChainId() public {

test/axelar/AxelarTransceiverEndToEnd.sol

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ contract AxelarTransceiverEndToEnd is Test {
4747
address sourceManagerImplementation = address(
4848
new NttManager(
4949
address(sourceToken),
50-
IManagerBase.Mode.LOCKING,
50+
INttManager.Mode.LOCKING,
5151
sourceChainId,
5252
RATE_LIMIT_DURATION,
5353
SKIP_RATE_LIMITING
@@ -71,7 +71,7 @@ contract AxelarTransceiverEndToEnd is Test {
7171
address recipientManagerImplementation = address(
7272
new NttManager(
7373
address(recipientToken),
74-
IManagerBase.Mode.LOCKING,
74+
INttManager.Mode.LOCKING,
7575
recipientChainId,
7676
RATE_LIMIT_DURATION,
7777
SKIP_RATE_LIMITING
@@ -103,6 +103,17 @@ contract AxelarTransceiverEndToEnd is Test {
103103
vm.prank(OWNER);
104104
recipientNttManager.setPeer(sourceChainId, sourceNttManagerAddress, 18, 100000000);
105105

106+
// Configure receive transceivers and thresholds for both chains
107+
vm.prank(OWNER);
108+
sourceNttmanager.setReceiveTransceiverForChain(recipientChainId, address(sourceTransceiver));
109+
vm.prank(OWNER);
110+
sourceNttmanager.setThreshold(recipientChainId, 1);
111+
112+
vm.prank(OWNER);
113+
recipientNttManager.setReceiveTransceiverForChain(sourceChainId, address(recipientTransceiver));
114+
vm.prank(OWNER);
115+
recipientNttManager.setThreshold(sourceChainId, 1);
116+
106117
string memory sourceChainName = "srcChain";
107118
string memory sourceAxelarAddress = "srcAxelar";
108119

0 commit comments

Comments
 (0)