Search
⌃K

Bridge

GEN Bridge is to serve as a connecting bridge that allows projects active in blockchain networks other than the Ethereum network to settle into the Pinetree Space platform more quickly and reliably. The Bridge is validated for security by GEN Protocol's Gate Keeper and settled in Pinetree Space, and the ecosystem can then be expanded by utilizing the platform's low network fees. Through this, projects operating in multiple blockchain networks can use Pinetree Space to reduce costs and receive infrastructure services that can expand the ecosystem even if a separate platform does not exist.

Concept:

Process:

  1. 1.
    Pinetree Space Bridge uses GEN Bridge. GEN Bridge allows to send Ethereum mainnet based coins to GEN Protocol.
  2. 2.
    When a user sends an Ethereum mainnet GEN token (0xBBB) to the Bridge contract, the amount is locked in the MAINNET Bridge contract (0xAAA).
  3. 3.
    The locked quantity is propagated to the EVM logging event, and the Gate Keeper who confirms this signs the quantity and broadcasts it to the GEN Protocol, and when 2/3 of the lock is verified, the Bridge sends gGEN (0xDDD) is transmitted.
const MAINNET = {
bridge: "0xAAA",
peg: "0xBBB"
};
const GEN_PROTOCOL = {
bridge: "0xCCC",
peg: "0xDDD"
};

Setup

Add Generation Protocol to Metamask

RPC URL: https://testnet-rpc-seoul.gen.foundation
Chain ID: 8002
Symbol: GEN
Explorer: https://dev-explorer.gen.foundation

Faucet for Generation Protocol (0.1 GEN)

http://13.209.144.69:3333/faucet/{address}

Bridge Address

GEN(Ropsten) Bridge Address: 0xb01Def579598e28b654D422C95DD44932aa27Cc7
GEN(Generation) Bridge Address: 0xB2e8906A40602B76271c6E4FFa0b65c19e86C6Fb

Run a Gate Keeper locally

$ gatekeeper --help
gatekeeper description...
Usage:
gatekeeper [OPTIONS] --help
OR
gatekeeper [OPTIONS] <input>...
gatekeeper [OPTIONS]:
--version Prints version of this command.
--help Prints help text for this command.
-c, --create Create a Gate Keeper
ARGUMENTS:
input=ARG+ List of input variables to be a Gate Keeper.
$ gatekeeper run

Register Gate Keeper

$ gatekeeper --create "Reward Address" "Super Keeper" "https://www.superkeeper.com" "We are super gate keeper!" "0.1" "0.1"
### Success to register: 0x716db06936b3f1c0c780c9f8db39c1d5bb077b1ba2c015e2cd473bcfb00fd94b

Generation to Ethereum bridge

Report a Deposit

# $ gatekeeper report "{txhash}" "{from}" "{value}" "{from Chain}" "{to chain}" "{from token contract}" "{to token contract}"
$ gatekeeper report "0x716db06936b3f1c0c780c9f8db39c1d5bb077b1ba2c015e2cd473bcfb00fd94b" "{from}" "{value}" "ethereum" "generation" "0x3323880E5b8fE8b6E8159A0460D9E259f18F8a5c" "native"

Ethereum to Generation bridge

# $ gatekeeper report "{txhash}" "{from}" "{value}" "{from Chain}" "{to chain}" "{token contract}"
$ gatekeeper report "0xc4f4c5314051791df021e189799f7f14c4aa2b8fcb6f58909b15c2e94c3ded82" "{from}" "{value}" "generation" "ethereum" "native" "0x3323880E5b8fE8b6E8159A0460D9E259f18F8a5c"
Last modified 4mo ago