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 18, 2023
2 parents b89cc71 + a8dac9c commit dfce26e
Show file tree
Hide file tree
Showing 125 changed files with 13,440 additions and 8,590 deletions.
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.1",
"version": "17.3.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -24,10 +24,10 @@
"vite": "^3.2.0"
},
"dependencies": {
"@airgap/beacon-sdk": "4.0.10",
"@taquito/beacon-wallet": "^17.3.1",
"@taquito/taquito": "^17.3.1",
"@taquito/utils": "^17.3.1",
"@airgap/beacon-sdk": "4.0.12",
"@taquito/beacon-wallet": "^17.3.2",
"@taquito/taquito": "^17.3.2",
"@taquito/utils": "^17.3.2",
"buffer": "^6.0.3",
"svelte-select": "^4.4.7",
"vite-compatible-readable-stream": "^3.6.1"
Expand Down
2 changes: 1 addition & 1 deletion apps/taquito-test-dapp/src/lib/TestContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
<div style="word-break:break-word;">
<p>{testResult.title}</p>
{#each Object.entries(testResult.body) as [name, res]}
<p>{name}: {stringify(res)}</p>
<p>{name}: {JSON.stringify(res)}</p>
{/each}
</div>
{/if}
Expand Down
10 changes: 5 additions & 5 deletions apps/taquito-test-dapp/src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const signPayload = async (
};
} catch (error) {
console.log(error);
return { success: false, opHash: "", output: stringify(error) };
return { success: false, opHash: "", output: JSON.stringify(error) };
}
};

Expand Down Expand Up @@ -311,7 +311,7 @@ const signPayloadAndSend = async (
sigDetails: { input, formattedInput, bytes: payload.payload }
};
} catch (error) {
return { success: false, opHash: "", output: stringify(error) };
return { success: false, opHash: "", output: JSON.stringify(error) };
}
};

Expand All @@ -330,11 +330,11 @@ const signFailingNoop = async (
success: true,
opHash: "",
output: signedPayload.signature,
sigDetails: { input, bytes: '03' + signedPayload.bytes, formattedInput: stringify(signedPayload.signedContent) },
sigDetails: { input, bytes: '03' + signedPayload.bytes, formattedInput: JSON.stringify(signedPayload.signedContent) },
};
} catch (error) {
console.log(error);
return { success: false, opHash: "", output: stringify(error) };
return { success: false, opHash: "", output: JSON.stringify(error) };
}
};

Expand Down Expand Up @@ -369,7 +369,7 @@ const verifySignatureWithTaquito = async (
throw "Forged signature is incorrect";
}
} catch (error) {
return { success: false, opHash: "", output: stringify(error) };
return { success: false, opHash: "", output: JSON.stringify(error) };
}
};

Expand Down
12 changes: 12 additions & 0 deletions docs/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
title: Versions
author: Jev Bjorsell
---
# Taquito v17.3.2

## Summary
- Updated Beacon version to v4.0.12

## Documentation
- Updated website documentation to group sections by logical order instead of alphabetical #2665
- Added detail for `getBalance()` method documentation that it returns balances in mutez #2495

## Internals
- Minor typo fix on variable name in `RpcEstimateProvider` [PR#2669](https://github.com/ecadlabs/taquito/pull/2669)
- Added `@taquito/core` as an explicit dependency on other packages [PR#2673](https://github.com/ecadlabs/taquito/pull/2673)

# Taquito v17.3.1

Expand Down
9 changes: 4 additions & 5 deletions example/deploy-docs-live-code-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { contractMap8pairs } from './data/contractMap8pairs';
import { char2Bytes } from '@taquito/utils';
import { fa2Contract } from '../integration-tests/data/fa2_contract';
import BigNumber from 'bignumber.js';
import { stringify } from '@taquito/core';


const provider = 'https://ghostnet.ecadinfra.com/';
Expand Down Expand Up @@ -180,7 +179,7 @@ async function originateTheContracts() {
contract_catalogue.forEach((value, key) => {
jsonObject[key] = value;
});
console.log(stringify(jsonObject));
console.log(JSON.stringify(jsonObject));
}
}

Expand Down Expand Up @@ -585,7 +584,7 @@ async function originateTzip16Storage() {

const metadataBigMap = new MichelsonMap();
metadataBigMap.set('', char2Bytes('tezos-storage:here'));
metadataBigMap.set('here', char2Bytes(stringify(metadataJSON)));
metadataBigMap.set('here', char2Bytes(JSON.stringify(metadataJSON)));

const tacoShopStorageMap = new MichelsonMap();

Expand Down Expand Up @@ -697,7 +696,7 @@ async function originateTzip16OnChainJSON() {
try {
const metadataBigMAp = new MichelsonMap();
metadataBigMAp.set('', char2Bytes('tezos-storage:here'));
metadataBigMAp.set('here', char2Bytes(stringify(metadataViewsExample1)));
metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample1)));

const op = await tezos.contract.originate({
code: contractCode,
Expand All @@ -720,7 +719,7 @@ async function originateTzip16OnChainMultiply() {
try {
const metadataBigMAp = new MichelsonMap();
metadataBigMAp.set('', char2Bytes('tezos-storage:here'));
metadataBigMAp.set('here', char2Bytes(stringify(metadataViewsExample2)));
metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample2)));

const op = await tezos.contract.originate({
code: contractCode,
Expand Down
5 changes: 2 additions & 3 deletions example/encode-michelson.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from '@taquito/core';
import { Parser } from '@taquito/michel-codec'

const example = async () => {
Expand All @@ -16,11 +15,11 @@ const example = async () => {

console.log('Example 1')
const exp1 = p.parseMichelineExpression(ex1)
console.log(stringify(exp1))
console.log(JSON.stringify(exp1))

console.log('Example 2')
const exp2 = p.parseMichelineExpression(ex2)
console.log(stringify(exp2))
console.log(JSON.stringify(exp2))

} catch (ex) {
console.log(ex)
Expand Down
3 changes: 1 addition & 2 deletions example/example-bigmap-keys-as-deep-pair.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from '@taquito/core';
import { Parser } from '@taquito/michel-codec'
import { Schema } from '@taquito/michelson-encoder';

Expand All @@ -20,7 +19,7 @@ const example = async () => {
const parsed_storage: any = p.parseMichelineExpression(example_storage_in_michelson )

const schema = new Schema(parsed_storage);
console.log(stringify(schema.ExtractSchema(), null, 2))
console.log(JSON.stringify(schema.ExtractSchema(), null, 2))
} catch (ex) {
console.log(ex)
}
Expand Down
3 changes: 1 addition & 2 deletions example/example-bigmap-keys-as-pair.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from '@taquito/core';
import { Parser } from '@taquito/michel-codec'
import { Schema } from '@taquito/michelson-encoder';

Expand All @@ -20,7 +19,7 @@ const example = async () => {
const parsed_storage: any = p.parseMichelineExpression(example_storage_in_michelson )

const schema = new Schema(parsed_storage);
console.log(stringify(schema.ExtractSchema(), null, 2))
console.log(JSON.stringify(schema.ExtractSchema(), null, 2))
} catch (ex) {
console.log(ex)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { char2Bytes } from '@taquito/utils';
import { tacoContractTzip16 } from "../integration-tests/data/modified-taco-contract"
import { MichelsonMap } from "@taquito/taquito";
import { InMemorySigner } from '@taquito/signer';
import { stringify } from '@taquito/core';

async function example() {
const provider = 'https://ghostnet.ecadinfra.com';
Expand Down Expand Up @@ -35,7 +34,7 @@ async function example() {

const metadataBigMAp = new MichelsonMap();
metadataBigMAp.set("", char2Bytes('tezos-storage:here'));
metadataBigMAp.set("here", char2Bytes(stringify(metadataJSON)))
metadataBigMAp.set("here", char2Bytes(JSON.stringify(metadataJSON)))

const tacoShopStorageMap = new MichelsonMap();

Expand Down
3 changes: 1 addition & 2 deletions example/example-tzip-16-on-chain-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { MichelsonMap, TezosToolkit } from '@taquito/taquito';
import { contractCode, metadataViewsExample1 } from '../integration-tests/data/metadataViews';
import { char2Bytes } from '@taquito/utils';
import { InMemorySigner } from '@taquito/signer';
import { stringify } from '@taquito/core';

async function example() {
const provider = 'https://ghostnet.ecadinfra.com';
Expand All @@ -15,7 +14,7 @@ async function example() {

const metadataBigMAp = new MichelsonMap();
metadataBigMAp.set("", char2Bytes('tezos-storage:here'));
metadataBigMAp.set("here", char2Bytes(stringify(metadataViewsExample1)))
metadataBigMAp.set("here", char2Bytes(JSON.stringify(metadataViewsExample1)))

const op = await tezos.contract.originate({
code: contractCode,
Expand Down
3 changes: 1 addition & 2 deletions example/example-tzip-16-on-chain-two.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { MichelsonMap, TezosToolkit } from '@taquito/taquito';
import { InMemorySigner } from '@taquito/signer';
import { contractCode, metadataViewsExample2 } from '../integration-tests/data/metadataViews';
import { char2Bytes } from '@taquito/utils';
import { stringify } from '@taquito/core';

async function example() {
const provider = 'https://ghostnet.ecadinfra.com';
Expand All @@ -15,7 +14,7 @@ async function example() {

const metadataBigMAp = new MichelsonMap();
metadataBigMAp.set("", char2Bytes('tezos-storage:here'));
metadataBigMAp.set("here", char2Bytes(stringify(metadataViewsExample2)))
metadataBigMAp.set("here", char2Bytes(JSON.stringify(metadataViewsExample2)))

const op = await tezos.contract.originate({
code: contractCode,
Expand Down
3 changes: 1 addition & 2 deletions example/example-tzip-16-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { MichelsonMap, TezosToolkit } from '@taquito/taquito';
import { tacoContractTzip16 } from "../integration-tests/data/modified-taco-contract"
import { char2Bytes } from '@taquito/utils';
import { InMemorySigner } from '@taquito/signer';
import { stringify } from '@taquito/core';

async function example() {
const provider = 'https://ghostnet.ecadinfra.com';
Expand All @@ -26,7 +25,7 @@ async function example() {

const metadataBigMap = new MichelsonMap();
metadataBigMap.set("", char2Bytes('tezos-storage:here'));
metadataBigMap.set("here", char2Bytes(stringify(metadataJSON)))
metadataBigMap.set("here", char2Bytes(JSON.stringify(metadataJSON)))

// Ligo Taco shop contract modified to include metadata in storage
// https://ide.ligolang.org/p/-uS469slzUlSm1zwNqHl1A
Expand Down
3 changes: 1 addition & 2 deletions example/example-tzip-16.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from "@taquito/core";
import { TezosToolkit } from "@taquito/taquito";
import { tzip16, Tzip16Module } from '@taquito/tzip16';

Expand All @@ -9,7 +8,7 @@ async function example() {
tezos.addExtension(new Tzip16Module());
const contract = await tezos.contract.at("KT1JZVozQHLZN7TaACnX6NGBxUkhNjn6tmTB", tzip16)
const metadata = await contract.tzip16().getMetadata();
console.log(stringify(metadata, null, 2));
console.log(JSON.stringify(metadata, null, 2));

} catch (ex) {
console.error(ex);
Expand Down
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.1",
"version": "17.3.2",
"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.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",
"@taquito/ledger-signer": "^17.3.2",
"@taquito/local-forging": "^17.3.2",
"@taquito/michel-codec": "^17.3.2",
"@taquito/michelson-encoder": "^17.3.2",
"@taquito/rpc": "^17.3.2",
"@taquito/sapling": "^17.3.2",
"@taquito/signer": "^17.3.2",
"@taquito/taquito": "^17.3.2",
"@taquito/tzip16": "^17.3.2",
"@taquito/utils": "^17.3.2",
"bignumber.js": "^9.1.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CONFIGS } from './config';
import { OpKind } from '@taquito/taquito';
import { ligoSample } from './data/ligo-simple-contract';
import { stringify } from '@taquito/core';

CONFIGS().forEach(({ lib, rpc, setup }) => {

Expand All @@ -28,7 +27,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => {

simpleContractAddress = op.contractAddress!;
} catch(e) {
console.log(stringify(e));
console.log(JSON.stringify(e));
}
done();
});
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/contract-lambda-view.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { CONFIGS } from './config';
import { tzip7Contract } from './data/tzip_7_contract';
import { testContract } from './data/test_lambda_view';
import { fa2Contract } from './data/fa2_contract';
import { stringify } from '@taquito/core';

CONFIGS().forEach(({ lib, rpc, setup }) => {
const Tezos = lib;
const toJSON = (x: any) => JSON.parse(stringify(x));
const toJSON = (x: any) => JSON.parse(JSON.stringify(x));

describe(`Test contract with lambda view trough contract api using: ${rpc}`, () => {
beforeEach(async done => {
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/contract-override-estimate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from "@taquito/core";
import { CONFIGS } from "./config";
import { InvalidEstimateValueError } from '@taquito/taquito';

Expand All @@ -15,7 +14,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => {
const account = await createAddress();
pkh = await account.signer.publicKeyHash();
} catch(e) {
console.log(stringify(e));
console.log(JSON.stringify(e));
}

done();
Expand Down
5 changes: 2 additions & 3 deletions integration-tests/contract-permits.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { permit_fa12_smartpy } from './data/permit_fa12_smartpy';
import { buf2hex, char2Bytes, hex2buf } from '@taquito/utils';
import { tzip16, Tzip16Module } from '@taquito/tzip16';
import { packDataBytes } from "@taquito/michel-codec"
import { stringify } from '@taquito/core';

const blake = require('blakejs');
const bob_address = 'tz1Xk7HkSwHv6dTEgR7E2WC2yFj4cyyuj2Gh';
Expand Down Expand Up @@ -330,9 +329,9 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => {
try {
await fail_contract.methods.transfer(bootstrap3_address, bootstrap4_address, 1).send();
} catch (errors) {
let jsonStr: string = stringify(errors);
let jsonStr: string = JSON.stringify(errors);
let jsonObj = JSON.parse(jsonStr);
let error_code = stringify(jsonObj.errors[1].with.int);
let error_code = JSON.stringify(jsonObj.errors[1].with.int);
expect((error_code = '26'));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { stringify } from '@taquito/core';
import { CONFIGS } from './config';

CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => {
Expand All @@ -22,7 +21,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => {
await register.confirmation();

} catch(e) {
console.log(stringify(e));
console.log(JSON.stringify(e));
}

done();
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/pack.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { MichelsonType, MichelsonData, ProtocolID, packDataBytes } from "@taquit
import { MichelsonV1Expression } from "@taquito/rpc";
import fs from "fs";
import path from "path";
import { stringify } from "@taquito/core";

interface TypedTestData {
type?: MichelsonType;
Expand All @@ -30,7 +29,7 @@ CONFIGS().forEach(({ rpc, protocol }) => {
describe("Test pack", () => {
for (const s of src) {
const def = (s.proto === undefined || s.proto === protocol) ? test : test.skip;
def(`Verify that .pack for local pack will return same result as for network pack: ${stringify(s.data)} (${rpc})`, async done => {
def(`Verify that .pack for local pack will return same result as for network pack: ${JSON.stringify(s.data)} (${rpc})`, async done => {
const local = packDataBytes(s.data, s.type);
const rpcResult = await Tezos.rpc.packData({ data: s.data, type: s.type as MichelsonV1Expression }, { block: "head" })
expect(local.bytes).toEqual(rpcResult.packed);
Expand Down
Loading

0 comments on commit dfce26e

Please sign in to comment.