Skip to content

Commit

Permalink
feat: new 'contracts' package
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 12, 2023
1 parent 81c1cee commit 2391b00
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ jobs:
- name: yarn test (casting)
if: (success() || failure())
run: cd packages/casting && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
- name: yarn test (contracts)
if: (success() || failure())
run: cd packages/contracts && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
- name: yarn test (internal)
if: (success() || failure())
run: cd packages/internal && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
Expand Down
1 change: 1 addition & 0 deletions packages/agoric-cli/src/sdk-package-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default [
"@agoric/builders",
"@agoric/cache",
"@agoric/casting",
"@agoric/contracts",
"@agoric/cosmic-proto",
"@agoric/cosmic-swingset",
"@agoric/cosmos",
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contracts Support

This package contains utilities that contracts tend to need.

It also includes sample contracts to learn from and play with.
48 changes: 48 additions & 0 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "@agoric/contracts",
"version": "0.0.1",
"description": "Utilities and sample contracts to support contract development",
"type": "module",
"main": "src/index.js",
"engines": {
"node": ">=14.15.0"
},
"scripts": {
"build": "exit 0",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
"lint:eslint": "eslint .",
"lint:types": "tsc"
},
"dependencies": {
"@agoric/assert": "^0.6.0",
"@agoric/ertp": "^0.16.2",
"@agoric/internal": "^0.3.2",
"@agoric/notifier": "^0.6.2",
"@agoric/store": "^0.9.2",
"@agoric/vat-data": "^0.5.2",
"@agoric/zoe": "^0.26.2",
"@endo/eventual-send": "^0.17.5",
"@endo/marshal": "^0.8.8",
"@endo/nat": "^4.1.31",
"@endo/promise-kit": "^0.2.59",
"anylogger": "^0.21.0",
"jessie.js": "^0.3.2"
},
"devDependencies": {
"@endo/init": "^0.5.59",
"ava": "^5.3.0"
},
"author": "Agoric",
"license": "Apache-2.0",
"files": [
"src"
],
"publishConfig": {
"access": "public"
}
}
6 changes: 6 additions & 0 deletions packages/contracts/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"./tsconfig.json",
"../../tsconfig-build-options.json"
]
}
18 changes: 18 additions & 0 deletions packages/contracts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This file can contain .js-specific Typescript compiler config.
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"checkJs": false, // Disable b/c @endo/init can't pass noImplicitAny
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"maxNodeModuleJsDepth": 2,
},
"include": [
"*.js",
"*.ts",
"src/**/*.js",
"src/**/*.ts",
"test/**/*.js",
"test/**/*.ts"
]
}

0 comments on commit 2391b00

Please sign in to comment.