Skip to content

Commit 255a462

Browse files
committed
changed proveTokenInitialization to deployCounterpartToken
1 parent bd63212 commit 255a462

9 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/protocol/ERC1155Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ contract ERC1155Bridge is IERC1155Bridge, ReentrancyGuardTransient, IERC1155Rece
125125
}
126126

127127
/// @inheritdoc IERC1155Bridge
128-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
128+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
129129
external
130130
returns (address deployedToken)
131131
{

src/protocol/ERC20Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ contract ERC20Bridge is IERC20Bridge, ReentrancyGuardTransient {
123123
}
124124

125125
/// @inheritdoc IERC20Bridge
126-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
126+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
127127
external
128128
returns (address deployedToken)
129129
{

src/protocol/ERC721Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ contract ERC721Bridge is IERC721Bridge, ReentrancyGuardTransient, IERC721Receive
119119
}
120120

121121
/// @inheritdoc IERC721Bridge
122-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
122+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
123123
external
124124
returns (address deployedToken)
125125
{

src/protocol/IERC1155Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ interface IERC1155Bridge {
108108
/// @param tokenInit The token initialization data
109109
/// @param height The height of the checkpoint on the source chain
110110
/// @param proof Encoded proof of the initialization signal
111-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
111+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
112112
external
113113
returns (address deployedToken);
114114

src/protocol/IERC20Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ interface IERC20Bridge {
9797
/// @param tokenInit The token initialization data
9898
/// @param height The height of the checkpoint on the source chain
9999
/// @param proof Encoded proof of the initialization signal
100-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
100+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
101101
external
102102
returns (address deployedToken);
103103

src/protocol/IERC721Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ interface IERC721Bridge {
108108
/// @param tokenInit The token initialization data
109109
/// @param height The height of the checkpoint on the source chain
110110
/// @param proof Encoded proof of the initialization signal
111-
function proveTokenInitialization(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
111+
function deployCounterpartToken(TokenInitialization memory tokenInit, uint256 height, bytes memory proof)
112112
external
113113
returns (address deployedToken);
114114

test/ERC1155Bridge/Basic.t.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ contract ERC1155BridgeTest is Test {
4545
bridge.initializeToken(address(token));
4646
}
4747

48-
function testProveTokenInitialization() public {
48+
function testDeployCounterpartToken() public {
4949
// First initialize on source chain
5050
vm.prank(alice);
5151
bytes32 id = bridge.initializeToken(address(token));
@@ -61,7 +61,7 @@ contract ERC1155BridgeTest is Test {
6161
signalService.setVerifyResult(true);
6262

6363
// Prove initialization and deploy bridged token
64-
address deployedToken = bridge.proveTokenInitialization(tokenInit, height, proof);
64+
address deployedToken = bridge.deployCounterpartToken(tokenInit, height, proof);
6565

6666
assertTrue(bridge.isInitializationProven(id));
6767
assertEq(bridge.getDeployedToken(address(token)), deployedToken);
@@ -86,10 +86,10 @@ contract ERC1155BridgeTest is Test {
8686
uint256 height = 1;
8787
signalService.setVerifyResult(true);
8888

89-
bridge.proveTokenInitialization(tokenInit, height, proof);
89+
bridge.deployCounterpartToken(tokenInit, height, proof);
9090

9191
vm.expectRevert(IERC1155Bridge.InitializationAlreadyProven.selector);
92-
bridge.proveTokenInitialization(tokenInit, height, proof);
92+
bridge.deployCounterpartToken(tokenInit, height, proof);
9393
}
9494

9595
function testDeposit() public {
@@ -307,7 +307,7 @@ contract ERC1155BridgeTest is Test {
307307
uint256 height = 1;
308308
signalService.setVerifyResult(true);
309309

310-
address bridgedToken = bridge2.proveTokenInitialization(tokenInit, height, proof);
310+
address bridgedToken = bridge2.deployCounterpartToken(tokenInit, height, proof);
311311

312312
// Simulate bridging: deposit on chain 1, claim on chain 2
313313
vm.prank(alice);

test/ERC20Bridge/Basic.t.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ contract ERC20BridgeTest is Test {
4747
bridge.initializeToken(address(token));
4848
}
4949

50-
function testProveTokenInitialization() public {
50+
function testDeployCounterpartToken() public {
5151
// First initialize on source chain
5252
vm.prank(alice);
5353
bytes32 id = bridge.initializeToken(address(token));
@@ -65,7 +65,7 @@ contract ERC20BridgeTest is Test {
6565
signalService.setVerifyResult(true);
6666

6767
// Prove initialization and deploy bridged token
68-
address deployedToken = bridge.proveTokenInitialization(tokenInit, height, proof);
68+
address deployedToken = bridge.deployCounterpartToken(tokenInit, height, proof);
6969

7070
assertTrue(bridge.isInitializationProven(id));
7171
assertEq(bridge.getDeployedToken(address(token)), deployedToken);
@@ -95,10 +95,10 @@ contract ERC20BridgeTest is Test {
9595
uint256 height = 1;
9696
signalService.setVerifyResult(true);
9797

98-
bridge.proveTokenInitialization(tokenInit, height, proof);
98+
bridge.deployCounterpartToken(tokenInit, height, proof);
9999

100100
vm.expectRevert(IERC20Bridge.InitializationAlreadyProven.selector);
101-
bridge.proveTokenInitialization(tokenInit, height, proof);
101+
bridge.deployCounterpartToken(tokenInit, height, proof);
102102
}
103103

104104
function testDeposit() public {
@@ -181,7 +181,7 @@ contract ERC20BridgeTest is Test {
181181
uint256 height = 1;
182182
signalService.setVerifyResult(true);
183183

184-
address bridgedToken = bridge2.proveTokenInitialization(tokenInit, height, proof);
184+
address bridgedToken = bridge2.deployCounterpartToken(tokenInit, height, proof);
185185

186186
// Simulate bridging: deposit on chain 1, claim on chain 2
187187
vm.prank(alice);
@@ -236,7 +236,7 @@ contract ERC20BridgeTest is Test {
236236
uint256 height = 1;
237237
signalService.setVerifyResult(true);
238238

239-
address deployedToken = bridge.proveTokenInitialization(tokenInit, height, proof);
239+
address deployedToken = bridge.deployCounterpartToken(tokenInit, height, proof);
240240

241241
// Verify the bridged token was deployed with fallback metadata
242242
assertEq(BridgedERC20(deployedToken).name(), "Unknown Token Name");
@@ -305,7 +305,7 @@ contract ERC20BridgeTest is Test {
305305
});
306306

307307
signalService.setVerifyResult(true);
308-
address bridgedTokenAddr = bridge.proveTokenInitialization(tokenInit, 1, new bytes(0));
308+
address bridgedTokenAddr = bridge.deployCounterpartToken(tokenInit, 1, new bytes(0));
309309
BridgedERC20 bridgedToken = BridgedERC20(bridgedTokenAddr);
310310

311311
// Test originalToken tracking

test/ERC721Bridge/Basic.t.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ contract ERC721BridgeTest is Test {
4545
bridge.initializeToken(address(token));
4646
}
4747

48-
function testProveTokenInitialization() public {
48+
function testDeployCounterpartToken() public {
4949
// First initialize on source chain
5050
vm.prank(alice);
5151
bytes32 id = bridge.initializeToken(address(token));
@@ -59,7 +59,7 @@ contract ERC721BridgeTest is Test {
5959
signalService.setVerifyResult(true);
6060

6161
// Prove initialization and deploy bridged token
62-
address deployedToken = bridge.proveTokenInitialization(tokenInit, height, proof);
62+
address deployedToken = bridge.deployCounterpartToken(tokenInit, height, proof);
6363

6464
assertTrue(bridge.isInitializationProven(id));
6565
assertEq(bridge.getDeployedToken(address(token)), deployedToken);
@@ -84,10 +84,10 @@ contract ERC721BridgeTest is Test {
8484
uint256 height = 1;
8585
signalService.setVerifyResult(true);
8686

87-
bridge.proveTokenInitialization(tokenInit, height, proof);
87+
bridge.deployCounterpartToken(tokenInit, height, proof);
8888

8989
vm.expectRevert(IERC721Bridge.InitializationAlreadyProven.selector);
90-
bridge.proveTokenInitialization(tokenInit, height, proof);
90+
bridge.deployCounterpartToken(tokenInit, height, proof);
9191
}
9292

9393
function testDeposit() public {
@@ -293,7 +293,7 @@ contract ERC721BridgeTest is Test {
293293
uint256 height = 1;
294294
signalService.setVerifyResult(true);
295295

296-
address bridgedToken = bridge2.proveTokenInitialization(tokenInit, height, proof);
296+
address bridgedToken = bridge2.deployCounterpartToken(tokenInit, height, proof);
297297

298298
// Simulate bridging: deposit on chain 1, claim on chain 2
299299
vm.prank(alice);
@@ -344,7 +344,7 @@ contract ERC721BridgeTest is Test {
344344
uint256 height = 1;
345345
signalService.setVerifyResult(true);
346346

347-
address bridgedToken = bridge2.proveTokenInitialization(tokenInit, height, proof);
347+
address bridgedToken = bridge2.deployCounterpartToken(tokenInit, height, proof);
348348

349349
// Simulate bridging: deposit on chain 1, claim on chain 2
350350
vm.prank(alice);

0 commit comments

Comments
 (0)