Skip to content

Instantly share code, notes, and snippets.

View serapath's full-sized avatar
💔
Github was acquired

Alexander Praetorius serapath

💔
Github was acquired
View GitHub Profile
@serapath
serapath / ballot.sol
Created May 3, 2018 00:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@serapath
serapath / AwardToken.sol
Created May 3, 2018 00:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
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);
@serapath
serapath / AwardToken.sol
Created May 3, 2018 07:31
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
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);
@serapath
serapath / AwardToken.sol
Created May 3, 2018 07:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
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);
@serapath
serapath / AwardToken.sol
Created May 3, 2018 07:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
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);
@serapath
serapath / Escrow.sol
Created October 30, 2018 00:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
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 {
@serapath
serapath / Escrow.sol
Created October 30, 2018 00:42
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
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 {
@serapath
serapath / Escrow.sol
Created October 30, 2018 00:47
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
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 {
@serapath
serapath / Escrow.sol
Created October 30, 2018 00:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
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 {
@serapath
serapath / codepen.md
Last active November 19, 2019 17:02
A synchronous `require` function for the browser that downloads and caches modules from npm - just copy & paste it to the dev tools javascript console

use require in a codepen

  1. click on the little icon Open JS Settings on the JavaScript editor pane
  2. Then add the following link under Add External Javascript
https://cdn.rawgit.com/serapath/e2b55cab315e60fbbffea7b43acd8749/raw/29aac6cb7361fb9d8467adee4e0d112961395a95/require.js
  1. Press Save & Close and start using the require(...) in your JavaScript code on codepen