0.1.1 • Published 6 years ago

@laborx/token-bridge-mainnet-migrations v0.1.1

Weekly downloads
2
License
AGPL-3.0
Repository
gitlab
Last release
6 years ago

Token Bridge (mainnet) migrations

Provides a set of migrations for deploying mainnet's side of Token Bridge.

It includes the next smart contracts:

  • Storage
  • MultiEventsHistory
  • RolesLibrary
  • ContractsManager
  • UserManager
  • PendingManager
  • ERC20Manager
  • FeatureFeeManager
  • TimeHolder

Usage

Environment variable

Look at `.example.env` for full list of possible env variables

Setup in .env SC_ADDRESSES_BUILD_ENV variable to one of

SC_ADDRESSES_BUILD_ENV=production
# SC_ADDRESSES_BUILD_ENV=beta
# SC_ADDRESSES_BUILD_ENV=dev

Migrations

Currently all beforementioned smart contracts are deployed in scope of Chronobank's SmartContracts project.

But situation should be change in a way that mainnet token bridge provides a system of smart contracts that is highly used by Chronobank's projects (current and future).

So from the perspective of already deployed smart contracts nothing is required to be additionaly deployed. But future changes will require changes exactly in this repo (and its dependencies) rather in SmartContracts project.

Test ganache archive

Provided network archive with deployed smart contracts could be used in test purposes, integration tests and so forth.

Development

Build full package (smart contracts + typescript)

yarn build

Compile contracts

yarn contracts:compile

Compile typescript sources

yarn build:tsc

Run ganache

yarn ganache

Load ganache state from the archive

yarn migrate:unpack

Save current state into the archive

yarn migrate:save

Run tests on ganache archive's version

yarn test

Run tests (for CI)

yarn test:ci