Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): revert impl deployment V2 #14621

Merged
merged 10 commits into from
Sep 3, 2023
12 changes: 10 additions & 2 deletions packages/protocol/contracts/tokenvault/ERC20Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,21 @@ contract ERC20Vault is
private
returns (address btoken)
{
ProxiedBridgedERC20 bridgedToken = new ProxiedBridgedERC20();
address bridgedToken = Create2Upgradeable.deploy({
amount: 0, // amount of Ether to send
salt: keccak256(
dantaik marked this conversation as resolved.
Show resolved Hide resolved
bytes.concat(
bytes32(ctoken.chainId), bytes32(uint256(uint160(ctoken.addr)))
)
),
bytecode: type(ProxiedBridgedERC20).creationCode
});

btoken = LibVaultUtils.deployProxy(
address(bridgedToken),
owner(),
bytes.concat(
bridgedToken.init.selector,
ProxiedBridgedERC20(bridgedToken).init.selector,
abi.encode(
address(_addressManager),
ctoken.addr,
Expand Down