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
pragma solidity ^0.4.8; | |
library itMaps { | |
/*********************** | |
* Iterable maps: | |
* itmapUintUint for uint=>uint maps | |
* itmapAddressUint for address=>uint maps | |
* itmapUintAddress for uint=>address maps | |
* Use: | |
* import "./itmaps.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
pragma solidity ^0.4.8; | |
import "github.com/szerintedmi/solidity-itMapsLib/itMapsLib.sol"; | |
contract GasTest { | |
using itMaps for itMaps.itMapUintUint; | |
using itMaps for itMaps.itMapUintAddress; | |
using itMaps for itMaps.itMapAddressUint; | |
using itMaps for itMaps.itMapUintBool; | |
using GasTestLib for GasTestLib.Game; |
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
0xae653250B4220835050B75D3bC91433246903A95 |
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
0x9aaf197F25d207ecE17DfBeb20780095f7623A23 |
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
pragma solidity ^0.4.18; | |
contract Endowment { | |
address public beneficiary; | |
address public owner; | |
uint public lastRedeem; | |
uint constant public period = 1 minutes; | |
uint public installmentAmount; | |
function Endowment(address _beneficiary, uint _installmentAmount) payable { |
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
pragma solidity ^0.4.18; | |
contract TicketSales { | |
struct Ticket { | |
address ticketHolder; | |
bool used; | |
} | |
enum State { Open, Closed } |
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; |
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
/* 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
Ganache CLI v6.0.3 (ganache-core: 2.0.2) | |
Available Accounts | |
================== | |
(0) 0x52285ef1651fb6ffef9d6aefb9f8f537436521a0 | |
(1) 0xd7ba85e7cd93065f568befa6cd9026b2d02c3112 | |
(2) 0x5d5bba003738e34f9bb6cc9d4b32e4dee6d63d64 | |
(3) 0x161fc689df82500040c733d45fc2dc0b060b2407 | |
(4) 0xebd6121ad829746c57f41285b7c127d47490a830 | |
(5) 0xfbb3eff3c337d2192790cb6477203455f2fdd3fb |
OlderNewer