Skip to content

Instantly share code, notes, and snippets.

View eca20's full-sized avatar

Ed Anderson eca20

  • Blockchainia LLC
  • Pittsburgh, PA
View GitHub Profile
@eca20
eca20 / PittCoin.sol
Created February 14, 2019 18:15
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract PittCoin {
event NewQuestion(uint questionId, string title);
struct User {
string pittUsername;
uint amount;
// uint accountNumber;
}
@eca20
eca20 / PittCoin.sol
Created February 14, 2019 21:28
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.5.4+commit.9549d8ff.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
//interface tokenRecipient {
// function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external;
//}
contract PittCoin {
// Public variables of the token
string public name;
string public symbol;
@eca20
eca20 / ABI.js
Created February 15, 2019 15: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.5.1+commit.c8a2cb62.js&optimize=false&gist=
var PittCoinABI =[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@eca20
eca20 / ABI.js
Created February 15, 2019 15: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.5.1+commit.c8a2cb62.js&optimize=false&gist=
var PittCoinABI =[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@eca20
eca20 / ballot.sol
Created February 22, 2019 21:59
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@eca20
eca20 / PittCoinBeta01.sol
Created February 22, 2019 22:11
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// 'PittCoin' token contract
//
// Deployed to : 0x94d546081A2C829B4a0d8617922a210b078e593e
// Symbol : H2P
// Name : PittCoin
// Total supply : 100000000
// Decimals : 8
@eca20
eca20 / ballot.sol
Created March 15, 2019 04:03
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=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@eca20
eca20 / PittCoinBeta02.sol
Created March 15, 2019 04:03
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=false&gist=
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// 'PittCoin' token contract
//
// Deployed to : 0x85e1A8C0Cf1F2f88Dbd78E2abD603A55308510F8
// Symbol : H2PBeta02
// Name : PittCoin
// Total supply : 1000000000
// Decimals : 0
@eca20
eca20 / erc20-token-sample.sol
Created April 24, 2021 00:48 — forked from jcmartinezdev/erc20-token-sample.sol
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe