Skip to content

Commit

Permalink
Merge pull request #89 from Augmint/delegate_txs
Browse files Browse the repository at this point in the history
Delegated txs (migration scripts for post review)
  • Loading branch information
Peter Petrovics authored May 12, 2018
2 parents 788ac41 + b5f6106 commit a2f6b11
Show file tree
Hide file tree
Showing 48 changed files with 4,268 additions and 255 deletions.
787 changes: 787 additions & 0 deletions abiniser/abis/TokenAEur_ABI_4b49e7e6d1a9a2de81a4d2d088acbc04.json

Large diffs are not rendered by default.

795 changes: 795 additions & 0 deletions abiniser/abis/TokenAEur_ABI_6b1597192b36a746724929ec9ee7b6b8.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion abiniser/deployments/4/Exchange_DEPLOYS.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion abiniser/deployments/4/LoanManager_DEPLOYS.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion abiniser/deployments/4/Locker_DEPLOYS.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion abiniser/deployments/4/MonetarySupervisor_DEPLOYS.json

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion abiniser/deployments/4/TokenAEur_DEPLOYS.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contractName": "TokenAEur",
"latestAbiHash": "d7dd02520f2d92b2ca237f066cf2488d",
"latestAbiHash": "4b49e7e6d1a9a2de81a4d2d088acbc04",
"deployedAbis": {
"27721a2c77dc40da7639abd46791c3d7": {
"latestDeployedAddress": "0x95aa79d7410eb60f49bfd570b445836d402bd7b1",
Expand Down Expand Up @@ -53,6 +53,24 @@
"source": "/* Augmint Crypto Euro token (ACE) implementation */\npragma solidity ^0.4.23;\nimport \"./interfaces/TransferFeeInterface.sol\";\nimport \"./generic/AugmintToken.sol\";\n\n\ncontract TokenAEur is AugmintToken {\n constructor(TransferFeeInterface _feeAccount)\n public AugmintToken(\"Augmint Crypto Euro\", \"AEUR\", \"EUR\", 2, _feeAccount)\n {} // solhint-disable-line no-empty-blocks\n\n}\n"
}
}
},
"4b49e7e6d1a9a2de81a4d2d088acbc04": {
"latestDeployedAddress": "0x6c90c10d7a33815c2baeed66ee8b848f1d95268e",
"deployments": {
"0x6c90c10d7a33815c2baeed66ee8b848f1d95268e": {
"generatedAt": "2018-05-12T01:34:38.456Z",
"truffleContractFileUpdatedAt": "2018-05-12T01:30:50.031Z",
"deployTransactionHash": "0xf45e9817fca468b5438d7a00a6461fd47e14cf04f1bb4b36ccc7302284ec39c5",
"compiler": {
"name": "solc",
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
},
"bytecodeHash": "042675fc70cfed8762b1e7de8d15799f",
"deployedBytecodeHash": "03b0c0d8c49d83af34516ac82bc0b2a9",
"sourceHash": "61dded7836f4431e621382340f32670c",
"source": "/* Augmint Crypto Euro token (ACE) implementation */\npragma solidity ^0.4.23;\nimport \"./interfaces/TransferFeeInterface.sol\";\nimport \"./generic/AugmintToken.sol\";\n\n\ncontract TokenAEur is AugmintToken {\n constructor(TransferFeeInterface _feeAccount)\n public AugmintToken(\"Augmint Crypto Euro\", \"AEUR\", \"EUR\", 2, _feeAccount)\n {} // solhint-disable-line no-empty-blocks\n\n}\n"
}
}
}
}
}
15 changes: 14 additions & 1 deletion abiniser/deployments/999/AugmintReserves_DEPLOYS.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"33995f203f6c629e9916d82dd78e875f": {
"latestDeployedAddress": "0x56ad79460db45ac29cb672b1914e30c5ffa4e38e",
"latestDeployedAddress": "0xf4ab8fd7af56fb99e7bf5e5edc0b407da530a4f4",
"deployments": {
"0x56ad79460db45ac29cb672b1914e30c5ffa4e38e": {
"generatedAt": "2018-04-26T01:54:21.104Z",
Expand All @@ -34,6 +34,19 @@
"deployedBytecodeHash": "b8d26b4b6589916289f69078a09536aa",
"sourceHash": "c3fd200d4510ea1b3d7c6c7ae04683b9",
"source": "/* Contract to hold Augmint reserves (ETH & Token)\n - ETH as regular ETH balance of the contract\n - ERC20 token reserve (stored as regular Token balance under the contract address)\n\nNB: reserves are held under the contract address, therefore any transaction on the reserve is limited to the\n tx-s defined here (i.e. transfer is not allowed even by the contract owner or MonetaryBoard or MonetarySupervisor)\n\n */\n\npragma solidity ^0.4.23;\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/AugmintTokenInterface.sol\";\n\n\ncontract AugmintReserves is SystemAccount {\n\n function () public payable { // solhint-disable-line no-empty-blocks\n // to accept ETH sent into reserve (from defaulted loan's collateral )\n }\n\n function burn(AugmintTokenInterface augmintToken, uint amount) external restrict(\"MonetarySupervisorContract\") {\n augmintToken.burn(amount);\n }\n\n}\n"
},
"0xf4ab8fd7af56fb99e7bf5e5edc0b407da530a4f4": {
"generatedAt": "2018-05-12T00:22:15.136Z",
"truffleContractFileUpdatedAt": "2018-05-12T00:22:05.945Z",
"deployTransactionHash": "0xfd91f3b00fe09f5c641919e0de3dac8645d5e460fa53f4151458fe3fa540d864",
"compiler": {
"name": "solc",
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
},
"bytecodeHash": "380f5b0d9fdbaed55c151dfd0f5f78c4",
"deployedBytecodeHash": "a707a4a1296cb1140d4610935ad58f8c",
"sourceHash": "c3fd200d4510ea1b3d7c6c7ae04683b9",
"source": "/* Contract to hold Augmint reserves (ETH & Token)\n - ETH as regular ETH balance of the contract\n - ERC20 token reserve (stored as regular Token balance under the contract address)\n\nNB: reserves are held under the contract address, therefore any transaction on the reserve is limited to the\n tx-s defined here (i.e. transfer is not allowed even by the contract owner or MonetaryBoard or MonetarySupervisor)\n\n */\n\npragma solidity ^0.4.23;\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/AugmintTokenInterface.sol\";\n\n\ncontract AugmintReserves is SystemAccount {\n\n function () public payable { // solhint-disable-line no-empty-blocks\n // to accept ETH sent into reserve (from defaulted loan's collateral )\n }\n\n function burn(AugmintTokenInterface augmintToken, uint amount) external restrict(\"MonetarySupervisorContract\") {\n augmintToken.burn(amount);\n }\n\n}\n"
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion abiniser/deployments/999/Exchange_DEPLOYS.json

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion abiniser/deployments/999/FeeAccount_DEPLOYS.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"dd4594a936e439aa46ed5b06cb69eafa": {
"latestDeployedAddress": "0xb0a2a8e846b66c7384f52635cecef5280f766c8b",
"latestDeployedAddress": "0xbed57eb0b4232da0cddd3c9c27490fc0759e0a01",
"deployments": {
"0xb0a2a8e846b66c7384f52635cecef5280f766c8b": {
"generatedAt": "2018-04-26T01:54:21.110Z",
Expand All @@ -34,6 +34,19 @@
"deployedBytecodeHash": "d64b9e9eed98c75afb9cbf0d9a709fd5",
"sourceHash": "fe888fa25a5c364abea5c0856f1ebd5b",
"source": "/* Contract to collect fees from system\n TODO: calculateExchangeFee + Exchange params and setters\n*/\n\npragma solidity ^0.4.23;\nimport \"./generic/SafeMath.sol\";\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/TransferFeeInterface.sol\";\n\n\ncontract FeeAccount is SystemAccount, TransferFeeInterface {\n\n using SafeMath for uint256;\n\n struct TransferFee {\n uint pt; // in parts per million (ppm) , ie. 2,000 = 0.2%\n uint min; // with base unit of augmint token, eg. 2 decimals for token, eg. 310 = 3.1 ACE\n uint max; // with base unit of augmint token, eg. 2 decimals for token, eg. 310 = 3.1 ACE\n }\n\n TransferFee public transferFee;\n\n event TransferFeesChanged(uint transferFeePt, uint transferFeeMin, uint transferFeeMax);\n\n constructor(uint transferFeePt, uint transferFeeMin, uint transferFeeMax) public {\n transferFee = TransferFee(transferFeePt, transferFeeMin, transferFeeMax);\n }\n\n function () public payable { // solhint-disable-line no-empty-blocks\n // to accept ETH sent into feeAccount (defaulting fee in ETH )\n }\n\n function setTransferFees(uint transferFeePt, uint transferFeeMin, uint transferFeeMax)\n external restrict(\"MonetaryBoard\") {\n transferFee = TransferFee(transferFeePt, transferFeeMin, transferFeeMax);\n emit TransferFeesChanged(transferFeePt, transferFeeMin, transferFeeMax);\n }\n\n function calculateTransferFee(address from, address to, uint amount) external view returns (uint256 fee) {\n if (!permissions[from][\"NoFeeTransferContracts\"] && !permissions[to][\"NoFeeTransferContracts\"]) {\n fee = amount.mul(transferFee.pt).div(1000000);\n if (fee > transferFee.max) {\n fee = transferFee.max;\n } else if (fee < transferFee.min) {\n fee = transferFee.min;\n }\n }\n return fee;\n }\n\n function calculateExchangeFee(uint weiAmount) external view returns (uint256 weiFee) {\n /* TODO: to be implemented and use in Exchange.sol. always revert for now */\n require(weiAmount != weiAmount, \"not yet implemented\");\n weiFee = transferFee.max; // to silence compiler warnings until it's implemented\n }\n\n}\n"
},
"0xbed57eb0b4232da0cddd3c9c27490fc0759e0a01": {
"generatedAt": "2018-05-12T00:22:15.150Z",
"truffleContractFileUpdatedAt": "2018-05-12T00:22:12.418Z",
"deployTransactionHash": "0x30eed67ceb1c3ebd5c235da1cf58a490de7a95f6c7fe90998b60184e254bbc42",
"compiler": {
"name": "solc",
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
},
"bytecodeHash": "7b671216a10bbb9643a8b9f48eabe6ee",
"deployedBytecodeHash": "aaa8149858e7a4fda67a0feeaf2846c5",
"sourceHash": "fe888fa25a5c364abea5c0856f1ebd5b",
"source": "/* Contract to collect fees from system\n TODO: calculateExchangeFee + Exchange params and setters\n*/\n\npragma solidity ^0.4.23;\nimport \"./generic/SafeMath.sol\";\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/TransferFeeInterface.sol\";\n\n\ncontract FeeAccount is SystemAccount, TransferFeeInterface {\n\n using SafeMath for uint256;\n\n struct TransferFee {\n uint pt; // in parts per million (ppm) , ie. 2,000 = 0.2%\n uint min; // with base unit of augmint token, eg. 2 decimals for token, eg. 310 = 3.1 ACE\n uint max; // with base unit of augmint token, eg. 2 decimals for token, eg. 310 = 3.1 ACE\n }\n\n TransferFee public transferFee;\n\n event TransferFeesChanged(uint transferFeePt, uint transferFeeMin, uint transferFeeMax);\n\n constructor(uint transferFeePt, uint transferFeeMin, uint transferFeeMax) public {\n transferFee = TransferFee(transferFeePt, transferFeeMin, transferFeeMax);\n }\n\n function () public payable { // solhint-disable-line no-empty-blocks\n // to accept ETH sent into feeAccount (defaulting fee in ETH )\n }\n\n function setTransferFees(uint transferFeePt, uint transferFeeMin, uint transferFeeMax)\n external restrict(\"MonetaryBoard\") {\n transferFee = TransferFee(transferFeePt, transferFeeMin, transferFeeMax);\n emit TransferFeesChanged(transferFeePt, transferFeeMin, transferFeeMax);\n }\n\n function calculateTransferFee(address from, address to, uint amount) external view returns (uint256 fee) {\n if (!permissions[from][\"NoFeeTransferContracts\"] && !permissions[to][\"NoFeeTransferContracts\"]) {\n fee = amount.mul(transferFee.pt).div(1000000);\n if (fee > transferFee.max) {\n fee = transferFee.max;\n } else if (fee < transferFee.min) {\n fee = transferFee.min;\n }\n }\n return fee;\n }\n\n function calculateExchangeFee(uint weiAmount) external view returns (uint256 weiFee) {\n /* TODO: to be implemented and use in Exchange.sol. always revert for now */\n require(weiAmount != weiAmount, \"not yet implemented\");\n weiFee = transferFee.max; // to silence compiler warnings until it's implemented\n }\n\n}\n"
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion abiniser/deployments/999/InterestEarnedAccount_DEPLOYS.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
},
"72a73972d565bb24463e7368fd263af4": {
"latestDeployedAddress": "0xbbecff5db2f9cccc936895121802fc15053344c6",
"latestDeployedAddress": "0x1b9441428f9e682bab4f9cc70fdf50adcc3411f4",
"deployments": {
"0xbbecff5db2f9cccc936895121802fc15053344c6": {
"generatedAt": "2018-04-26T01:54:21.116Z",
Expand All @@ -46,6 +46,19 @@
"deployedBytecodeHash": "d1c4729a444bfc4abb71e5af98bb6ed2",
"sourceHash": "080bdccd163b74b49fb908b443c45199",
"source": "/* Contract to hold earned interest from loans repaid\n premiums for locks are being accrued (i.e. transferred) to Locker */\n\npragma solidity ^0.4.23;\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/AugmintTokenInterface.sol\";\n\n\ncontract InterestEarnedAccount is SystemAccount {\n\n function transferInterest(AugmintTokenInterface augmintToken, address locker, uint interestAmount)\n external restrict(\"MonetarySupervisorContract\") {\n augmintToken.transfer(locker, interestAmount);\n }\n\n}\n"
},
"0x1b9441428f9e682bab4f9cc70fdf50adcc3411f4": {
"generatedAt": "2018-05-12T00:22:15.155Z",
"truffleContractFileUpdatedAt": "2018-05-12T00:22:09.283Z",
"deployTransactionHash": "0x2cdb7fd6f6500ec39f69a8633af900a2264fe9b6b2696b3f5930af950a708a24",
"compiler": {
"name": "solc",
"version": "0.4.23+commit.124ca40d.Emscripten.clang"
},
"bytecodeHash": "435a1a8da265b92f0ae3fd4eb5089baa",
"deployedBytecodeHash": "f7581b87c6854d5aec16c65f738876d8",
"sourceHash": "080bdccd163b74b49fb908b443c45199",
"source": "/* Contract to hold earned interest from loans repaid\n premiums for locks are being accrued (i.e. transferred) to Locker */\n\npragma solidity ^0.4.23;\nimport \"./generic/SystemAccount.sol\";\nimport \"./interfaces/AugmintTokenInterface.sol\";\n\n\ncontract InterestEarnedAccount is SystemAccount {\n\n function transferInterest(AugmintTokenInterface augmintToken, address locker, uint interestAmount)\n external restrict(\"MonetarySupervisorContract\") {\n augmintToken.transfer(locker, interestAmount);\n }\n\n}\n"
}
}
}
Expand Down
Loading

0 comments on commit a2f6b11

Please sign in to comment.