This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
forked from hyperlane-xyz/hyperlane-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve UX of send and status commands (hyperlane-xyz#3006)
### Description - Improve shared context utility with conditional typing and core artifact handling - Improve UX of send and status commands with prompts - Prompt for key if required and not provided ### Drive-by Changes Update the token readme for hyperlane-xyz/issues#715 ### Backward compatibility Yes ### Testing Manual
- Loading branch information
Showing
14 changed files
with
217 additions
and
119 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@hyperlane-xyz/cli': patch | ||
--- | ||
|
||
Improve UX of the send and status commands |
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,23 @@ | ||
import { expect } from 'chai'; | ||
import { ethers } from 'ethers'; | ||
|
||
import { getContext } from './context.js'; | ||
|
||
describe('context', () => { | ||
it('Gets minimal read-only context correctly', async () => { | ||
const context = await getContext({ chainConfigPath: './fakePath' }); | ||
expect(!!context.multiProvider).to.be.true; | ||
expect(context.customChains).to.eql({}); | ||
}); | ||
|
||
it('Handles conditional type correctly', async () => { | ||
const randomWallet = ethers.Wallet.createRandom(); | ||
const context = await getContext({ | ||
chainConfigPath: './fakePath', | ||
keyConfig: { key: randomWallet.privateKey }, | ||
}); | ||
expect(!!context.multiProvider).to.be.true; | ||
expect(context.customChains).to.eql({}); | ||
expect(await context.signer.getAddress()).to.eql(randomWallet.address); | ||
}); | ||
}); |
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
Oops, something went wrong.