Skip to content

Instantly share code, notes, and snippets.

View swiftma's full-sized avatar

老马 swiftma

View GitHub Profile
@swiftma
swiftma / Bridge.sol
Created September 25, 2018 07: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 Bridge {
// message sent to other chains
// srcChain is implicit (this chain), destChain is map key
struct SendMsg {
address srcAddr;
address destAddr;
uint256 value;
@swiftma
swiftma / Bridge.sol
Created September 25, 2018 03: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.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity ^0.4.25;
contract Bridge {
// message sent to other chains
// srcChain is implicit (this chain), destChain is map key
struct SendMsg {
address srcAddr;
address destAddr;
uint256 value;
@swiftma
swiftma / Bridge.sol
Created September 21, 2018 08: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=false&gist=
pragma solidity ^0.4.25;
contract Bridge {
// message sent to other chains
// srcChain is implicit (this chain), destChain is map key
struct SendMsg {
address srcAddr;
address destAddr;
uint256 value;
@swiftma
swiftma / Bridge.sol
Created September 21, 2018 06: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 {
// message sent to other chains
// srcChain is implicit (this chain), destChain is map key
struct SendMsg {
address srcAddr;
address destAddr;
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;
}
@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 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 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 / 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 / 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;