Giter VIP home page Giter VIP logo

alt-insure-token's Introduction

Alt Insure Token

This is the implementation of the Alt Insure Token which represents an cross-chain-bridged INSURE token.

Contracts

AltInsureToken

AltInsureToken is an ERC20 token which is bridged to other chains from Ethereum mainnet. The token is minted when the user locks the INSURE token on the mainnet and is burned when the user unlocks the INSURE token on the mainnet. This contract is upgradeable because it will need extra logic to support more bridges.

AltInsureTokenBase

AltInsureTokenBase is the base contract for AltInsureToken. It contains the logic for minting and burning the token in the manners of various bridges.

Deploy

Tools

1. Locate an config file for a chain

config files are located in scripts/config folder. The file name is in the format of <networkName>.json .For example, optimismGoerli.json is the config file for the OP-Goerli network.

The config file should contain the following fields:

{
  "chainId": 420,
  "l1Token": "0x09f0Ad07E7363557D077CF3e3BbaB9365DA533F6",
  "arbL2Gateway": "0x0000000000000000000000000000000000000000",
  "childChainManagerProxy": "0x0000000000000000000000000000000000000000"
}
  • chainId is the chain id of the network.
  • l1Token is the address of the INSURE token on the mainnet.
  • arbL2Gateway is the address of the L2 gateway on the arbitrum network. This field is only required when support arbitrum canonical bridge otherwise it can be set to zero address. the address can be found here.
  • childChainManagerProxy is the address of the child chain manager proxy on the polygon network. This field is only required when support polygon canonical bridge otherwise it can be set to zero address.

2. Run the deploy script

The deploy script is located in scripts/01.initial-deploy.sh. You can run the script with the following command:

NETWORK=optimism scripts/01.initial-deploy.sh

or you can define node script as shorthand in package.json:

{
  ...
  "scripts": {
    ...
    "deploy:optimismGoerli": "NETWORK=optimismGoerli TESTNET=true scripts/01.initial-deploy.sh",
  }
}

then run the script with the following command:

npm run deploy:optimismGoerli

alt-insure-token's People

Contributors

maguroid avatar kohshiba avatar

Watchers

Yuji Yamaguchi avatar utwang avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.