-
Notifications
You must be signed in to change notification settings - Fork 254
fix(client-utils): lower the default fee to 0.015 BLD for smart wallet #12209
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
base: master
Are you sure you want to change the base?
Changes from all commits
bcb6a42
e54275b
f6d30c8
f92e699
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,7 @@ import { type SigningSmartWalletKit } from '@agoric/client-utils'; | |||||||||||||||||||||||||||||||
| import type { OfferSpec } from '@agoric/smart-wallet/src/offers'; | ||||||||||||||||||||||||||||||||
| import type { TxStatus } from '@aglocal/portfolio-contract/src/resolver/constants.js'; | ||||||||||||||||||||||||||||||||
| import type { TxId } from '@aglocal/portfolio-contract/src/resolver/types'; | ||||||||||||||||||||||||||||||||
| import type { StdFee } from '@cosmjs/stargate'; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| type ResolveTxParams = { | ||||||||||||||||||||||||||||||||
| signingSmartWalletKit: SigningSmartWalletKit; | ||||||||||||||||||||||||||||||||
|
|
@@ -10,6 +11,11 @@ type ResolveTxParams = { | |||||||||||||||||||||||||||||||
| proposal?: object; | ||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| const smartWalletFee: StdFee = { | ||||||||||||||||||||||||||||||||
| amount: [{ denom: 'ubld', amount: '15000' }], // 0.015 BLD | ||||||||||||||||||||||||||||||||
| gas: '19700000', | ||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| const getInvitationMakers = async (wallet: SigningSmartWalletKit) => { | ||||||||||||||||||||||||||||||||
| const getCurrentWalletRecord = await wallet.query.getCurrentWalletRecord(); | ||||||||||||||||||||||||||||||||
| const invitation = getCurrentWalletRecord.offerToUsedInvitation | ||||||||||||||||||||||||||||||||
|
|
@@ -49,6 +55,6 @@ export const resolvePendingTx = async ({ | |||||||||||||||||||||||||||||||
| proposal, | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| const result = await signingSmartWalletKit.executeOffer(action); | ||||||||||||||||||||||||||||||||
| const result = await signingSmartWalletKit.executeOffer(action, smartWalletFee); | ||||||||||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question I only found the place where we're using
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ymax-planner uses agoric-sdk/services/ymax-planner/src/engine.ts Lines 343 to 352 in d8f6bce
The fee could either be passed in to agoric-sdk/services/ymax-planner/src/main.ts Lines 178 to 181 in d8f6bce
Or another idea would be to add a agoric-sdk/packages/pola-io/src/cmd.js Line 70 in d8f6bce
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @LuqiPan I pushed a couple of commits; f6d30c8 extending wallet store reflection to support specifying a fee and f92e699 taking advantage of it in ymax-planner (but limited the extension to just fee while @dckc and I work out #12055 (comment) ). But feel free to tweak further as needed. |
||||||||||||||||||||||||||||||||
| return result; | ||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||
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.
question
Is there a better file to put this constant in so both planner and resolver can use it?
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.
I expect the planner and resolver to become less integrated, not more. So this is fine.