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

Audit-4: Remove rescue operator #1311

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions contracts/scripts/DeployLocal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ contract DeployLocal is Script {
assetHubCreateAssetFee: uint128(vm.envUint("CREATE_ASSET_FEE")),
assetHubReserveTransferFee: uint128(vm.envUint("RESERVE_TRANSFER_FEE")),
exchangeRate: ud60x18(vm.envUint("EXCHANGE_RATE")),
multiplier: ud60x18(vm.envUint("FEE_MULTIPLIER")),
rescueOperator: address(0)
multiplier: ud60x18(vm.envUint("FEE_MULTIPLIER"))
});

GatewayProxy gateway = new GatewayProxy(address(gatewayLogic), abi.encode(config));
Expand Down
3 changes: 1 addition & 2 deletions contracts/scripts/UpgradeShell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ contract UpgradeShell is Script {
assetHubCreateAssetFee: mDot(100), // 0.1 DOT
assetHubReserveTransferFee: mDot(100), // 0.1 DOT
exchangeRate: ud60x18(0.0024e18),
multiplier: ud60x18(1.33e18),
rescueOperator: 0x4B8a782D4F03ffcB7CE1e95C5cfe5BFCb2C8e967
multiplier: ud60x18(1.33e18)
})
});
}
Expand Down
3 changes: 1 addition & 2 deletions contracts/scripts/westend/UpgradeShell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ contract UpgradeShell is Script {
assetHubCreateAssetFee: 200000000000, // 0.2 Wnd
assetHubReserveTransferFee: 200000000000, // 0.2 Wnd
exchangeRate: ud60x18(2400000000000000),
multiplier: ud60x18(1330000000000000000),
rescueOperator: 0x302F0B71B8aD3CF6dD90aDb668E49b2168d652fd
multiplier: ud60x18(1330000000000000000)
})
});
}
Expand Down
7 changes: 0 additions & 7 deletions contracts/src/Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {
import {CoreStorage} from "./storage/CoreStorage.sol";
import {PricingStorage} from "./storage/PricingStorage.sol";
import {AssetsStorage} from "./storage/AssetsStorage.sol";
import {OperatorStorage} from "./storage/OperatorStorage.sol";

import {UD60x18, ud60x18, convert} from "prb/math/src/UD60x18.sol";

Expand Down Expand Up @@ -629,8 +628,6 @@ contract Gateway is IGateway, IInitializable, IUpgradable {
uint256 registerTokenFee;
/// @dev Fee multiplier
UD60x18 multiplier;
/// @dev Optional rescueOperator
address rescueOperator;
}

/// @dev Initialize storage in the gateway
Expand Down Expand Up @@ -683,9 +680,5 @@ contract Gateway is IGateway, IInitializable, IUpgradable {
assets.registerTokenFee = config.registerTokenFee;
assets.assetHubCreateAssetFee = config.assetHubCreateAssetFee;
assets.assetHubReserveTransferFee = config.assetHubReserveTransferFee;

// Initialize operator storage
OperatorStorage.Layout storage operatorStorage = OperatorStorage.layout();
operatorStorage.operator = config.rescueOperator;
}
}
18 changes: 0 additions & 18 deletions contracts/src/storage/OperatorStorage.sol

This file was deleted.

3 changes: 1 addition & 2 deletions contracts/test/Gateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ contract GatewayTest is Test {
assetHubCreateAssetFee: createTokenFee,
assetHubReserveTransferFee: sendTokenFee,
exchangeRate: exchangeRate,
multiplier: multiplier,
rescueOperator: 0x4B8a782D4F03ffcB7CE1e95C5cfe5BFCb2C8e967
multiplier: multiplier
});
gateway = new GatewayProxy(address(gatewayLogic), abi.encode(config));
MockGateway(address(gateway)).setCommitmentsAreVerified(true);
Expand Down
Loading