generated from warp-contracts/warp-wasm-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5f389f1
Showing
79 changed files
with
25,003 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- uses: jetli/[email protected] | ||
with: | ||
version: 'latest' | ||
- name: Rust - install | ||
run: yarn | ||
working-directory: rust/pst | ||
- name: Rust - build | ||
run: yarn build | ||
working-directory: rust/pst | ||
- name: Rust - generate bindings | ||
run: yarn gen-bindings | ||
working-directory: rust/pst | ||
- name: Rust - run tests | ||
run: yarn test | ||
working-directory: rust/pst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules | ||
target | ||
dist | ||
__tests__/*.json | ||
/coverage | ||
.DS_Store | ||
.secrets | ||
.idea | ||
.yalc | ||
yalc.lock | ||
/rust/pst/contract/definition/bindings | ||
logs | ||
cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Warp contracts - WASM templates | ||
|
||
This repo contains Warp WASM contracts templates in: | ||
|
||
- [AssemblyScript](assemblyscript/README.md) | ||
- [Rust](rust/pst/README.md) | ||
- [Go](go/README.md) | ||
|
||
It allows to quickly jump into contract development - each template contains an example PST contract, | ||
deployment scripts (on localhost, testnet and mainnet), build scripts and example tests - all backed-up by the [Warp SDK](https://github.com/warp-contracts/warp). | ||
|
||
| Feature | JS | WASM - AS | WASM - Rust | WASM - Go | | ||
| ---------------------- | ----------------------------------------- | --------- | ----------- | --------- | | ||
| Sandboxing | [vm2](https://github.com/patriksimek/vm2) | ✅ | ✅ | ✅ | | ||
| Foreign contract read | ✅ | R&D | ✅ | ✅ | | ||
| Foreign contract view | ✅ | R&D | ✅ | Soon | | ||
| Foreign contract write | ✅ | R&D | ✅ | Soon | | ||
| Arweave.utils | ✅ | Soon | Soon | Soon | | ||
| Evolve | ✅ | ✅ | ✅ | ✅ | | ||
| Logging from contract | ✅ | ✅ | ✅ | ✅ | | ||
| Transaction data (1) | ✅ | ✅ | ✅ | ✅ | | ||
| Block data (2) | ✅ | ✅ | ✅ | ✅ | | ||
| Contract data (3) | ✅ | ✅ | ✅ | ✅ | | ||
| Gas metering | 🚫 | ✅ | ✅ | ✅ | | ||
|
||
Legend: | ||
|
||
- `R&D` - we need to make some research and development before implementing the feature | ||
- `Soon` - the technology is already there, we just need to find some time to add the missing features :-) | ||
- `(1)` - access current transaction data (id, owner, etc.) | ||
- `(2)` - access current block data (indep_hash, height, timestamp) | ||
- `(3)` - access current contract data (id, owner) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
lib | ||
src/__tests__/integration/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"no-console": 1, // warning | ||
"multiline-ternary": "off", | ||
"no-nested-ternary": "off", | ||
"no-multiple-empty-lines": "off", | ||
"prettier/prettier": 2 // error | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
lib | ||
src/__tests__/integration/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
Oops, something went wrong.