-
Notifications
You must be signed in to change notification settings - Fork 4
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: vote to change swap fee #21
Conversation
82c5038
to
b14cc6a
Compare
Thanks for sharing. This looks like good progress! I didn't see anything to improve. |
// import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; | ||
const CONTRACT_ELECTORATE = 'Electorate'; | ||
export const ParamTypes = /** @type {const} */ ({ | ||
INVITATION: 'invitation', |
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.
IOU a test to check that these constants are in sync with the imports
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.
many / most are tested now
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.
Why not import constants.js?
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.
The rollup.config.mjs
that I'm using for core eval scripts so far doesn't grok inter-package module specifiers.
There's a rollup plugin to do that, but I don't (yet) want to give the impression that this is a general module linking approach; for that, folks should use bundleSource
via agoric run
.
I did write up docs for this approach:
3116ff7
to
8154484
Compare
ed19e45
to
e9f8604
Compare
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.
LGTM.
All comments/suggestions are non-blocking
|
||
/** | ||
* cf. packages/inter-protocol/src/econCommitteeCharter.js | ||
* TODO: test |
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.
Is the TODO obsolete? and the one on line 25?
// import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; | ||
const CONTRACT_ELECTORATE = 'Electorate'; | ||
export const ParamTypes = /** @type {const} */ ({ | ||
INVITATION: 'invitation', |
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.
Why not import constants.js?
/** | ||
* @param {import('ava').ExecutionContext} t | ||
* @param {MockWallet} wallet | ||
* @param {{ instance: BootstrapPowers['instance']['consume']}} wk |
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.
can we have a more evocative name than wk
? I haven't come up with an expansion that means anything to me.
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.
well-known is the intended expansion
I'll mull it over...
contract/src/swaparoo.proposal.js
Outdated
|
||
const { Fail } = assert; | ||
|
||
const contractName = 'swaparoo'; | ||
|
||
/** @template SF @typedef {import('@agoric/zoe/src/zoeService/utils').StartResult<SF>} StartResult<SF> */ |
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.
suggestion:
/** @template SF @typedef {import('@agoric/zoe/src/zoeService/utils').StartResult<SF>} StartResult<SF> */ | |
/** | |
* @template SF | |
* @typedef {import('@agoric/zoe/src/zoeService/utils').StartResult<SF>} StartResult<SF> | |
*/ |
9bc9eb9
to
8452d0e
Compare
- fix: get namesByAddressAdmin from privateArgs - refactor: subordinate electorate param while writing docs, it became clear that Fee is more interesting
- feat: startMyCommittee - platform-goals/types: governance, vats, Zoe, ERTP types make them available ambiently
- avoid linking to other packages - start committee - test-deploy-tools: test local work-alikes against sdk
- harden - supply puppet electionManager
- puppet-gov: test support - test-swap-wallet: restore to working order with gov - test-vote-fee-change: start governed; change Fee - test-vote-by-committee: vote by committee members with snapshots of offer details - initialize chainTimerService to modern time
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 got stumped trying to build out the UI for this, left a couple comments related
const { | ||
[committeeName]: { voterAddresses }, | ||
} = config?.options || {}; | ||
assert(voterAddresses, 'no voter addresses???'); |
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 assert always passes as long as voteAddresses
is an empty object {}
. Should we assert that it contains some values?
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.
Well, yes, we should... but I wouldn't be surprised if some tests would need work to meet that constraint.
const depositFacet = E(namesByAddress).lookup(addr, 'depositFacet'); | ||
await E.when(invitationP, invitation => | ||
E(depositFacet).receive(invitation), | ||
).catch(err => console.error(`failed deposit to ${debugName}`, err)); |
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 tried adding an address through the env variable SWAP_GOV_ADDR
in the Makefile which seemed to successfully pipe through to this code, but I'm seeing an error here when deploying the contract:
"nameKey" not found: "agoric1rwwley550k9mmk6uq6mm6z4udrg8kyuyvfszjk"
This is confusing because in the logs I can see that this address has a smart wallet and is opening vaults before it gets to this point. Is there something wrong with namesByAddress
in this context?
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.
Maybe you're running on a chain that doesn't have the fix for this one yet? I don't recall what release it's in.
refs:
stacked on:
TODO: