Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support external url #103

Merged
merged 10 commits into from
Feb 16, 2024
Merged

feat: support external url #103

merged 10 commits into from
Feb 16, 2024

Conversation

npty
Copy link
Member

@npty npty commented Feb 11, 2024

Description

AXE-3085

This PR added a new API setupAndExported to allow passing external rpc urls to setup local dev environment, instead of running evm nodes internally.

The API will require the SetupLocalOptions to be passed in to the function, but the only required parameter is chains. Here's example of usage:

import { setupAndExport, Network} from '@axelar-network/axelar-local-dev';

async function deployAndFundUsdc(chain: Network) {
    await chain.deployToken('Axelar Wrapped aUSDC', 'aUSDC', 6, BigInt(1e22));
}

await setupAndExport({
    callback: (chain: Network) => deployAndFundUsdc(chain),
    chains: [
        {
            name: 'Ethereum',
            rpcUrl: 'http://localhost:8545',
        },
        {
            name: 'Avalanche',
            rpcUrl: 'http://localhost:8546',
        },
    ],
})

You can also passing seed into the function which will be used by the relayer. If not specified, the default seed is the default seed of anvil command which is test test test test test test test test test test test junk

After this, you can deploy contracts to both chains and start using GMP. Here's an example usage using by test

@npty npty self-assigned this Feb 11, 2024
@npty npty requested a review from Olanetsoft February 12, 2024 12:48
@npty npty marked this pull request as ready for review February 12, 2024 13:10
@npty npty enabled auto-merge (squash) February 16, 2024 06:13
@npty npty merged commit 27f8dcf into main Feb 16, 2024
1 check passed
@npty npty deleted the feat/support-external-url branch February 16, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants