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

1.0.0 Release #63

Merged
merged 31 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7b00ffc
Accessing/Calling Actions (#17)
aaroncox Jul 18, 2023
f1ce51b
Remove Session Kit dependency (#19)
aaroncox Jul 19, 2023
d1c3f24
Dynamic table row serialization and limit/maxRow changes (#21)
aaroncox Jul 19, 2023
4b4518c
More refactor (#23)
dafuga Jul 20, 2023
405bee1
Utilize raw data (#27)
aaroncox Jul 20, 2023
aa3c1f5
Independent Table Elements (#34)
aaroncox Jul 24, 2023
a6625d4
Version 0.2.0
aaroncox Jul 25, 2023
9472e1e
Allow rowType on `contract.table()` method as 2nd param
aaroncox Jul 25, 2023
e2f6e00
Version 0.2.1
aaroncox Jul 25, 2023
53566cc
Make query in `get()` optional to just fetch first row
aaroncox Jul 25, 2023
9b90b04
Merge pull request #35 from wharfkit/first-row
aaroncox Jul 25, 2023
3a0ced2
Query Merge (#36)
aaroncox Jul 27, 2023
001f073
Migrating from @greymass/eosio to @wharfkit/antelope
aaroncox Jul 28, 2023
e85eb57
Version 0.3.0
aaroncox Jul 28, 2023
b317085
Upgrading ABICache
aaroncox Jul 28, 2023
4eb418f
Version 0.3.1
aaroncox Jul 28, 2023
6c85e09
Adjusting codegen script (#39)
dafuga Jul 29, 2023
1160a92
Generated vs mocked (#43)
aaroncox Aug 8, 2023
a08cfcb
Supporting typed actions and enabling autocomplete (#45)
aaroncox Aug 16, 2023
ab1346f
Version 0.4.0
aaroncox Aug 17, 2023
17a4b85
Adjusting codegen script (#51)
dafuga Aug 20, 2023
d1b2afd
All system contract compatibility and better tests (#52)
aaroncox Aug 26, 2023
383562c
Version 0.4.2
aaroncox Aug 26, 2023
22d5f7b
Removed codegen logic (#55)
dafuga Aug 29, 2023
597286c
0.4.3 - Bug Fixes
aaroncox Aug 31, 2023
96778e2
chore: cleaning up JSDoc (#58)
dafuga Sep 29, 2023
b84ee84
enhance README.md
rakeden Oct 12, 2023
433ad11
Merge pull request #59 from rakeden/patch-1
aaroncox Oct 12, 2023
3cc9f07
Updating dependencies for 1.0.0 release
aaroncox Nov 7, 2023
29e90cd
Version 1.0.0
aaroncox Nov 7, 2023
559b246
Added missing mock data for get_info
aaroncox Nov 7, 2023
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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"root": true,
"ignorePatterns": ["lib/*", "node_modules/**"],
"ignorePatterns": ["lib/*", "node_modules/**", "test/data/contracts/*.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
Expand Down
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ semi: false
singleQuote: true
tabWidth: 4
trailingComma: 'es5'
parser: typescript
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ coverage: build/coverage
ci-test: node_modules
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data/requests' \
${BIN}/nyc ${NYC_OPTS} --reporter=text \
${BIN}/mocha ${MOCHA_OPTS} -R list ${TEST_FILES}
${BIN}/mocha ${MOCHA_OPTS} -R list ${TEST_FILES} --no-timeout

.PHONY: check
check: node_modules
@${BIN}/eslint src --ext .ts --max-warnings 0 --format unix && echo "Ok"
@${BIN}/eslint src test --ext .ts --max-warnings 0 --format unix && echo "Ok"

.PHONY: format
format: node_modules
@${BIN}/eslint src --ext .ts --fix
@${BIN}/eslint src test --ext .ts --fix

.PHONY: publish
publish: | distclean node_modules
Expand All @@ -51,10 +51,6 @@ publish: | distclean node_modules
docs: build/docs
@open build/docs/index.html

.PHONY: generate
generate: lib
node -r esm scripts/codegen-cli.js $(contract)

build/docs: $(SRC_FILES) node_modules
@${BIN}/typedoc --out build/docs \
--excludeInternal --excludePrivate --excludeProtected \
Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
# Contract Kit

Greymass TypeScript library template, intended for libraries that work in any JavaScript context (node.js, Browser, React native), `@types/node` are installed only for tests, don't rely on any node.js types or imports inside `src/` (no `buffer`, `crypto` imports etc, they can be filled for browser but will bloat the bundle 100x)
A library to simplify interactions with Antelope-based smart contracts.

Features:

- Instantiate instances of a `Contract` in your frontend application
- Retrieve smart contract data with `Table` instances.
- Create action data by accessing actions directly through the `.action` method of a `Contract`
- Retrieve Ricardian Contracts for specific actions through the `.ricardian` method of a `Contract`
- Cache and optimize ABI call patterns automatically in your application.

## Installation

The `contract` package is distributed as a module on [npm](https://www.npmjs.com/package/contract).
The `@wharfkit/contract` package is distributed as a module on [npm](https://www.npmjs.com/package/@wharfkit/contract).

```
yarn add contract
yarn add @wharfkit/contract
# or
npm install --save contract
npm install --save @wharfkit/contract
```

## Usage

To generate the Contract helper for a specific Antelope contract, use the `generate` make target:

```bash
make generate contract=<CONTRACT_NAME_HERE>
```

and your contract helper will be added to `contracts/CONTRACT_NAME.ts`.

```typescript

## Developing

You need [Make](https://www.gnu.org/software/make/), [node.js](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/en/docs/install) installed.
Expand All @@ -33,4 +29,3 @@ Clone the repository and run `make` to checkout all dependencies and build the p
---

Made with ☕️ & ❤️ by [Greymass](https://greymass.com), if you find this useful please consider [supporting us](https://greymass.com/support-us).
```
Loading
Loading