Skip to content

Instantly share code, notes, and snippets.

View swiftma's full-sized avatar

老马 swiftma

View GitHub Profile
@swiftma
swiftma / Core.sol
Created July 31, 2018 04:41
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.8;
import "./dependencies/ERC20.sol";
import {ERC20 as Shares} from "./dependencies/ERC20.sol";
import "./assets/AssetProtocol.sol";
import "./dependencies/Owned.sol";
import "./dependencies/SafeMath.sol";
import "./universe/UniverseProtocol.sol";
import "./participation/SubscribeProtocol.sol";
import "./participation/RedeemProtocol.sol";
@swiftma
swiftma / ERC20.sol
Created July 31, 2018 04:58
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;
import "./ERC20Basic.sol";
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
@swiftma
swiftma / G2Token.sol
Created July 31, 2018 06:22
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=true&gist=
pragma solidity ^0.4.11;
contract G2Token {
string public name = "Dual Genesis"; // token name
string public symbol = "G2"; // token symbol
uint256 public decimals = 6; // token digit
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
@swiftma
swiftma / G2Token.sol
Created July 31, 2018 09:26
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=true&gist=
pragma solidity ^0.4.11;
contract G2Token {
string public name = "Dual Genesis"; // token name
string public symbol = "G2"; // token symbol
uint256 public decimals = 6; // token digit
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
@swiftma
swiftma / G2Token.sol
Created July 31, 2018 11: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.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.11;
contract G2Token {
string public name = "Dual Genesis"; // token name
string public symbol = "G2"; // token symbol
uint256 public decimals = 6; // token digit
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
@swiftma
swiftma / G2Token.sol
Created July 31, 2018 11: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.4.24+commit.e67f0147.js&optimize=true&gist=
pragma solidity ^0.4.11;
contract G2Token {
string public name = "Dual Genesis"; // token name
string public symbol = "G2"; // token symbol
uint256 public decimals = 6; // token digit
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
@swiftma
swiftma / Bridge.sol
Created September 19, 2018 08:48
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.25;
contract Bridge {
struct TransferMsg {
address srcAddr;
string srcChain;
address destAddr;
string destChain;
uint256 value;
@swiftma
swiftma / Bridge.sol
Created September 20, 2018 13:30
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.25;
contract Bridge {
struct TransferMsg {
address srcAddr;
address destAddr;
string destChain;
uint256 value;
}
@swiftma
swiftma / Bridge.sol
Created September 20, 2018 13:41
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.25;
contract Bridge {
struct TransferMsg {
address srcAddr;
address destAddr;
uint256 destChain;
uint256 value;
}
@swiftma
swiftma / Bridge.sol
Created September 21, 2018 01: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=false&gist=
pragma solidity ^0.4.25;
contract Bridge {
struct TransferMsg {
address srcAddr;
address destAddr;
uint256 destChain;
uint256 value;
}