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

subscription service contract II #101

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4958702
buid: upgrade Yarn to berry (4.4.1)
turadg Sep 5, 2024
3478836
ci: corepack enable
turadg Sep 5, 2024
c210214
chore(deps): bump ses to latest (1.8.0)
turadg Sep 5, 2024
520a9de
chore(deps): fix yarn install warnings
turadg Sep 5, 2024
0078442
lint: fix new errors
turadg Sep 5, 2024
a491108
build: script to update dependencies
turadg Sep 5, 2024
e2b4c59
chore(deps): scripts/update-dependencies.js agoric agoric-upgrade-16
turadg Sep 5, 2024
cf3e3fa
chore(deps): scripts/update-dependencies.js endo latest
turadg Sep 5, 2024
84c677f
chore(deps):rm agoric/eventual-send
turadg Sep 5, 2024
b2fd3fc
chore(deps): bump agoric/web-components to latest
turadg Sep 5, 2024
4312e6b
chore(deps): bump agoric/rpc to latest (0.10.0)
turadg Sep 6, 2024
dcfbefe
chore(deps): resolve agoric dep
turadg Sep 6, 2024
950b052
initial
Muneeb147 Sep 4, 2024
d2952a0
test updated and coins alotted
mujahidkay Sep 4, 2024
f1c5c37
lint: format code
rabi-siddique Sep 5, 2024
af285da
test: update tests to work with contract changes
rabi-siddique Sep 5, 2024
f245f58
revert changes in package.json and yarn.lock
rabi-siddique Sep 5, 2024
ec63260
chore: fix lint errors
rabi-siddique Sep 5, 2024
f13cd16
`getSubscriptionResources` publicfacet added;
Muneeb147 Sep 5, 2024
da3459d
time service comment added;
Muneeb147 Sep 5, 2024
2437a63
M.eq used;
Muneeb147 Sep 5, 2024
d3f93b0
serviceType added;
Muneeb147 Sep 5, 2024
3eb7343
address lint errors
rabi-siddique Sep 5, 2024
7fc7729
minor serviceType renaming
Muneeb147 Sep 5, 2024
ab62223
service ui
mujahidkay Sep 5, 2024
b9c5b5d
Timeservice commented && View subscription access implemented;
Muneeb147 Sep 6, 2024
ac6d3f9
fixup provide chainTimerService
turadg Sep 6, 2024
30bc2d5
ui changes and timeservice logic
rabi-siddique Sep 6, 2024
d2c145f
tests fix
rabi-siddique Sep 6, 2024
dd0762a
flakiness of wallet subscription fixed;
Muneeb147 Sep 6, 2024
bee23b1
delay timer added;
Muneeb147 Sep 6, 2024
7326ca2
offerArgs.offerType condition removed;
Muneeb147 Sep 6, 2024
e0f078c
Update Trade.tsx
Muneeb147 Sep 6, 2024
f1256f3
minor msg changed and timer extended;
Muneeb147 Sep 6, 2024
9ebd546
Update Trade.tsx
Muneeb147 Sep 6, 2024
70e9cb8
Update test-contract.js
Muneeb147 Sep 6, 2024
e05c97f
async removed
Muneeb147 Sep 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
20 changes: 10 additions & 10 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: yarn install
run: yarn
- run: corepack enable
- run: yarn install
- name: yarn lint
run: yarn lint
- name: yarn build
Expand All @@ -33,15 +33,15 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "18.18"
- name: yarn install
run: yarn
- run: corepack enable
- run: yarn install
- name: yarn start:docker
run: yarn start:docker
- name: yarn build
run: yarn build
- name: yarn start:contract
run: yarn start:contract

- name: Install linux deps
run: |
sudo apt-get install --no-install-recommends -y \
Expand All @@ -54,13 +54,13 @@ jobs:
fluxbox &
env:
DISPLAY: :0.0

- name: Run e2e tests
uses: cypress-io/github-action@248bde77443c376edc45906ede03a1aba9da0462
with:
start: npx serve ui/dist -p 5173
command: yarn test:e2e
wait-on: 'http://localhost:5173'
wait-on: "http://localhost:5173"
wait-on-timeout: 120
browser: chrome
env:
Expand All @@ -73,6 +73,6 @@ jobs:
with:
name: e2e-artifacts
path: |
ui/test/e2e/videos
ui/test/e2e/screenshots
continue-on-error: true
ui/test/e2e/videos
ui/test/e2e/screenshots
continue-on-error: true
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ dist-ssr
screenshots
videos

# Yarn related
.yarn/install-state.gz
# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored)
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# contract tx
contract/,tx.json
contract/,tx.json
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 1 addition & 1 deletion _agstate/agoric-servers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"author": "Agoric",
"license": "Apache-2.0",
"dependencies": {
"@agoric/cosmic-swingset": "^0.41.3"
"@agoric/cosmic-swingset": "^0.42.0-u16.2"
}
}
36 changes: 18 additions & 18 deletions contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@
"make:waitForBlocks": "make wait-for-blocks"
},
"devDependencies": {
"@agoric/deploy-script-support": "^0.10.4-u12.0",
"@agoric/eslint-config": "dev",
"@endo/bundle-source": "^2.8.0",
"@endo/eslint-plugin": "^0.5.2",
"@endo/init": "^0.5.60",
"@endo/promise-kit": "0.2.56",
"@endo/ses-ava": "^0.2.44",
"@jessie.js/eslint-plugin": "^0.4.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"agoric": "^0.21.2-u12.0",
"@agoric/deploy-script-support": "^0.10.4-u16.2",
"@agoric/eslint-config": "^0.4.1-u16.0",
"@endo/bundle-source": "^3.4.0",
"@endo/eslint-plugin": "^2.2.1",
"@endo/init": "^1.1.4",
"@endo/promise-kit": "^1.1.5",
"@endo/ses-ava": "^1.2.5",
"@jessie.js/eslint-plugin": "^0.4.1",
"agoric": "^0.22.0-u16.2",
"ava": "^5.3.0",
"eslint": "^8.47.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-jessie": "^0.0.6",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -43,14 +41,16 @@
"prettier": "^3.0.3",
"prettier-plugin-jsdoc": "^1.0.0",
"type-coverage": "^2.26.3",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"typescript-eslint": "^7.13.1"
},
"dependencies": {
"@agoric/ertp": "^0.16.3-u12.0",
"@agoric/zoe": "^0.26.3-u12.0",
"@endo/far": "^0.2.22",
"@endo/marshal": "^0.8.9",
"@endo/patterns": "^0.2.5"
"@agoric/ertp": "^0.16.3-u16.1",
"@agoric/time": "^0.3.3-u16.1",
"@agoric/zoe": "^0.26.3-u16.1",
"@endo/far": "^1.1.5",
"@endo/marshal": "^1.5.3",
"@endo/patterns": "^1.4.3"
},
"ava": {
"files": [
Expand Down
19 changes: 14 additions & 5 deletions contract/src/offer-up-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const BOARD_AUX = 'boardAux';

const marshalData = makeMarshal(_val => Fail`data only`);

const IST_UNIT = 1_000_000n;
const CENT = IST_UNIT / 100n;

/**
* Make a storage node for auxilliary data for a value on the board.
*
Expand Down Expand Up @@ -44,7 +41,13 @@ const publishBrandInfo = async (chainStorage, board, brand) => {
export const startOfferUpContract = async permittedPowers => {
console.error('startOfferUpContract()...');
const {
consume: { board, chainStorage, startUpgradable, zoe },
consume: {
board,
chainStorage,
startUpgradable,
zoe,
chainTimerService: chainTimerServiceP,
},
brand: {
consume: { IST: istBrandP },
// @ts-expect-error dynamic extension to promise space
Expand All @@ -66,8 +69,13 @@ export const startOfferUpContract = async permittedPowers => {

const istIssuer = await istIssuerP;
const istBrand = await istBrandP;
const timerService = await chainTimerServiceP;
assert(timerService, `timerService missing from bootstrap`);

const terms = { tradePrice: AmountMath.make(istBrand, 25n * CENT) };
const terms = {
subscriptionPrice: AmountMath.make(istBrand, 10000000n),
timerService,
};

// agoricNames gets updated each time; the promise space only once XXXXXXX
const installation = await offerUpInstallationP;
Expand Down Expand Up @@ -107,6 +115,7 @@ const offerUpManifest = {
chainStorage: true, // to publish boardAux info for NFT brand
startUpgradable: true, // to start contract and save adminFacet
zoe: true, // to get contract terms, including issuer/brand
chainTimerService: true,
},
installation: { consume: { offerUp: true } },
issuer: { consume: { IST: true }, produce: { Item: true } },
Expand Down
Loading
Loading