Skip to content

Commit f21d422

Browse files
author
pgolovkin
committed
Fix migration problem
1 parent 1e13152 commit f21d422

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Bridge/Bridge.sol

+7-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ contract Bridge {
9191
receive() external payable {
9292
revert();
9393
}
94+
95+
/*
96+
Used only for migration
97+
*/
98+
function receivePayment() external payable {}
9499

95100
/**
96101
* Adds new token to whitelist.
@@ -170,7 +175,7 @@ contract Bridge {
170175
function shutDownAndMigrate(
171176
address thisContractAddress,
172177
bytes32 salt,
173-
address newContractAddress,
178+
address payable newContractAddress,
174179
address[] calldata erc20nativeTokens,
175180
uint8[] memory v,
176181
bytes32[] memory r,
@@ -192,6 +197,7 @@ contract Bridge {
192197
IERC20 token = IERC20(erc20nativeTokens[i]);
193198
token.transfer(newContractAddress, token.balanceOf(address(this)));
194199
}
200+
Bridge(newContractAddress).receivePayment{value: address(this).balance}();
195201
initialized_ = false;
196202
emit Migrated(newContractAddress);
197203
}

0 commit comments

Comments
 (0)