This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* grant permissions & add lock products to new locker contract | |
It sets up the products with different interest rates than in old locker and | |
introduces two new lock products: 90 days and 180 days term | |
NB: once UI is switched over to new locker, products in old locker | |
should be disabled to prevent ppl keep using locker directly | |
*/ | |
pragma solidity 0.4.24; | |
import "../../generic/MultiSig.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
* Execute Rink0004_migrate_MSv0_5_0.sol (already signed by stability board) | |
* and switch to new MS and rates contracts and revoke permissions from old contracts | |
* NB: | |
* - switch contracts can executed from deployer account for now because old contracts didn't have multiSig. | |
* In future these must be set via StabilityBoardProxy, ie. be part of the migrate script | |
******************************************************************************/ | |
const Migrations = artifacts.require("./Migrations.sol"); | |
const Rink0004_migrate_MSv0_5_0 = artifacts.require("./Rink0004_migrate_MSv0_5_0.sol"); | |
const StabilityBoardProxy = artifacts.require("./StabilityBoardProxy.sol"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* script to switch over to latest MonetarySupervisor and Rates contracts | |
must be executed via StabilityBoardProxy | |
NB: additional updates of old contracts are not part of this contract but executed from deployer account because old contracts | |
*/ | |
pragma solidity 0.4.24; | |
import "../../generic/MultiSig.sol"; | |
import "../../TokenAEur.sol"; | |
import "../../MonetarySupervisor.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract StabiltyBoard { | |
address[] allSigners // all signers, even disabled ones | |
mapping(address => bool) isSigner; | |
enum ScriptState { New, Approved, Done , Failed } | |
struct Script { | |
ScriptState state; // do we want to calculate quorum at the time time of approve or execute call ? | |
uint signCount; | |
mapping(address => bool) signedBy; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract StabiltyBoard { | |
address[] allSigners // all signers, even disabled ones | |
mapping(address => bool) isSigner; | |
struct Approvals { | |
bool approved; // do we want to calculate quorum at the time time of approve call | |
// or each time when isApprove called? if latter then no need for this bool | |
uint signCount; | |
mapping(address => bool) signedBy; | |
address[] signers; // do we need revoke? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contractName": "MonetarySupervisor", | |
"latestAbiHash": "7fde219f…", | |
"7fde219f…": { | |
"latestDeployedAddress": "7fde219f…", | |
"deployments": { | |
"7fde219f…": { | |
"generatedAt": "<ISO86901 timestamp>", | |
"truffleContractFileUpdatedAt": "<ISO86901 timestamp when source truffle contracts json was generated>", | |
"deployTransactionHash": "0x12…", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ganache CLI v6.0.3 (ganache-core: 2.0.2) | |
Available Accounts | |
================== | |
(0) 0x52285ef1651fb6ffef9d6aefb9f8f537436521a0 | |
(1) 0xd7ba85e7cd93065f568befa6cd9026b2d02c3112 | |
(2) 0x5d5bba003738e34f9bb6cc9d4b32e4dee6d63d64 | |
(3) 0x161fc689df82500040c733d45fc2dc0b060b2407 | |
(4) 0xebd6121ad829746c57f41285b7c127d47490a830 | |
(5) 0xfbb3eff3c337d2192790cb6477203455f2fdd3fb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Interface for Augmint's internal Exchange | |
TODO: rates setter? | |
TODO: make a rates interface and use it instead? | |
TODO: uint32 for now? | |
*/ | |
pragma solidity 0.4.18; | |
import "../generic/SafeMath.sol"; | |
import "../generic/Restricted.sol"; | |
import "./AugmintTokenInterface.sol"; | |
import "../Rates.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Augmint's internal Exchange | |
TODO: emmit events | |
TODO: deduct fee | |
TODO: minOrderAmount setter | |
*/ | |
pragma solidity 0.4.18; | |
import "./interfaces/ExchangeInterface.sol"; | |
contract Exchange is ExchangeInterface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Generic symbol / WEI rates contract. | |
only callable by trusted price oracles. | |
Being regularly called by a price oracle | |
TODO: trustless/decentrilezed price Oracle | |
TODO: shall we use blockNumber instead of now for lastUpdated? | |
TODO: consider if we need storing rates with variable decimals instead of fixed 4 | |
TODO: could we emit 1 RateChanged event from setMultipleRates (symbols and newrates arrays)? | |
*/ | |
pragma solidity 0.4.18; |