-
Notifications
You must be signed in to change notification settings - Fork 29
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(script): add commands & entrypoint #105
Conversation
}); | ||
|
||
contractCmd.command("list").action(() => { | ||
console.log("Available contracts:".green); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this syntax work, never seen this before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it works
script/commands/contract.ts
Outdated
dispatch: { | ||
dest_domain: parseInt(destDomain), | ||
recipient_addr: addPad( | ||
recipientAddr.startsWith("0x") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Move this into a utility function
script/commands/deploy.ts
Outdated
]); | ||
|
||
saveContext(opts.networkId, ctx); | ||
saveAgentConfig(getNetwork(opts.networkId), ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have to await here? Should probably have a lint rule to not allow for this situation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my, will fix it right away
): Promise<ContextDeployments["core"]> => { | ||
const { hrp, domain } = getNetwork(networkId); | ||
|
||
const log = (v: string) => console.log("[core]".green, v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like another utility function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script/commands/deploy.ts
Outdated
domain, | ||
owner: client.signer, | ||
})); | ||
if (preload?.mailbox) log(`${deployment.mailbox.type} already deployed`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this log line be above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right
) | ||
) as Record<ContractNames, CodeDetails>; | ||
|
||
const toMigrate = withContractInfo.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comparing a checksum of code that willing to migrate and actual one
return; | ||
} | ||
|
||
if (!(await askQuestion("Do you want to proceed? (y/n)"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we log out what's gonna happen to allow the user to know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree!
console.log("Proceeding to migrate..."); | ||
|
||
for (const migrate of toMigrate) { | ||
const res = await client.wasm.migrate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log what's happening
|
||
for (const migrate of toMigrate) { | ||
const res = await client.wasm.migrate( | ||
client.signer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the owner is a DAO DAO contract, can we just log out the calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can export these msgs like this format.
{
"wasm": {
"migrate": {
"contract_addr": "~~",
"new_code_id": 1234,
"msg": "<base64-encoded-msg>"
}
}
}
.command("local") | ||
.description("upload artifacts from local") | ||
.option("-a --artifacts <artifacts dir>", "artifacts", defaultArtifactPath) | ||
.action(async (_, cmd) => upload(cmd.optsWithGlobals())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: async is superflous
commit fad8f9e Merge: 1639e2f eb77beb Author: byeongsu-hong <[email protected]> Date: Fri Mar 1 23:21:15 2024 +0900 Merge branch 'eddy/pick-docs' into eddy/pick-cw-hpl commit 1639e2f Author: byeongsu-hong <[email protected]> Date: Fri Mar 1 23:17:08 2024 +0900 remove ts/sdk commit d73647b Author: byeongsu-hong <[email protected]> Date: Fri Mar 1 23:15:19 2024 +0900 Revert "Merge branch 'main' into eddy/pick-cw-hpl" This reverts commit 82fc10f, reversing changes made to 6566e7a. commit 82fc10f Merge: 6566e7a be64967 Author: byeongsu-hong <[email protected]> Date: Fri Mar 1 23:14:05 2024 +0900 Merge branch 'main' into eddy/pick-cw-hpl commit be64967 Author: ByeongSu Hong <[email protected]> Date: Fri Mar 1 23:08:13 2024 +0900 doc: documentation (#95) * wip * project structure & overview * toc * swap * fix(schema): reflect missing contracts * refactor(ts): migrate sdk - 1 * refactor(script): pull back project setup to root * reorg script / cli * fix(script): make igp deployable * build: redeploy * build: stride hyperlane deployment * fix(hook): default gas denom * feat(script): add migrate command * chore: detailed ignore policy * feat(script): supprot mnemonic * chore(script): cleanup * chore: trailing comma * feat: add grpc endpoint as config * feat: generate agent config * feat(script): add test-dispatch * chore: redundant args * docs: owner -> <signer> * build: yarn berry * env: yarn * env: add cw-hpl command * feat: mailbox null-check * fix: prune imports * docs: wip guide & example * fix: rename compose file * fix: use localosmosis key * refactor: restruct guide * fix: remove DATA_PATH * fix: add `yarn install` * fix: handle rest endpoint not working * fix: use localwasmd * fix: hrp * feat: add wallet command * feat: wallet generator * fix: use osmosis testnet * line spacing * fix: xor * fix: split length * feat: more info to replace * fix: osmosis testnet network name * chore: ignore example * feat: add test recipient * fix: trouble shooting * docs: done * docs: update README.md * fix: line break * chore: remove testnet contexts * wip: neutron deployment * feat: context -> agent config * feat: apply review changes (#97) * docs: add context / example * fix: real instant finality * fix: typo commit e8716c3 Author: ByeongSu Hong <[email protected]> Date: Fri Mar 1 19:57:30 2024 +0900 review: docs (#98) * wip * project structure & overview * toc * swap * docs: owner -> <signer> * build: yarn berry * env: yarn * env: add cw-hpl command * docs: wip guide & example * fix: line break * fix: rename compose file * fix: use localosmosis key * refactor: restruct guide * fix: remove DATA_PATH * fix: add `yarn install` * fix: use localwasmd * fix: hrp * fix: use osmosis testnet * line spacing * feat: more info to replace * fix: osmosis testnet network name * chore: ignore example * docs: done * docs: update README.md * merge: remove conflicts * docs: move to root * docs: remove outdated docs commit eb77beb Author: byeongsu-hong <[email protected]> Date: Thu Feb 29 17:55:52 2024 +0900 docs: remove outdated docs commit 6a600c5 Author: byeongsu-hong <[email protected]> Date: Thu Feb 29 17:54:38 2024 +0900 docs: move to root commit 68074f0 Author: ByeongSu Hong <[email protected]> Date: Thu Feb 29 02:20:50 2024 +0900 refactor: ts schema (#99) * fix(schema): reflect missing contracts * refactor(ts): migrate sdk - 1 commit 5896800 Author: byeongsu-hong <[email protected]> Date: Wed Feb 28 17:16:32 2024 +0900 merge: remove conflicts commit adb1852 Author: ByeongSu Hong <[email protected]> Date: Tue Feb 27 02:59:10 2024 +0900 docs: update README.md commit 19c6c60 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 02:57:59 2024 +0900 docs: done commit 5cdecaa Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 02:32:56 2024 +0900 chore: ignore example commit 28a5e69 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 02:21:21 2024 +0900 fix: osmosis testnet network name commit 57e78ea Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 02:18:23 2024 +0900 feat: more info to replace commit 56e2700 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 01:35:03 2024 +0900 line spacing commit b707b67 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 01:32:35 2024 +0900 fix: use osmosis testnet commit aa53d70 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 00:38:22 2024 +0900 fix: hrp commit bc1b84f Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 00:36:03 2024 +0900 fix: use localwasmd commit 7aaa751 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 00:04:08 2024 +0900 fix: add `yarn install` commit ca25459 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 23:56:19 2024 +0900 fix: remove DATA_PATH commit 82b5f59 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 23:49:25 2024 +0900 refactor: restruct guide commit df1a67c Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 22:32:48 2024 +0900 fix: use localosmosis key commit ef17165 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 22:26:51 2024 +0900 fix: rename compose file commit 1289770 Author: byeongsu-hong <[email protected]> Date: Tue Feb 27 03:00:17 2024 +0900 fix: line break commit 2604486 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 22:22:49 2024 +0900 docs: wip guide & example commit 2b4c5a1 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 21:21:24 2024 +0900 env: add cw-hpl command commit e43cfb3 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 21:21:14 2024 +0900 env: yarn commit 76313e8 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 20:49:06 2024 +0900 build: yarn berry commit 9dba0a4 Author: byeongsu-hong <[email protected]> Date: Mon Feb 26 20:44:20 2024 +0900 docs: owner -> <signer> commit 17200dc Author: byeongsu-hong <[email protected]> Date: Wed Feb 14 18:50:16 2024 +0900 swap commit 50b01d7 Author: byeongsu-hong <[email protected]> Date: Wed Feb 14 18:42:09 2024 +0900 toc commit 6cde4c8 Author: byeongsu-hong <[email protected]> Date: Wed Feb 14 18:29:22 2024 +0900 project structure & overview commit cab7199 Author: byeongsu-hong <[email protected]> Date: Wed Feb 14 18:22:41 2024 +0900 wip
* refactor: ts schema (#99) * fix(schema): reflect missing contracts * refactor(ts): migrate sdk - 1 * review: docs (#98) * wip * project structure & overview * toc * swap * docs: owner -> <signer> * build: yarn berry * env: yarn * env: add cw-hpl command * docs: wip guide & example * fix: line break * fix: rename compose file * fix: use localosmosis key * refactor: restruct guide * fix: remove DATA_PATH * fix: add `yarn install` * fix: use localwasmd * fix: hrp * fix: use osmosis testnet * line spacing * feat: more info to replace * fix: osmosis testnet network name * chore: ignore example * docs: done * docs: update README.md * merge: remove conflicts * docs: move to root * docs: remove outdated docs * doc: documentation (#95) * wip * project structure & overview * toc * swap * fix(schema): reflect missing contracts * refactor(ts): migrate sdk - 1 * refactor(script): pull back project setup to root * reorg script / cli * fix(script): make igp deployable * build: redeploy * build: stride hyperlane deployment * fix(hook): default gas denom * feat(script): add migrate command * chore: detailed ignore policy * feat(script): supprot mnemonic * chore(script): cleanup * chore: trailing comma * feat: add grpc endpoint as config * feat: generate agent config * feat(script): add test-dispatch * chore: redundant args * docs: owner -> <signer> * build: yarn berry * env: yarn * env: add cw-hpl command * feat: mailbox null-check * fix: prune imports * docs: wip guide & example * fix: rename compose file * fix: use localosmosis key * refactor: restruct guide * fix: remove DATA_PATH * fix: add `yarn install` * fix: handle rest endpoint not working * fix: use localwasmd * fix: hrp * feat: add wallet command * feat: wallet generator * fix: use osmosis testnet * line spacing * fix: xor * fix: split length * feat: more info to replace * fix: osmosis testnet network name * chore: ignore example * feat: add test recipient * fix: trouble shooting * docs: done * docs: update README.md * fix: line break * chore: remove testnet contexts * wip: neutron deployment * feat: context -> agent config * feat: apply review changes (#97) * docs: add context / example * fix: real instant finality * fix: typo * Revert "Merge branch 'main' into eddy/pick-cw-hpl" This reverts commit 82fc10f, reversing changes made to 6566e7a. * remove ts/sdk * merge: schema refactoring (#106) * fix(schema): reflect missing contracts * refactor(ts): migrate sdk - 1 * feat(script): initial config setup (#102) feat: initial config setup * merge: docs improvements (#108) * wip * project structure & overview * toc * swap * docs: owner -> <signer> * build: yarn berry * env: yarn * env: add cw-hpl command * docs: wip guide & example * fix: line break * fix: rename compose file * fix: use localosmosis key * refactor: restruct guide * fix: remove DATA_PATH * fix: add `yarn install` * fix: use localwasmd * fix: hrp * fix: use osmosis testnet * line spacing * feat: more info to replace * fix: osmosis testnet network name * chore: ignore example * docs: done * docs: update README.md * merge: remove conflicts * docs: move to root * docs: remove outdated docs
129424e
to
3683428
Compare
ba57464
to
603c17d
Compare
./config.yaml
)x/gov
proposal messages./artifacts
v0.0.6-rc8
, and uploads itmnemonic
orprivateKey