You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just include a JS library in their frontend / nodejs app to send the funds
Developer wants to clone ERC-20 "connector" and customize it
git clone
edit sol & rc files
modify tests in this repo, that are testing end-to-end deployment + interaction of the contracts using JS library
run on ganache + NEAR's CI with npm run test, tests are running the relayers inside them via JS library -- don't need to run separate services
deploy to testnet, mainnet -- rely on existing relayers or next item
Project / company wants to run relayer & watchdog
npm install rainbowup near-cli
use near-cli to setup everything, like accounts, instructions available in this repo
rainbow-bridge services up
rainbow-bridge services status -- outputs info on how are services doing?
rainbow-bridge services down -- stops services
Developer wants to use third-party connectors
They can just use the same JS library to interact with any connectors
User wants to move assets and has NEAR account
CLI support -- we don't really need this if we get to UI quickly
near bridge-send <ethereum address> my.account <token-address> <amount> -- leverages both NEAR's and existing web3 provider credentials
near bridge-view <token-address> my.account -- shows how much of this token on NEAR side you have
JS library -- this will allow us to add support on Wallet side.
User wants to move some assets to NEAR, but doesn't have an account yet
Charge a bit extra on Ethereum side and relayer will create an account for the user on NEAR side (MVP - create for free if transaction has some value)
near bridge-create-account <ethereum address> <token-address> <amount> -- this outputs linkdrop that you can use to grab your token on NEAR side while creating an account
JS library for this
Important parts of the product that are missing:
Interaction with near-cli - instead of requiring rainbow cli to reinvent all the configuration, it should leverage near-cli with NEAR_ENV and existing configurations / key management.
sol/rs should be made into reusable packages: near-bridge, near-provider, eth-bridge, eth-prover.
The reason for Split repo #280 is to allow npm install github repos. As far as I understand npm can't install from subfolders. If this is not true - we can ignore this.
Separate example of single ERC-20 token locker that developer can fork that modify.
Generic token locker / NEAR token factory that has predictable names for contracts is important
Especially, it's important to have an automatic way to infer account name for the token on NEAR side from ERC-20 address. It's important for UIs and other tooling. Note, that if it's not sub-account of some bridge account, this name can be squatted by someone else.
JS library should provide an easy interface to interact with any connectors
web3 hooks to initiate transaction for Ethereum side
NEAR hooks to initiate transaction on NEAR side.
A async function to wait until some transaction from one side gets finalized on the other side.
Some way to monitor the progress: how many confirmations for Ethereum -> NEAR, calling watchdog logic for NEAR -> Ethereum
Extra stuff in library (it should be there but not surfaced as main use cases): Client side relaying logic, watchdog
This is list of user stories. They are combined in one place as they should be solved by coherent product design vs solved one by one.
To simplify the language, the pair of contracts like TokenLocker/MintableFungibleToken will be called "connectors"
User stories:
npm run test, tests are running the relayers inside them via JS library -- don't need to run separate servicesnpm install rainbowup near-clirainbow-bridge services uprainbow-bridge services status-- outputs info on how are services doing?rainbow-bridge services down-- stops servicesnear bridge-send <ethereum address> my.account <token-address> <amount>-- leverages both NEAR's and existing web3 provider credentialsnear bridge-view <token-address> my.account-- shows how much of this token on NEAR side you havenear bridge-create-account <ethereum address> <token-address> <amount>-- this outputs linkdrop that you can use to grab your token on NEAR side while creating an accountImportant parts of the product that are missing:
near-cli- instead of requiring rainbow cli to reinvent all the configuration, it should leveragenear-cliwith NEAR_ENV and existing configurations / key management.