This file contains 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
/****************************************************************************** | |
MERKLE PROOF | |
******************************************************************************* | |
EXAMPLE 1: (as a regular indexed tree) | |
,---0 = 0000 0000 0000 0000 // LVL_0 : 0 + 2 * 0 (chunk 0) | |
,---1 = 0000 0000 0000 0001 // LVL_1 : 1 + 4 * 0 (chunk 1) | |
| `---2 = 0000 0000 0000 0010 // LVL_0 : 0 + 2 * 1 (chunk 2) | |
| | |
,---3 = 0000 0000 0000 0011 // LVL_2 : 3 + 8 * 0 (chunk 3) |
This file contains 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.25; | |
contract Escrow { | |
address public buyer; | |
address public seller; | |
address public arbiter; | |
uint256 public escrowAmount; | |
constructor(address _buyer, address _arbiter, uint256 _escrowAmount) public { |
This file contains 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.25; | |
contract Escrow { | |
address public buyer; | |
address public seller; | |
address public arbiter; | |
uint256 public escrowAmount; | |
constructor(address _buyer, address _arbiter, uint256 _escrowAmount) public { |
This file contains 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.25; | |
contract Escrow { | |
address public buyer; | |
address public seller; | |
address public arbiter; | |
uint256 public escrowAmount; | |
constructor(address _buyer, address _arbiter, uint256 _escrowAmount) public { |
This file contains 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.25; | |
contract Escrow { | |
address public buyer; | |
address public seller; | |
address public arbiter; | |
uint256 public escrowAmount; | |
constructor(address _buyer, address _arbiter, uint256 _escrowAmount) public { |
This file contains 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
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol"; | |
import "gist/Ballot.sol"; | |
contract AwardToken is MintableToken { | |
uint quantity; | |
uint ballotPeriod = 7 hours; | |
Ballot public currBallot; | |
address[] public prevWinners; | |
event log (string _msg); | |
event winLog (address _win); |
This file contains 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
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol"; | |
import "gist/Ballot.sol"; | |
contract AwardToken is MintableToken { | |
uint quantity; | |
uint ballotPeriod = 7 hours; | |
Ballot public currBallot; | |
address[] public prevWinners; | |
event log (string _msg); | |
event winLog (address _win); |
This file contains 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
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol"; | |
import "gist/Ballot.sol"; | |
contract AwardToken is MintableToken { | |
uint quantity; | |
uint ballotPeriod = 7 hours; | |
Ballot public currBallot; | |
address[] public prevWinners; | |
event log (string _msg); | |
event winLog (address _win); |
This file contains 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
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol"; | |
import "gist/Ballot.sol"; | |
contract AwardToken is MintableToken { | |
uint quantity; | |
uint ballotPeriod = 7 hours; | |
Ballot public currBallot; | |
address[] public prevWinners; | |
event log (string _msg); | |
event winLog (address _win); |
This file contains 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
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol"; | |
import "gist/Ballot.sol"; | |
contract AwardToken is MintableToken { | |
uint quantity; | |
uint ballotPeriod = 7 hours; | |
Ballot public currBallot; | |
address[] public prevWinners; | |
event log (string _msg); | |
event winLog (address _win); |
NewerOlder