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(fast-usdc): cli deposit command (WIP) #10441

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
46e6e9e
feat(fast-usdc): stub transfer cli command
samsiegart Oct 29, 2024
2d15277
feat(fast-usdc): stub config cli command
samsiegart Oct 30, 2024
ddfdf20
chore(deps): @fast-check/ava for pool math property testing
dckc Nov 4, 2024
4f7604e
feat(fast-usdc): implement config cli command
samsiegart Oct 31, 2024
54d97c7
chore(fast-usdc): proposal shapes for deposit, withdraw
dckc Nov 5, 2024
fc0d103
chore(fast-usdc): pool math with property testing
dckc Nov 4, 2024
300c524
feat(fast-usdc): deposit, withdraw liquidity in exchange for shares
dckc Nov 5, 2024
557913a
chore(deps): @endo/bundle-source for bundleCache in tests
dckc Nov 6, 2024
98a2ea6
fixup! feat(fast-usdc): deposit, withdraw liquidity in exchange for s…
dckc Nov 6, 2024
6b7d987
fixup! feat(fast-usdc): deposit, withdraw liquidity in exchange for s…
dckc Nov 6, 2024
69185d7
fixup! feat(fast-usdc): deposit, withdraw liquidity in exchange for s…
dckc Nov 6, 2024
c0bb39b
fixup! chore(deps): @endo/bundle-source for bundleCache in tests
dckc Nov 6, 2024
3c9bd49
fixup! feat(fast-usdc): deposit, withdraw liquidity in exchange for s…
dckc Nov 6, 2024
203b849
chore: liquidity pool feeSink
dckc Nov 6, 2024
83ed6c8
feat: getPublicTopics to track shareWorth
dckc Nov 8, 2024
e8eefb3
fixup! feat: getPublicTopics to track shareWorth
dckc Nov 8, 2024
e436e7b
wip
samsiegart Nov 6, 2024
cc9c5c4
Merge remote-tracking branch 'origin/master' into dc-rpc-sim
dckc Nov 8, 2024
00be8c1
Merge remote-tracking branch 'origin/srs-fu-cli' into dc-rpc-sim
dckc Nov 8, 2024
7146d95
fix(casting): captureIO was missing resp.ok
dckc Nov 10, 2024
dea18ff
test: static type for deposit proposal
dckc Nov 10, 2024
b72becd
refactor: clarify that access to package.json is a link-time thing
dckc Nov 10, 2024
44c3283
docs: deprecate IO at module init time
dckc Nov 10, 2024
e328419
chore: notes on injecting IO in cli/transfer.js (WIP)
dckc Nov 10, 2024
3b3bd99
chore(deps): casting for web recording testing tool
dckc Nov 10, 2024
b3102c5
chore: vstorage queryOnce etc. w/injected fetch (WIP)
dckc Nov 10, 2024
3c8f8e1
chore: encodeDetail testing utility
dckc Nov 10, 2024
9ffdc26
feat(cli): deposit (WIP)
dckc Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/casting/test/net-access-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export const captureIO = fetch => {
const key = normalizeID(JSON.stringify(args));
const resp = await fetch(...args);
return {
ok: resp.ok,
json: async () => {
const data = await resp.json();
web.set(key, data);
Expand Down
25 changes: 19 additions & 6 deletions packages/fast-usdc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"src"
],
"bin": {
"fast-usdc": "./src/cli.js"
"fast-usdc": "./src/cli/index.js"
},
"scripts": {
"build": "exit 0",
Expand All @@ -22,29 +22,42 @@
"lint:eslint": "eslint ."
},
"devDependencies": {
"@agoric/casting": "^0.4.2",
"@agoric/swingset-liveslots": "^0.10.2",
"@agoric/vats": "^0.15.1",
"@agoric/zoe": "^0.26.2",
"@agoric/zone": "^0.2.2",
"@endo/bundle-source": "^3.4.2",
"@fast-check/ava": "^2.0.1",
"ava": "^5.3.0",
"c8": "^9.1.0",
"ts-blank-space": "^0.4.1"
"ts-blank-space": "^0.4.1",
"mock-fs": "^5.4.1",
"@types/mock-fs": "4.13.4"
},
"dependencies": {
"@agoric/ertp": "^0.16.2",
"@agoric/internal": "^0.3.2",
"@agoric/orchestration": "^0.1.0",
"@agoric/rpc": "^0.10.0",
"@agoric/store": "^0.9.2",
"@agoric/vow": "^0.1.0",
"@agoric/zoe": "^0.26.2",
"@cosmjs/proto-signing": "^0.32.4",
"@cosmjs/stargate": "^0.32.4",
"@endo/common": "^1.2.7",
"@endo/errors": "^1.2.7",
"@endo/eventual-send": "^1.2.7",
"@endo/far": "^1.1.8",
"@endo/init": "^1.1.6",
"@endo/marshal": "^1.6.1",
"@endo/pass-style": "^1.4.6",
"@endo/patterns": "^1.4.6",
"@endo/promise-kit": "^1.1.7",
"commander": "^12.1.0"
"agoric": "^0.21.1",
"axios": "^1.7.7",
"bech32": "^2.0.0",
"commander": "^12.1.0",
"ethers": "^6.13.4"
},
"ava": {
"extensions": {
Expand All @@ -59,8 +72,8 @@
"--no-warnings"
],
"require": [
"@endo/init/debug.js"
"@endo/init/legacy.js"
],
"timeout": "20m"
}
}
}
38 changes: 0 additions & 38 deletions packages/fast-usdc/src/cli.js

This file was deleted.

18 changes: 18 additions & 0 deletions packages/fast-usdc/src/cli/chain-watcher.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { unmarshalFromVstorage } from '@agoric/internal/src/marshal.js';
import { makeClientMarshaller } from './marshal-tables.js';

// TODO: refactor overlap with makeAgoricChainWatcher
/** @param {ReturnType<typeof import('./vstorage-client').makeVStorage>} vs */
export const makeWatcher = vs => {
const m = makeClientMarshaller();

/** @param {string} path */
const queryOnce = async path => {
const { value: serialized } = await vs.readStorage(path);
assert.string(serialized);
const aKey = 'aKey';
const data = new Map([[aKey, serialized]]);
return unmarshalFromVstorage(data, aKey, m.fromCapData, -1);
};
return harden({ queryOnce, marshaller: m });
};
Loading