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

fix(michelson-encoder): improvement extract schema #1316

Merged
merged 56 commits into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
bc7fa42
fix(michelson-encoder): improvement extract schema
roxaneletourneau Jan 14, 2022
c8bfc2d
Unit tests for generateSchema
roxaneletourneau Jan 14, 2022
886a897
Mk 1294 deprecated sub instruction (#1315)
michaelkernaghan Jan 15, 2022
0cbe977
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-tzip16
dependabot[bot] Jan 15, 2022
aae749c
chore: update supported versions in SECURITY.md file
jevonearth Jan 17, 2022
d5912ac
refactor(generateschema): improved types
roxaneletourneau Jan 17, 2022
97a194f
Merge pull request #1330 from ecadlabs/updated_supported_versions
roxaneletourneau Jan 17, 2022
2669b79
Added validation and new error classes to throw
Jan 18, 2022
2aaee11
Adjusted unit tests to accommodate validation
Jan 18, 2022
177220a
Merge branch 'master' of github.com:ecadlabs/taquito into 1311-valida…
Jan 18, 2022
fcaac3e
Updated imports
Jan 18, 2022
d5d0f47
addressed PR comments and added more validation to taquito package
Jan 19, 2022
8445774
passed invalid hashes into error message
Jan 19, 2022
c6fe2fb
removed wrong import
Jan 19, 2022
89ea471
Merge pull request #1317 from ecadlabs/extract-schema-tests
roxaneletourneau Jan 19, 2022
afd49b1
changes for new op codes - support SUB_MUTEZ in composite forger (#1331)
michaelkernaghan Jan 19, 2022
475caff
Merge pull request #1329 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
5e03438
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-utils
dependabot[bot] Jan 19, 2022
0565f57
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-remote-signer
dependabot[bot] Jan 19, 2022
d011161
Bump trim-off-newlines from 1.0.1 to 1.0.3
dependabot[bot] Jan 19, 2022
9fdb1b5
Merge pull request #1327 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
b212f76
Merge pull request #1328 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
299a463
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-signer
dependabot[bot] Jan 19, 2022
64143d3
Merge pull request #1325 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
06c4d1c
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-contracts-library
dependabot[bot] Jan 19, 2022
171f429
Merge pull request #1324 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
58089d3
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-beacon-wallet
dependabot[bot] Jan 19, 2022
6eae358
Merge pull request #1323 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
71b17c7
Bump shelljs from 0.8.4 to 0.8.5 in /packages/taquito-ledger-signer
dependabot[bot] Jan 19, 2022
91573dd
Merge pull request #1322 from ecadlabs/dependabot/npm_and_yarn/packag…
roxaneletourneau Jan 19, 2022
a5a697a
Bump shelljs from 0.8.4 to 0.8.5
dependabot[bot] Jan 19, 2022
d5f06f8
Merge pull request #1321 from ecadlabs/dependabot/npm_and_yarn/shellj…
roxaneletourneau Jan 19, 2022
7103fa1
Add null check before validating
Jan 20, 2022
cc18e36
fix(signer): removed bip39 dependency
roxaneletourneau Jan 20, 2022
5c3bf52
updated error message
Jan 20, 2022
cf8d4fe
docs(website ledger documentation): replace utf transport with web-hi…
roxaneletourneau Jan 20, 2022
d37debb
Merge pull request #1335 from ecadlabs/dependabot/npm_and_yarn/trim-o…
roxaneletourneau Jan 20, 2022
dc1da89
addressed review comments
Jan 20, 2022
11290a8
Merge pull request #1336 from ecadlabs/issue-1110-bip39
roxaneletourneau Jan 20, 2022
8036fe7
Merge pull request #1334 from ecadlabs/1311-validation
dsawali Jan 20, 2022
a129d76
fix: reduce time for caching step in all pipelines
danielelisi Jan 21, 2022
ad47405
Change folder glob pattern and bust lerna cache
danielelisi Jan 21, 2022
dc9b262
Isolated test for cache step
danielelisi Jan 21, 2022
136c6e0
Deprecated ExtractSchema method in favor of generateSchema
roxaneletourneau Jan 21, 2022
c9a7e59
cache dist folder instead of node_modules
danielelisi Jan 21, 2022
968e50c
Test all pipelines
danielelisi Jan 21, 2022
e93c98e
Merge pull request #1341 from ecadlabs/gh_action_cache_fix
danielelisi Jan 21, 2022
a9f0521
feat: limit GH Action workflow concurrency to 1
danielelisi Jan 21, 2022
f853e48
Merge pull request #1345 from ecadlabs/gh_action_concurrency
danielelisi Jan 21, 2022
fd82909
Run Taquito integration tests from public GH runners
danielelisi Jan 21, 2022
acc3f55
Merge pull request #1349 from ecadlabs/public_gh_runner_integration_t…
danielelisi Jan 21, 2022
7c6c925
fix(michelson-encoder): improvement extract schema
roxaneletourneau Jan 14, 2022
fe70c64
refactor(generateschema): improved types
roxaneletourneau Jan 17, 2022
03306d1
Unit tests for generateSchema
roxaneletourneau Jan 14, 2022
b07a8a6
Deprecated ExtractSchema method in favor of generateSchema
roxaneletourneau Jan 21, 2022
077b436
Merge branch 'extractSchema' of github.com:ecadlabs/taquito into extr…
roxaneletourneau Jan 21, 2022
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
15 changes: 7 additions & 8 deletions .github/workflows/algolia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@ name: Algolia indexing
on:
schedule:
- cron: '0 0 * * *'

concurrency:
group: algolia-${{ github.ref }}
cancel-in-progress: true

jobs:
delete-current-algolia-index:
env:
ALGOLIA_UPDATE_API_KEY: ${{secrets.ALGOLIA_UPDATE_API_KEY}}
ALGOLIA_SEARCH_API_KEY: ${{secrets.ALGOLIA_SEARCH_API_KEY}}
ALGOLIA_APPLICATION_ID: ${{secrets.ALGOLIA_APPLICATION_ID}}
runs-on: ecad-taquito
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: cd website && npm ci
- name: Run delete script
run: cd website && npm run delete-index
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
schedule:
- cron: '0 14 * * 1'

concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

jobs:
analyse:
name: Analyse
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/deploy_edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
push:
branches:
- master

concurrency:
group: edge-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy-edge-package:
runs-on: ecad-taquito
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/master' }}
strategy:
matrix:
Expand All @@ -16,15 +21,16 @@ jobs:
VERDACCIO_TOKEN: ${{ secrets.EDGE_VERDACCIO_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- run: echo "PACKAGE_VERSION=`node -p "require('./packages/taquito/package.json').version"`" >> $GITHUB_ENV
- run: echo "BRANCH_NAME=`echo $GITHUB_REF | cut -d'/' -f 3`" >> $GITHUB_ENV
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/deploy_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@ on:
push:
branches:
- master

concurrency:
group: deploy-website-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: npm ci
- run: npm run lerna -- bootstrap
- run: npm run lerna run build
Expand Down
64 changes: 42 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,99 @@ on:
push:
branches:
- master

concurrency:
group: integration-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-and-test:
runs-on: ecad-taquito
runs-on: ubuntu-latest
strategy:
matrix:
node: [12.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: npm ci
- run: npm run lerna -- bootstrap
- run: npm run build
if: steps.lerna-build-cache.outputs.cache-hit != 'true'
- run: npm run lint
- run: npm run build-docs
- run: npm run test -- --runInBand
- uses: codecov/codecov-action@v1
- name: Codecov
uses: codecov/codecov-action@v1
with:
file: .coverage/*.json
env:
CI: true
RUN_INTEGRATION: true

integration-tests-hangzhounet:
runs-on: ecad-taquito
runs-on: ubuntu-latest
strategy:
matrix:
node: [12.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: npm ci
- run: npm run lerna -- bootstrap
- run: npm run build
if: steps.lerna-build-cache.outputs.cache-hit != 'true'
- name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
- run: cd integration-tests && npm run test:hangzhounet -- --maxWorkers=8
env:
CI: true
TEZOS_RPC_HANGZHOUNET: ${{ secrets.TEZOS_RPC_HANGZHOUNET }}

integration-tests-ithacanet:
runs-on: ecad-taquito
runs-on: ubuntu-latest
strategy:
matrix:
node: [12.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: npm ci
- run: npm run lerna -- bootstrap
- run: npm run build
if: steps.lerna-build-cache.outputs.cache-hit != 'true'
- name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
- run: cd integration-tests && npm run test:ithacanet -- --maxWorkers=8
env:
CI: true
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/preview_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
branches: [master]

concurrency:
group: preview-website-${{ github.ref }}
cancel-in-progress: true

jobs:
## This job will deploy the netlify preview builds
publish-website-preview:
Expand All @@ -13,12 +17,13 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/cache@v1
- name: Lerna Cache
uses: actions/cache@v2
id: lerna-build-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
packages/*/dist
key: ${{ runner.os }}-${{ hashFiles('packages/*/src/*.ts') }}
- run: npm ci
- run: npm run lerna -- bootstrap
- run: npm run lerna run build
Expand Down
11 changes: 5 additions & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

| Version | Supported |
| ------- | ------------------ |
| 7.x.x | :white_check_mark: |
| 6.0.x | :x: |
| 5.0.x | :x: |
| < 4.0 | :x: |
| 11.x.x | :white_check_mark: |
| 10.0.x | :x: |
| < 9.0 | :x: |

## Reporting a Vulnerability

Please report security issues to [email protected] or via keybase/jevonearth on keybase.io.
Please report security issues to [email protected] or via `keybase/jevonearth` on keybase.io.

Reports may be encrypted using keys published on keybase.io using keybase/jevonearth.
Reports may be encrypted using keys published on keybase.io using `keybase/jevonearth`.
22 changes: 16 additions & 6 deletions docs/ledger_signer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ The Ledger Signer implements the Signer interface of Taquito, allowing you to si
You need to have the [Tezos Wallet app](https://support.ledger.com/hc/en-us/articles/360016057774-Tezos-XTZ-) installed and opened on your Ledger device when using the Ledger Signer.
:::

You first need to import the desired transport from the [LedgerJs library](https://github.com/LedgerHQ/ledgerjs). The Ledger Signer has currently been tested with `@ledgerhq/hw-transport-node-hid` for Node-based application and with `@ledgerhq/hw-transport-u2f` for web applications.
You first need to import the desired transport from the [LedgerJs library](https://github.com/LedgerHQ/ledgerjs). The Ledger Signer has currently been tested with `@ledgerhq/hw-transport-node-hid` for Node-based applications and with ~~`@ledgerhq/hw-transport-u2f`~~ and `@ledgerhq/hw-transport-webhid` for web applications.

:::note
`@ledgerhq/hw-transport-u2f` has been deprecated and expires on February 22.


`@ledgerhq/hw-transport-webhid` is only supported on Chromium based browsers and has to be enabled by a specific configuration flag (chrome://flags/#enable-experimental-web-platform-features)

See the following link for a reference and migration guide: https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md.
:::

You can pass an instance of the transport of your choice to your Ledger Signer as follows:

<Tabs
Expand All @@ -24,10 +34,10 @@ values={[
<TabItem value="webApp">

```js
import TransportU2F from '@ledgerhq/hw-transport-u2f';
import TransportWebHID from "@ledgerhq/hw-transport-webhid";
import { LedgerSigner } from '@taquito/ledger-signer';

const transport = await TransportU2F.create();
const transport = await TransportWebHID.create();
const ledgerSigner = new LedgerSigner(transport);
```

Expand All @@ -51,7 +61,7 @@ The constructor of the `LedgerSigner` class can take three other parameters. If
You can use as a parameter the `HDPathTemplate` which refers to `44'/1729'/${account}'/0'`. You have to specify what is the index of the account you want to use. Or you can also use a complete path as a parameter.
_More details about paths below_
- prompt: **default is true**
If true, you will be asked on your Ledger device to send your public key for validation. **_Note that confirmation is required when using `@ledgerhq/hw-transport-u2f`, so you should not set this parameter to false if you are using this transport._**
If true, you will be asked on your Ledger device to send your public key for validation.
- derivationType: **default is DerivationType.ED25519**
It can be DerivationType.ED25519 (tz1), DerivationType.SECP256K1 (tz2) or DerivationType.P256 (tz3).

Expand Down Expand Up @@ -188,10 +198,10 @@ _Note that this example is not intended to be a complete example of paths scanni
```js live noInline
//import { LedgerSigner, DerivationType, HDPathTemplate } from '@taquito/ledger-signer';
//import { TezosToolkit } from '@taquito/taquito';
//import TransportU2F from "@ledgerhq/hw-transport-u2f";
// import TransportWebHID from "@ledgerhq/hw-transport-webhid";
//const Tezos = new TezosToolkit('https://hangzhounet.api.tez.ie');

TransportU2F.create().then((transport) => {
TransportWebHID.create().then((transport) => {
for (let index = 0, p = Promise.resolve(); index < 10; index++) {
p = p.then(
(_) =>
Expand Down
6 changes: 3 additions & 3 deletions example/deploy-docs-live-code-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const signer: any = new InMemorySigner(
);
export const tezos = new TezosToolkit(provider);

let contract_catalogue = new Map();
const contract_catalogue = new Map();

const users: Array<string> = [
//live code examples
Expand All @@ -51,7 +51,7 @@ const users: Array<string> = [
'tz1XTyqBn4xi9tkRDutpRyQwHxfF8ar4i4Wq',
];

let user_addresses = new Map();
const user_addresses = new Map();
user_addresses.set('TestFunder', users[0]);
user_addresses.set('Alice', users[1]);
user_addresses.set('Deborah', users[2]);
Expand All @@ -64,7 +64,7 @@ user_addresses.set('Allowances', users[8]);
user_addresses.set('BigMapLedger', users[9]);
user_addresses.set('IntegrationTestUser', users[10]);

var low_balance: Array<string> = [];
const low_balance: Array<string> = [];

const min_balance = 100000000;

Expand Down
Loading