Skip to content

Commit 340671a

Browse files
Deploy EmptyEtherWrapper (Synthetixio#1349)
* EmptyEtherWrapper * deploy EmptyEtherWrapper * ignore EmptyEtherWrapper for coverage * Use simple synths in local-ovm * Bugfix on ops tool task Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>
1 parent 221660d commit 340671a

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

.solcover.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
'EscrowChecker.sol',
1111
'ExchangeRatesWithoutInvPricing.sol',
1212
'IssuerWithoutLiquidations.sol',
13+
'EmptyEtherWrapper.sol',
1314
],
1415
providerOptions: {
1516
default_balance_ether: 10000000000000, // extra zero just in case (coverage consumes more gas)

contracts/EmptyEtherWrapper.sol

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pragma solidity ^0.5.16;
2+
3+
// Stub functions required by the DebtCache and FeePool contracts.
4+
// https://docs.synthetix.io/contracts/source/contracts/etherwrapper
5+
contract EmptyEtherWrapper {
6+
constructor() public {}
7+
8+
/* ========== VIEWS ========== */
9+
10+
function totalIssuedSynths() public view returns (uint) {
11+
return 0;
12+
}
13+
14+
function distributeFees() external {}
15+
}

hardhat/tasks/task-ops.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ task('ops', 'Run Optimism chain')
3131
taskArguments.maxMemory = true;
3232

3333
const opsPath = taskArguments.optimismPath.replace('~', homedir);
34-
const opsBranch = 'regenesis/0.4.0';
34+
const opsBranch = taskArguments.optimismBranch;
3535
const opsCommit = taskArguments.optimismCommit;
3636
const opsDetached = taskArguments.detached ? '-d' : '';
3737

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
[
22
{
33
"name": "sUSD",
4-
"asset": "USD",
5-
"subclass": "MultiCollateralSynth"
4+
"asset": "USD"
65
},
76
{
87
"name": "sETH",
9-
"asset": "ETH",
10-
"subclass": "MultiCollateralSynth"
8+
"asset": "ETH"
119
}
1210
]

publish/src/commands/deploy/deploy-loans.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,18 @@ module.exports = async ({ account, addressOf, deployer, getDeployParameter, netw
4646

4747
await deployer.deployContract({
4848
name: 'EtherWrapper',
49+
source: useOvm ? 'EmptyEtherWrapper' : 'EtherWrapper',
4950
deps: ['AddressResolver'],
50-
args: [account, addressOf(ReadProxyAddressResolver), WETH_ADDRESS],
51+
args: useOvm ? [] : [account, addressOf(ReadProxyAddressResolver), WETH_ADDRESS],
5152
});
5253

53-
await deployer.deployContract({
54-
name: 'NativeEtherWrapper',
55-
deps: ['AddressResolver'],
56-
args: [account, addressOf(ReadProxyAddressResolver)],
57-
});
54+
if (!useOvm) {
55+
await deployer.deployContract({
56+
name: 'NativeEtherWrapper',
57+
deps: ['AddressResolver'],
58+
args: [account, addressOf(ReadProxyAddressResolver)],
59+
});
60+
}
5861

5962
// ----------------
6063
// Multi Collateral System

0 commit comments

Comments
 (0)