-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from AcalaNetwork/relay-support-any-origin-chain
support any origin chain
- Loading branch information
Showing
15 changed files
with
129 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,6 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
|
||
src/scripts/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Wallet } from 'ethers'; | ||
import dotenv from 'dotenv'; | ||
import path from 'path'; | ||
import { JsonRpcProvider } from '@ethersproject/providers'; | ||
|
||
import { getErc20Balance, transferFromBSCToKarura } from '../__tests__/utils'; | ||
|
||
dotenv.config({ path: path.join(__dirname, '.env') }); | ||
const key = process.env.KEY; | ||
if (!key) throw new Error('KEY is not defined'); | ||
|
||
(async () => { | ||
const USDC_BSC = '0xB04906e95AB5D797aDA81508115611fee694c2b3'; | ||
const routerAddr = '0x7745CAf117104FABCF5b0e4815184d7c3b2f99D9'; | ||
const ETH_RPC_BSC = 'https://endpoints.omniatech.io/v1/bsc/mainnet/public'; | ||
|
||
const provider = new JsonRpcProvider(ETH_RPC_BSC); | ||
const wallet = new Wallet(key, provider); | ||
|
||
const bal = await getErc20Balance(USDC_BSC, wallet); | ||
console.log(`usdc balance: ${bal}`); | ||
|
||
const signedVAA = await transferFromBSCToKarura('0.05', USDC_BSC, routerAddr, wallet, true); | ||
console.log({ signedVAA }); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.