Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ecadlabs/taquito into flextesa-ti…
Browse files Browse the repository at this point in the history
…meout-fix
  • Loading branch information
hui-an-yang committed Oct 3, 2023
2 parents afb72c3 + 7211847 commit 71db431
Show file tree
Hide file tree
Showing 130 changed files with 5,872 additions and 4,733 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=8
- run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4
env:
# Ternary operator workaround
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && format('https://{0}.ecadinfra.com', matrix.testnet) || null }}
Expand Down Expand Up @@ -128,4 +128,4 @@ jobs:
TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
POLLING_INTERVAL_MILLISECONDS: 100
RPC_CACHE_MILLISECONDS: 0
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
10 changes: 5 additions & 5 deletions apps/taquito-test-dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taquito-test-dapp-vite",
"private": true,
"version": "17.3.0-beta.1",
"version": "17.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -24,10 +24,10 @@
"vite": "^3.2.0"
},
"dependencies": {
"@airgap/beacon-sdk": "4.0.6",
"@taquito/beacon-wallet": "^17.3.0-beta.1",
"@taquito/taquito": "^17.3.0-beta.1",
"@taquito/utils": "^17.3.0-beta.1",
"@airgap/beacon-sdk": "4.0.10",
"@taquito/beacon-wallet": "^17.3.1",
"@taquito/taquito": "^17.3.1",
"@taquito/utils": "^17.3.1",
"buffer": "^6.0.3",
"svelte-select": "^4.4.7",
"vite-compatible-readable-stream": "^3.6.1"
Expand Down
332 changes: 250 additions & 82 deletions docs/version.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@taquito/example",
"private": true,
"version": "17.3.0-beta.1",
"version": "17.3.1",
"scripts": {
"example": "node -r ts-node/register --preserve-symlinks example-node.ts",
"example:activation": "node -r ts-node/register --preserve-symlinks example-activate.ts",
Expand Down Expand Up @@ -41,16 +41,16 @@
},
"dependencies": {
"@ledgerhq/hw-transport-node-hid": "^6.27.3",
"@taquito/ledger-signer": "^17.3.0-beta.1",
"@taquito/local-forging": "^17.3.0-beta.1",
"@taquito/michel-codec": "^17.3.0-beta.1",
"@taquito/michelson-encoder": "^17.3.0-beta.1",
"@taquito/rpc": "^17.3.0-beta.1",
"@taquito/sapling": "^17.3.0-beta.1",
"@taquito/signer": "^17.3.0-beta.1",
"@taquito/taquito": "^17.3.0-beta.1",
"@taquito/tzip16": "^17.3.0-beta.1",
"@taquito/utils": "^17.3.0-beta.1",
"@taquito/ledger-signer": "^17.3.1",
"@taquito/local-forging": "^17.3.1",
"@taquito/michel-codec": "^17.3.1",
"@taquito/michelson-encoder": "^17.3.1",
"@taquito/rpc": "^17.3.1",
"@taquito/sapling": "^17.3.1",
"@taquito/signer": "^17.3.1",
"@taquito/taquito": "^17.3.1",
"@taquito/tzip16": "^17.3.1",
"@taquito/utils": "^17.3.1",
"bignumber.js": "^9.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const defaultConfig = ({
rpc: process.env[`TEZOS_RPC_${networkName}`] || defaultRpc,
pollingIntervalMilliseconds: process.env[`POLLING_INTERVAL_MILLISECONDS`] || undefined,
rpcCacheMilliseconds: process.env[`RPC_CACHE_MILLISECONDS`] || '1000',
knownBaker: process.env[`TEZOS_BAKER`] || 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD',
knownBaker: process.env[`TEZOS_BAKER`] || (networkName === 'MONDAYNET' ? 'tz1ck3EJwzFpbLVmXVuEn5Ptwzc6Aj14mHSH' : 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'),
knownContract: process.env[`TEZOS_${networkName}_CONTRACT_ADDRESS`] || knownContracts.contract,
knownBigMapContract: process.env[`TEZOS_${networkName}_BIGMAPCONTRACT_ADDRESS`] || knownContracts.bigMapContract,
knownTzip1216Contract: process.env[`TEZOS_${networkName}_TZIP1216CONTRACT_ADDRESS`] || knownContracts.tzip12BigMapOffChainContract,
Expand Down Expand Up @@ -149,7 +149,7 @@ const ghostnetEphemeral: Config =
defaultConfig({
networkName: 'GHOSTNET',
protocol: Protocols.PtMumbai2,
defaultRpc: 'ecad-ghostnet-rolling:8732',
defaultRpc: 'http://ecad-ghostnet-rolling:8732',
knownContracts: knownContractsPtGhostnet,
signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/ghostnet')
});
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/contract-estimation-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
const params = { fee: 2000, to: await Tezos.signer.publicKeyHash(), mutez: true, amount: amt - (1382 + DEFAULT_FEE.REVEAL) };

await expect(LowAmountTez.estimate.transfer(params)).rejects.toMatchObject({
id: 'proto.017-PtNairob.implicit.empty_implicit_contract',
id: expect.stringContaining('empty_implicit_contract'),
});
done();
});
Expand All @@ -208,7 +208,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
await expect(
LowAmountTez.estimate.transfer({ to: await Tezos.signer.publicKeyHash(), mutez: true, amount: amt })
).rejects.toMatchObject({
id: 'proto.017-PtNairob.tez.subtraction_underflow',
id: expect.stringContaining('subtraction_underflow'),
});
done();
});
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/contract-events.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CONFIGS } from "./config";
import { mainContractWithDuplicateEvents } from "./main-contract-with-duplicate-events";
import { mainContractWithDuplicateEvents } from "./data/main-contract-with-duplicate-events";

CONFIGS().forEach(({ lib, rpc, setup }) => {
const Tezos = lib;
Expand Down
47 changes: 25 additions & 22 deletions integration-tests/data/allTestsCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,85 +48,88 @@ interface TestCase {
expected?: object;
}

export const commonCases: TestCase[] = [
export const nairobiCases: TestCase[] = [
{
name: 'Delegation',
name: 'Set deposits limit 1000000',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.DELEGATION,
delegate: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
kind: OpKind.SET_DEPOSITS_LIMIT,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
limit: '1000000',
},
],
},
},
{
name: 'Reveal',
name: 'Unset deposits limit',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.REVEAL,
kind: OpKind.SET_DEPOSITS_LIMIT,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
public_key: 'edpkvS5QFv7KRGfa3b87gg9DBpxSm3NpSwnjhUjNBQrRUUR66F7C9g',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
storage_limit: '10'
},
],
},
},
];

export const commonCases: TestCase[] = [
{
name: 'Ballot',
name: 'Delegation',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.BALLOT,
kind: OpKind.DELEGATION,
delegate: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
period: -300,
ballot: 'yay',
proposal: 'PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
},
],
},
},
{
name: 'Set deposits limit 1000000',
name: 'Reveal',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.SET_DEPOSITS_LIMIT,
kind: OpKind.REVEAL,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
public_key: 'edpkvS5QFv7KRGfa3b87gg9DBpxSm3NpSwnjhUjNBQrRUUR66F7C9g',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
limit: '1000000',
},
],
},
},
{
name: 'Unset deposits limit',
name: 'Ballot',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.SET_DEPOSITS_LIMIT,
counter: '1',
kind: OpKind.BALLOT,
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
fee: '10000',
gas_limit: '10',
storage_limit: '10'
period: -300,
ballot: 'yay',
proposal: 'PsCARTHAGazKbHtnKfLzQg3kms52kSRpgnDY982a9oYsSXRLQEb',
},
],
},
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/known-contracts-ProtoALph.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { KnownContracts } from './known-contracts';
export const knownContractsProtoALph: KnownContracts = {
contract: "KT1EqE9uiQoodrX3hymdTsMzv4Ugh9Ba7WQh",
bigMapContract: "KT1AhkcgTg5Yve1akqhp3L2VYe9wuJyr9Cf2",
tzip12BigMapOffChainContract: "KT1L13TdpnvSnH9oax8BVsjsGwYUEAymvsUY",
saplingContract: "KT1REUu1WbovnUHgxP5ywV6Nc8WSTSquoRmw",
onChainViewContractAddress: "KT1NewFz74bCpfQw1qVkxGbN6MncRaVgaymH"
contract: "KT1XXrWDuK77kQWX55zjD347Wh6bwgmJDfJ8",
bigMapContract: "KT1NSDEhMTWoX2Vie98NCtQV4fVYoPfqfAN3",
tzip12BigMapOffChainContract: "KT1X4c8BCVSDE7dtf5jPRtpYtYcaSFknwzN5",
saplingContract: "KT1JKC49zUSCXJGKT2p1bHVWmg47rAgF53ff",
onChainViewContractAddress: "KT1FVjUZeH5KM8tMwYvrVCMC3QFyDRUBFNLk",
};
17 changes: 15 additions & 2 deletions integration-tests/local-forging.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import { CONFIGS } from "./config";
import { commonCases } from './data/allTestsCases';
import { commonCases, nairobiCases } from './data/allTestsCases';
import { LocalForger, ProtocolsHash } from '@taquito/local-forging'
import { TezosToolkit } from "@taquito/taquito";
import { Protocols, TezosToolkit } from "@taquito/taquito";

CONFIGS().forEach(({ rpc, protocol }) => {
const Tezos = new TezosToolkit(rpc);
const nairobinet = protocol === Protocols.PtNairobi ? it : it.skip;

describe(`Test local forger: ${rpc}`, () => {
// all protocols
nairobiCases.forEach(({ name, operation, expected }) => {
nairobinet(`Verify that .forge for local forge will return same result as for network forge for rpc: ${name} (${rpc})`, async done => {
const localForger = new LocalForger(protocol as unknown as ProtocolsHash);
const result = await localForger.forge(operation);
const rpcResult = await Tezos.rpc.forgeOperations(operation);
expect(result).toEqual(rpcResult);
expect(await localForger.parse(result)).toEqual(expected || operation);

done();
});
});

commonCases.forEach(({ name, operation, expected }) => {
it(`Verify that .forge for local forge will return same result as for network forge for rpc: ${name} (${rpc})`, async done => {
const localForger = new LocalForger(protocol as unknown as ProtocolsHash);
Expand Down
35 changes: 18 additions & 17 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,26 @@
"test:mondaynet-secret-key": "RUN_MONDAYNET_WITH_SECRET_KEY=true jest --runInBand",
"test": "jest"
},
"version": "17.3.0-beta.1",
"version": "17.3.1",
"dependencies": {
"@ledgerhq/devices": "6.20.0",
"@ledgerhq/hw-transport": "6.20.0",
"@ledgerhq/hw-transport-node-hid": "6.20.0",
"@ledgerhq/hw-transport-node-hid-noevents": "6.20.0",
"@taquito/contracts-library": "^17.3.0-beta.1",
"@taquito/http-utils": "^17.3.0-beta.1",
"@taquito/local-forging": "^17.3.0-beta.1",
"@taquito/michel-codec": "^17.3.0-beta.1",
"@taquito/michelson-encoder": "^17.3.0-beta.1",
"@taquito/remote-signer": "^17.3.0-beta.1",
"@taquito/rpc": "^17.3.0-beta.1",
"@taquito/sapling": "^17.3.0-beta.1",
"@taquito/signer": "^17.3.0-beta.1",
"@taquito/taquito": "^17.3.0-beta.1",
"@taquito/tzip12": "^17.3.0-beta.1",
"@taquito/tzip16": "^17.3.0-beta.1",
"@taquito/utils": "^17.3.0-beta.1",
"@ledgerhq/hw-transport": "6.28.8",
"@ledgerhq/hw-transport-node-hid": "6.27.21",
"@ledgerhq/hw-transport-node-hid-noevents": "6.27.19",
"@taquito/contracts-library": "^17.3.1",
"@taquito/core": "^17.3.1",
"@taquito/http-utils": "^17.3.1",
"@taquito/local-forging": "^17.3.1",
"@taquito/michel-codec": "^17.3.1",
"@taquito/michelson-encoder": "^17.3.1",
"@taquito/remote-signer": "^17.3.1",
"@taquito/rpc": "^17.3.1",
"@taquito/sapling": "^17.3.1",
"@taquito/signer": "^17.3.1",
"@taquito/taquito": "^17.3.1",
"@taquito/tzip12": "^17.3.1",
"@taquito/tzip16": "^17.3.1",
"@taquito/utils": "^17.3.1",
"bignumber.js": "^9.1.0",
"bip39": "3.0.4",
"blakejs": "^1.2.1"
Expand Down
Loading

0 comments on commit 71db431

Please sign in to comment.