This service monitors the on-chain events and release funds when a new deposit is found.
All configuration is done via environment variables. See all variables at .env.example; copy into a .env
file before running.
Description | Default | |
---|---|---|
RPC_URL | The endpoint of Layer 2 | |
LIGHTBRIDGE_DISBURSER_KEY | The pk of disburser | |
LIGHTBRIDGE_POLLING_INTERVAL | The polling interval of fetching events | 60s |
LIGHTBRIDGE_BLOCK_RANGE_PER_POLLING | The blcock range of each polling | 1000 |
LIGHTBRIDGE_POSTGRES_PASSWORD | The database password | abcdef |
LIGHTBRIDGE_POSTGRES_DB_HOST | The database host | LIGHTBRIDGE_db |
LIGHTBRIDGE_POSTGRES_DB | The database name | postgres |
LIGHTBRIDGE_POSTGRES_PORT | The database port | 5432 |
LIGHTBRIDGE_POSTGRES_USER | The database user | postgres |
- Make sure dependencies are installed - run
yarn
in the base directory - Build
yarn build
- Run
yarn start
Connect to Postgres on CLI:
psql --username postgres -d postgres --password
Audits outstanding.
- Teleportation deployed to:
0xB93d9748808A5cC7dC6b61b31F15b87F50BfcAd0
- Proxy__Teleportation deployed to:
0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13
- Teleportation deployed to:
0xD151c8F0dc69618e6180a2dC74B05cCE3E08e0aC
- Proxy__Teleportation deployed to:
0x7f6a32bCaA70c65E08F2f221737612F6fC18347A
- Teleportation deployed to:
0x95ec63aE2573bD5e70C223E075D9483573968699
- Proxy__Teleportation deployed to:
0xB43EE846Aa266228FeABaD1191D6cB2eD9808894
- Teleportation deployed to:
0x46FA6144C61d2bb9aCDc3Ca90C8673dd9B6caEB2
- Proxy__Teleportation deployed to:
0xf4d179d3a083Fa3Eede935FaF4C679D32d514186
- Teleportation deployed to:
0x81F27a114A25ac1c6186fC36888B1b120a46a650
- Proxy__Teleportation deployed to:
0x7063f59e1Db3e505D844d11A71C78F92D39E5963
- Teleportation deployed to:
0x885bfeC3D89755d2bCc1e73b6EeEEae94D54eBE4
- Proxy__Teleportation deployed to:
0xC226F132A686A08018431C913d87693396246024
This section describes how whitelisted routes between networks can be configured. By default no asset can be bridged, not even the native asset - all need to be explicitly whitelisted.
Asset support is configured on-chain on the Teleportation contract via
function addSupportedToken(address _token, uint32 _toChainId, uint256 _minDepositAmount, uint256 _maxDepositAmount, uint256 _maxTransferAmountPerDay)
.
Support for an asset can be shut down and re-activated at any time (yes|no value).
The minimum amount that needs to be deposited in order to be bridged. The value refers to the asset to be bridged (e.g. ETH or BOBA tokens) and will revert for transactions that do not exceed this threshold (>=).
The maximum amount that can be deposited within one single bridge operation. The value refers to the asset that is being bridged and will revert for transactions that exceed this value.
The maximum amount per day limits how many units of the asset to be bridged can be moved to the corresponding network per day.