Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
c53070d
fix slither crashing in CI and local (#1519)
artdgn Sep 23, 2021
333b07b
Adding gnosis safe multisend functionality to owner (#1513)
Sep 24, 2021
bbbb0c3
SIP-135 Cleanup (#1522)
barrasso Sep 24, 2021
98e46fa
Prepping for the Sargas (2.50) release to OVM (#1526)
Sep 25, 2021
9e26043
Fixing settle for ethers (#1509)
Sep 27, 2021
91ac866
Reduce gas usage for opening loans (#1529)
barrasso Sep 28, 2021
aad6caf
Print deploy param object value (#1534)
barrasso Sep 28, 2021
5e48e5a
add slither code check github integration (#1523)
artdgn Sep 30, 2021
645a49c
Refactor exceedsDebtLimit check (#1539)
barrasso Sep 30, 2021
744265a
Removing unneeded kovan contracts (#1538)
Oct 1, 2021
07c85e5
ci: lavamoat integration (#1517)
drptbl Oct 3, 2021
f84eca5
CI: add codeql (#1544)
drptbl Oct 4, 2021
9a8384a
Adds block tag parameter to interact task (#1528) (#1536)
Oct 4, 2021
294f325
ci: slither github actions improvements (#1543)
drptbl Oct 4, 2021
963f266
Removing integrationProxy from Proxyable (#1521)
Oct 5, 2021
eb88a85
Fix prepare deploy (#1548)
barrasso Oct 6, 2021
28b6f95
Document debt cache (#1533)
liamzebedee Oct 7, 2021
b36a057
Updating packages for audits and temporarily disabling the audit chec…
jjgonecrypto Oct 7, 2021
fded644
ci: fail audit on critical severity (#1557)
drptbl Oct 12, 2021
0f9fcc0
ci: update docker containers to node@14.18 (#1558)
drptbl Oct 12, 2021
ce6d79d
Merge branch 'master' into develop
jjgonecrypto Oct 12, 2021
476c5a4
During deployment, ensure deprecated synths from Wezen have cache upd…
jjgonecrypto Oct 14, 2021
5f8c732
Update configure loans interactionDelay (#1568)
barrasso Oct 14, 2021
f1fcfcf
update deployer to support EIP-1559 (#1504)
dbeal-eth Oct 15, 2021
963d78d
SIP-187 fix partial synth updates and debt cache updates (#1551)
jacko125 Oct 19, 2021
1172632
remove gasPrice overrides from simulate-deploy (#1573)
dbeal-eth Oct 19, 2021
1f0c027
Merge branch 'master' into develop
jjgonecrypto Oct 20, 2021
795f1c7
SIP-182 Wrapper Factory (#1489)
dbeal-eth Oct 26, 2021
9d6ac2e
SIP-182 Audit feedback - allowance in constructor (#1584)
barrasso Oct 27, 2021
0743256
Merge branch 'master' into develop
jjgonecrypto Oct 28, 2021
94987e3
Fix param spam during deployment (#1587)
barrasso Oct 29, 2021
defb035
add expalantion about releases.json in readme (#1569)
artdgn Nov 2, 2021
1c126e1
ci: use node 16 (LTS) (#1588)
drptbl Nov 2, 2021
913d0b3
Removing inverse synths (#1592)
jjgonecrypto Nov 3, 2021
963c7a5
Ensuring SCCP-139 feeds are persisted to future ExchangeRates contrac…
jjgonecrypto Nov 3, 2021
76d43ce
Skip shorts integration tests when cannot open loans (#1597)
jjgonecrypto Nov 10, 2021
073cb12
Add default private key for local-ovm deploys (#1455)
liamzebedee Nov 15, 2021
f2172c3
SIP-120: TWAP Exchange Function (#1127)
sohkai Nov 15, 2021
509688a
Adding 6 more potential releases
jjgonecrypto Nov 15, 2021
472d20e
Merge branch 'master' into develop
jjgonecrypto Nov 17, 2021
dac3532
Fixing owner script to not submit multiple accept for dupe contracts
jjgonecrypto Nov 17, 2021
2bd3ceb
Upgrading to OVM 2.0 (or the destruction of useless code) (#1598)
jjgonecrypto Nov 18, 2021
682a2ef
Minor fixes for release history
jjgonecrypto Nov 18, 2021
9f38d1a
SIP-167 Introduces an L2 governance bridge (#1402)
eternauta1337 Nov 23, 2021
5c9b643
Removing mistake
jjgonecrypto Nov 23, 2021
fe6a61a
Merge branch 'master' into develop
jjgonecrypto Nov 23, 2021
6a5b7b2
Fixes from menkalinan (#1608)
jjgonecrypto Nov 24, 2021
ffc3d61
Update OVM bytecode (#1613)
barrasso Dec 1, 2021
69fb372
Move debt snapshot to beforeEach block (#1616)
barrasso Dec 1, 2021
1f6dd63
Fix duplicate fee reporting on WrapperFactory (#1617)
dbeal-eth Dec 3, 2021
e1cdc23
Merge branch 'master' into develop
jjgonecrypto Dec 3, 2021
437f62f
SIP-194 Fix Liquidations on L2 (#1621)
jjgonecrypto Dec 7, 2021
92fe9e7
Fix broken unit test (#1622)
jjgonecrypto Dec 8, 2021
af2813c
Ensuring job-compile size check matches build command (#1628)
jjgonecrypto Dec 9, 2021
b898b4e
Adding exchange gas usage output
jjgonecrypto Dec 13, 2021
f734d9a
Adding gas output to synth issue, burn and claim in int tests
jjgonecrypto Dec 13, 2021
b93863a
SIP-188: Add sETHBTC synth (#1618)
barrasso Dec 13, 2021
828c24e
SIP-195: L2 CollateralEth Loans (#1632)
barrasso Dec 15, 2021
4513b16
Merge branch 'master' into develop
jjgonecrypto Dec 15, 2021
4c981ba
Sip 196 remove internal oracle (#1636)
artdgn Dec 22, 2021
61eca39
add liquidation tests in integration (#1625)
dbeal-eth Dec 30, 2021
a88b2ee
use new `hardhat-interact` package instead of builtin (#1612)
dbeal-eth Jan 10, 2022
d34061c
fix liquidations fork test fail (#1646)
dbeal-eth Jan 11, 2022
54a9c52
SIP-193 Reduce size for SystemSettings (#1627)
leckylao Jan 13, 2022
2d56244
Update configuration of loan and system settings (#1637)
barrasso Jan 13, 2022
ab736f0
SIP-200: Fix FeePool Rewards Distribution (#1650)
barrasso Jan 14, 2022
5a5f6f6
migration script helper allows deployment and staging of migration sc…
dbeal-eth Jan 14, 2022
9adafe3
Merge branch 'master' into develop
jjgonecrypto Jan 19, 2022
ccda4a7
SIP-184 Dynamic Fees (#1649)
artdgn Jan 20, 2022
b3012b0
Deploy SNX/ETH and sUSD/DAI staking rewards on OVM (#1653)
jacko125 Jan 21, 2022
702dc30
remove old RewardEscrow from deployment.json for ovm environments (#1…
barrasso Jan 21, 2022
6b7655e
Update kovan-ovm/feeds.json for OCR (#1659)
barrasso Jan 21, 2022
84ab991
Update feeds.json for kovan ovm with new OCR proxies (#1664)
barrasso Jan 25, 2022
69bb32a
Optimism Forking with Hardhat (#1656)
dbeal-eth Jan 26, 2022
74e1b11
Remove legacy deployment config from kovan-ovm (#1665)
barrasso Jan 27, 2022
e6ce2b7
Upgrade Gnosis SDK (#1655)
noahlitvin Jan 27, 2022
9f38be7
SIPS 196, 193, 184 - audit fixes, full version (#1661)
artdgn Jan 27, 2022
e53c9c0
fix test lints (#1607)
dbeal-eth Jan 28, 2022
a265c9d
update migration script to also stage nominations (#1670)
dbeal-eth Feb 1, 2022
78c2622
Merge branch 'master' into develop
jjgonecrypto Feb 3, 2022
18af676
Removing redundant ExchangeRatesWithInversePricing
jjgonecrypto Feb 3, 2022
6038c76
Ensuring fork tests do compile (#1679)
jjgonecrypto Feb 3, 2022
f15cdbc
Sip 185 debt shares (#1601)
dbeal-eth Feb 4, 2022
3cb6efb
Fix the validate deployment CI run (#1680)
jjgonecrypto Feb 4, 2022
204b13b
Removing the redundant owner param from migrations (#1681)
jjgonecrypto Feb 4, 2022
9652047
Collecting Test Metadata in CI (#1683)
noahlitvin Feb 4, 2022
74acf14
SIP-209 Update feeRateForExchange function signature (#1686)
barrasso Feb 5, 2022
d5a336a
Merge branch 'master' into develop
jjgonecrypto Feb 7, 2022
24acb9c
Updating task-node to properly manage the provider
jjgonecrypto Feb 8, 2022
3b109b4
Basic npm audit fix (#1693)
jjgonecrypto Feb 9, 2022
5e25a0b
Merge branch 'master' into develop
jjgonecrypto Feb 9, 2022
86fed3d
Updating mainnet-ovm feeds to new chainlink OCR (#1645)
jjgonecrypto Feb 14, 2022
bba9562
add moar releases (#1698)
barrasso Feb 14, 2022
a52bdaa
Merge branch 'master' into develop
jjgonecrypto Feb 14, 2022
7903058
Fixing ABI anomaly for kovan-ovm for exchangeWithVirtual
jjgonecrypto Feb 16, 2022
d3025fa
Merge branch 'master' into develop
jjgonecrypto Feb 17, 2022
8998026
AIP-202 - Upgrade supply schedule to use target ratio inflation amoun…
jacko125 Feb 18, 2022
ce9aca0
add release
jacko125 Feb 18, 2022
b70a891
release hamal
jacko125 Feb 18, 2022
a366b78
hamal release v2.62 kovan
jacko125 Feb 18, 2022
5af44ff
Merge branch 'staging' into hamal-release-v2.62
jacko125 Feb 18, 2022
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
114 changes: 42 additions & 72 deletions contracts/SupplySchedule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,23 @@ contract SupplySchedule is Owned, ISupplySchedule {
using SafeDecimalMath for uint;
using Math for uint;

bytes32 public constant CONTRACT_NAME = "SupplySchedule";

// Time of the last inflation supply mint event
uint public lastMintEvent;

// Counter for number of weeks since the start of supply inflation
uint public weekCounter;

uint public constant INFLATION_START_DATE = 1551830400; // 2019-03-06T00:00:00+00:00

// The number of SNX rewarded to the caller of Synthetix.mint()
uint public minterReward = 200 * SafeDecimalMath.unit();
uint public minterReward = 100 * 1e18;

// The initial weekly inflationary supply is 75m / 52 until the start of the decay rate.
// 75e6 * SafeDecimalMath.unit() / 52
uint public constant INITIAL_WEEKLY_SUPPLY = 1442307692307692307692307;
// The number of SNX minted per week
uint public inflationAmount;

uint public maxInflationAmount = 3e6 * 1e18; // max inflation amount 3,000,000

// Address of the SynthetixProxy for the onlySynthetix modifier
address payable public synthetixProxy;
Expand All @@ -41,16 +46,7 @@ contract SupplySchedule is Owned, ISupplySchedule {
// How long each inflation period is before mint can be called
uint public constant MINT_PERIOD_DURATION = 1 weeks;

uint public constant INFLATION_START_DATE = 1551830400; // 2019-03-06T00:00:00+00:00
uint public constant MINT_BUFFER = 1 days;
uint8 public constant SUPPLY_DECAY_START = 40; // Week 40
uint8 public constant SUPPLY_DECAY_END = 234; // Supply Decay ends on Week 234 (inclusive of Week 234 for a total of 195 weeks of inflation decay)

// Weekly percentage decay of inflationary supply from the first 40 weeks of the 75% inflation rate
uint public constant DECAY_RATE = 12500000000000000; // 1.25% weekly

// Percentage growth of terminal supply per annum
uint public constant TERMINAL_SUPPLY_RATE_ANNUAL = 25000000000000000; // 2.5% pa

constructor(
address _owner,
Expand All @@ -73,65 +69,12 @@ contract SupplySchedule is Owned, ISupplySchedule {
return totalAmount;
}

uint remainingWeeksToMint = weeksSinceLastIssuance();

uint currentWeek = weekCounter;

// Calculate total mintable supply from exponential decay function
// The decay function stops after week 234
while (remainingWeeksToMint > 0) {
currentWeek++;

if (currentWeek < SUPPLY_DECAY_START) {
// If current week is before supply decay we add initial supply to mintableSupply
totalAmount = totalAmount.add(INITIAL_WEEKLY_SUPPLY);
remainingWeeksToMint--;
} else if (currentWeek <= SUPPLY_DECAY_END) {
// if current week before supply decay ends we add the new supply for the week
// diff between current week and (supply decay start week - 1)
uint decayCount = currentWeek.sub(SUPPLY_DECAY_START - 1);

totalAmount = totalAmount.add(tokenDecaySupplyForWeek(decayCount));
remainingWeeksToMint--;
} else {
// Terminal supply is calculated on the total supply of Synthetix including any new supply
// We can compound the remaining week's supply at the fixed terminal rate
uint totalSupply = IERC20(synthetixProxy).totalSupply();
uint currentTotalSupply = totalSupply.add(totalAmount);

totalAmount = totalAmount.add(terminalInflationSupply(currentTotalSupply, remainingWeeksToMint));
remainingWeeksToMint = 0;
}
}
// Get total amount to mint * by number of weeks to mint
totalAmount = inflationAmount.mul(weeksSinceLastIssuance());

return totalAmount;
}

/**
* @return A unit amount of decaying inflationary supply from the INITIAL_WEEKLY_SUPPLY
* @dev New token supply reduces by the decay rate each week calculated as supply = INITIAL_WEEKLY_SUPPLY * ()
*/
function tokenDecaySupplyForWeek(uint counter) public pure returns (uint) {
// Apply exponential decay function to number of weeks since
// start of inflation smoothing to calculate diminishing supply for the week.
uint effectiveDecay = (SafeDecimalMath.unit().sub(DECAY_RATE)).powDecimal(counter);
uint supplyForWeek = INITIAL_WEEKLY_SUPPLY.multiplyDecimal(effectiveDecay);

return supplyForWeek;
}

/**
* @return A unit amount of terminal inflation supply
* @dev Weekly compound rate based on number of weeks
*/
function terminalInflationSupply(uint totalSupply, uint numOfWeeks) public pure returns (uint) {
// rate = (1 + weekly rate) ^ num of weeks
uint effectiveCompoundRate = SafeDecimalMath.unit().add(TERMINAL_SUPPLY_RATE_ANNUAL.div(52)).powDecimal(numOfWeeks);

// return Supply * (effectiveRate - 1) for extra supply to issue based on number of weeks
return totalSupply.multiplyDecimal(effectiveCompoundRate.sub(SafeDecimalMath.unit()));
}

/**
* @dev Take timeDiff in seconds (Dividend) and MINT_PERIOD_DURATION as (Divisor)
* @return Calculate the numberOfWeeks since last mint rounded down to 1 week
Expand Down Expand Up @@ -161,8 +104,9 @@ contract SupplySchedule is Owned, ISupplySchedule {
* week counter for the number of weeks minted (probabaly always 1)
* and store the time of the event.
* @param supplyMinted the amount of SNX the total supply was inflated by.
* @return minterReward the amount of SNX reward for caller
* */
function recordMintEvent(uint supplyMinted) external onlySynthetix returns (bool) {
function recordMintEvent(uint supplyMinted) external onlySynthetix returns (uint) {
uint numberOfWeeksIssued = weeksSinceLastIssuance();

// add number of weeks minted to weekCounter
Expand All @@ -173,9 +117,11 @@ contract SupplySchedule is Owned, ISupplySchedule {
lastMintEvent = INFLATION_START_DATE.add(weekCounter.mul(MINT_PERIOD_DURATION)).add(MINT_BUFFER);

emit SupplyMinted(supplyMinted, numberOfWeeksIssued, lastMintEvent, now);
return true;
return minterReward;
}

// ========== SETTERS ========== */

/**
* @notice Sets the reward amount of SNX for the caller of the public
* function Synthetix.mint().
Expand All @@ -189,8 +135,6 @@ contract SupplySchedule is Owned, ISupplySchedule {
emit MinterRewardUpdated(minterReward);
}

// ========== SETTERS ========== */

/**
* @notice Set the SynthetixProxy should it ever change.
* SupplySchedule requires Synthetix address as it has the authority
Expand All @@ -202,6 +146,22 @@ contract SupplySchedule is Owned, ISupplySchedule {
emit SynthetixProxyUpdated(synthetixProxy);
}

/**
* @notice Set the weekly inflationAmount.
* Protocol DAO sets the amount based on the target staking ratio
* Will be replaced with on-chain calculation of the staking ratio
* */
function setInflationAmount(uint amount) external onlyOwner {
require(amount <= maxInflationAmount, "Amount above maximum inflation");
inflationAmount = amount;
emit InflationAmountUpdated(inflationAmount);
}

function setMaxInflationAmount(uint amount) external onlyOwner {
maxInflationAmount = amount;
emit MaxInflationAmountUpdated(inflationAmount);
}

// ========== MODIFIERS ==========

/**
Expand All @@ -226,6 +186,16 @@ contract SupplySchedule is Owned, ISupplySchedule {
* */
event MinterRewardUpdated(uint newRewardAmount);

/**
* @notice Emitted when the Inflation amount is updated
* */
event InflationAmountUpdated(uint newInflationAmount);

/**
* @notice Emitted when the max Inflation amount is updated
* */
event MaxInflationAmountUpdated(uint newInflationAmount);

/**
* @notice Emitted when setSynthetixProxy is called changing the Synthetix Proxy address
* */
Expand Down
7 changes: 4 additions & 3 deletions contracts/Synthetix.sol
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ contract Synthetix is BaseSynthetix {
uint supplyToMint = _supplySchedule.mintableSupply();
require(supplyToMint > 0, "No supply is mintable");

emitTransfer(address(0), address(this), supplyToMint);

// record minting event before mutation to token supply
_supplySchedule.recordMintEvent(supplyToMint);
uint minterReward = _supplySchedule.recordMintEvent(supplyToMint);

// Set minted SNX balance to RewardEscrow's balance
// Minus the minterReward and set balance of minter to add reward
uint minterReward = _supplySchedule.minterReward();
// Get the remainder
uint amountToDistribute = supplyToMint.sub(minterReward);

// Set the token balance to the RewardsDistribution contract
Expand All @@ -162,6 +162,7 @@ contract Synthetix is BaseSynthetix {
tokenState.setBalanceOf(msg.sender, tokenState.balanceOf(msg.sender).add(minterReward));
emitTransfer(address(this), msg.sender, minterReward);

// Increase total supply by minted amount
totalSupply = totalSupply.add(supplyToMint);

return true;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ISupplySchedule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ interface ISupplySchedule {
function minterReward() external view returns (uint);

// Mutative functions
function recordMintEvent(uint supplyMinted) external returns (bool);
function recordMintEvent(uint supplyMinted) external returns (uint);
}
127 changes: 127 additions & 0 deletions contracts/migrations/Migration_Hamal.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
pragma solidity ^0.5.16;

import "../BaseMigration.sol";
import "../AddressResolver.sol";
import "../ProxyERC20.sol";
import "../TokenState.sol";
import "../RewardEscrow.sol";
import "../SupplySchedule.sol";
import "../RewardsDistribution.sol";

interface ISynthetixNamedContract {
// solhint-disable func-name-mixedcase
function CONTRACT_NAME() external view returns (bytes32);
}

// solhint-disable contract-name-camelcase
contract Migration_Hamal is BaseMigration {
// https://kovan.etherscan.io/address/0x73570075092502472E4b61A7058Df1A4a1DB12f2;
address public constant OWNER = 0x73570075092502472E4b61A7058Df1A4a1DB12f2;

// ----------------------------
// EXISTING SYNTHETIX CONTRACTS
// ----------------------------

// https://kovan.etherscan.io/address/0x84f87E3636Aa9cC1080c07E6C61aDfDCc23c0db6
AddressResolver public constant addressresolver_i = AddressResolver(0x84f87E3636Aa9cC1080c07E6C61aDfDCc23c0db6);
// https://kovan.etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F
ProxyERC20 public constant proxysynthetix_i = ProxyERC20(0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F);
// https://kovan.etherscan.io/address/0x46824bFAaFd049fB0Af9a45159A88e595Bbbb9f7
TokenState public constant tokenstatesynthetix_i = TokenState(0x46824bFAaFd049fB0Af9a45159A88e595Bbbb9f7);
// https://kovan.etherscan.io/address/0x8c6680412e914932A9abC02B6c7cbf690e583aFA
RewardEscrow public constant rewardescrow_i = RewardEscrow(0x8c6680412e914932A9abC02B6c7cbf690e583aFA);
// https://kovan.etherscan.io/address/0xd30F2EB31348DD03FC7a77130BbF66318a195c1E
SupplySchedule public constant supplyschedule_i = SupplySchedule(0xd30F2EB31348DD03FC7a77130BbF66318a195c1E);
// https://kovan.etherscan.io/address/0xD29160e4f5D2e5818041f9Cd9192853BA349c47E
RewardsDistribution public constant rewardsdistribution_i =
RewardsDistribution(0xD29160e4f5D2e5818041f9Cd9192853BA349c47E);

// ----------------------------------
// NEW CONTRACTS DEPLOYED TO BE ADDED
// ----------------------------------

// https://kovan.etherscan.io/address/0xAa1Cc6433be4EB877a4b5C087c95f5004e640F19
address public constant new_Synthetix_contract = 0xAa1Cc6433be4EB877a4b5C087c95f5004e640F19;
// https://kovan.etherscan.io/address/0xd30F2EB31348DD03FC7a77130BbF66318a195c1E
address public constant new_SupplySchedule_contract = 0xd30F2EB31348DD03FC7a77130BbF66318a195c1E;

constructor() public BaseMigration(OWNER) {}

function contractsRequiringOwnership() public pure returns (address[] memory contracts) {
contracts = new address[](6);
contracts[0] = address(addressresolver_i);
contracts[1] = address(proxysynthetix_i);
contracts[2] = address(tokenstatesynthetix_i);
contracts[3] = address(rewardescrow_i);
contracts[4] = address(supplyschedule_i);
contracts[5] = address(rewardsdistribution_i);
}

function migrate() external onlyOwner {
require(
ISynthetixNamedContract(new_Synthetix_contract).CONTRACT_NAME() == "Synthetix",
"Invalid contract supplied for Synthetix"
);

// ACCEPT OWNERSHIP for all contracts that require ownership to make changes
acceptAll();

// MIGRATION
// Import all new contracts into the address resolver;
addressresolver_importAddresses_0();
// Rebuild the resolver caches in all MixinResolver contracts - batch 1;
addressresolver_rebuildCaches_1();
// Ensure the SNX proxy has the correct Synthetix target set;
proxysynthetix_i.setTarget(Proxyable(new_Synthetix_contract));
// Ensure the Synthetix contract can write to its TokenState contract;
tokenstatesynthetix_i.setAssociatedContract(new_Synthetix_contract);
// Ensure the legacy RewardEscrow contract is connected to the Synthetix contract;
rewardescrow_i.setSynthetix(ISynthetix(new_Synthetix_contract));
// Ensure the SupplySchedule is connected to the SNX proxy for reading;
supplyschedule_i.setSynthetixProxy(ISynthetix(0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F));
// Ensure the RewardsDistribution has Synthetix set as its authority for distribution;
rewardsdistribution_i.setAuthority(new_Synthetix_contract);

// NOMINATE OWNERSHIP back to owner for aforementioned contracts
nominateAll();
}

function acceptAll() internal {
address[] memory contracts = contractsRequiringOwnership();
for (uint i = 0; i < contracts.length; i++) {
Owned(contracts[i]).acceptOwnership();
}
}

function nominateAll() internal {
address[] memory contracts = contractsRequiringOwnership();
for (uint i = 0; i < contracts.length; i++) {
returnOwnership(contracts[i]);
}
}

function addressresolver_importAddresses_0() internal {
bytes32[] memory addressresolver_importAddresses_names_0_0 = new bytes32[](2);
addressresolver_importAddresses_names_0_0[0] = bytes32("Synthetix");
addressresolver_importAddresses_names_0_0[1] = bytes32("SupplySchedule");
address[] memory addressresolver_importAddresses_destinations_0_1 = new address[](2);
addressresolver_importAddresses_destinations_0_1[0] = address(new_Synthetix_contract);
addressresolver_importAddresses_destinations_0_1[1] = address(new_SupplySchedule_contract);
addressresolver_i.importAddresses(
addressresolver_importAddresses_names_0_0,
addressresolver_importAddresses_destinations_0_1
);
}

function addressresolver_rebuildCaches_1() internal {
MixinResolver[] memory addressresolver_rebuildCaches_destinations_1_0 = new MixinResolver[](7);
addressresolver_rebuildCaches_destinations_1_0[0] = MixinResolver(0x64ac15AB583fFfA6a7401B83E3aA5cf4Ad1aA92A);
addressresolver_rebuildCaches_destinations_1_0[1] = MixinResolver(0x9880cfA7B81E8841e216ebB32687A2c9551ae333);
addressresolver_rebuildCaches_destinations_1_0[2] = MixinResolver(0x3cc158e3D4412311166D74e8BeE1411Cda58c8A3);
addressresolver_rebuildCaches_destinations_1_0[3] = MixinResolver(0xD0B60E2FAb47e703ffa0da7364Efb9536C430912);
addressresolver_rebuildCaches_destinations_1_0[4] = MixinResolver(0xBBfAd9112203b943f26320B330B75BABF6e2aF2a);
addressresolver_rebuildCaches_destinations_1_0[5] = MixinResolver(0xD134Db47DDF5A6feB245452af17cCAf92ee53D3c);
addressresolver_rebuildCaches_destinations_1_0[6] = MixinResolver(new_Synthetix_contract);
addressresolver_i.rebuildCaches(addressresolver_rebuildCaches_destinations_1_0);
}
}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const constants = {
ZERO_ADDRESS: '0x' + '0'.repeat(40),
ZERO_BYTES32: '0x' + '0'.repeat(64),

inflationStartTimestampInSecs: 1551830400, // 2019-03-06T00:00:00Z
inflationStartTimestampInSecs: 1551830400, // 2019-03-06T00:00:00+00:00
};

const knownAccounts = {
Expand Down
Loading