IMA-UI is a Typescirpt/Javascript sample project which uses ima-js under the hood to demonstrate the functionality of SKALE Interchain Messaging Agent (IMA).
This project is for testing purposes only!
You can connect ima-ui to any pair of networks (Mainnet and SKALE chain), it can be ima-sdk or real networks, like Rinkeby and real SKALE chain.
You can find instructions for running IMA-SDK in this doc.
Required .env
variables:
REACT_APP_CUSTOM_MAINNET_URL=https://test-sdk.com/mainnet # example
REACT_APP_MAINNET_CHAIN_ID='0x561'
REACT_APP_CUSTOM_SCHAIN_URL=https://test-sdk.com/schain # example
REACT_APP_SCHAIN_CHAIN_ID='0x12345'
REACT_APP_CUSTOM_SCHAIN_NAME='Bob'
To run ima-ui you will need IMA ABIs both for Mainnet and sChain sides:
- Put Mainnet IMA ABI to:
src/abi/proxyMainnet.json
- Put sChain IMA ABI to:
src/abi/proxySchain.json
- Put Mainnet SKALE Manager ABI to:
src/abi/manager.json
(for test purposes you can use any valid SKALE Manager ABI from any public release)
To test ERC20 transfers you can deploy a few test tokens to the Mainnet & sChain sides using scripts from the repo:
bash scripts/deploy_test_tokens.sh
NOTE: To do this, add the following environment variables to your .env
file:
TEST_PRIVATE_KEY=
TEST_ADDRESS=
MAINNET_ENDPOINT=
SCHAIN_ENDPOINT=
After deploying tokens put Mainnet addresses in the src/meta/tokens.json
in the following format:
{
"erc20": {
"TICKER": {
"name": "Token name",
"address": "0x..."
},
...
}
}
yarn install
yarn start
After running the server you should be able to make changes interactively.
The project is based on react-react-app
and uses mui
React library for the frontend.
If you have any questions please ask our development community on Discord.
All contributions are made under the GNU Affero General Public License v3. See LICENSE.