Skip to content

Commit

Permalink
docs: updated website versioned_docs to be latest 5 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Jan 6, 2025
1 parent 655216b commit 188e0cc
Show file tree
Hide file tree
Showing 81 changed files with 1,413 additions and 270 deletions.
26 changes: 0 additions & 26 deletions website/versioned_docs/version-19.0.0/mobile_bundle.md

This file was deleted.

113 changes: 0 additions & 113 deletions website/versioned_docs/version-19.0.0/rpc_nodes_integration_test.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const batch = await Tezos.wallet.batch()
If you prefer having an array that contains objects with the different transactions you want to emit, you can use the `with` method. It allows you to group transactions as objects instead of concatenating function calls. The object you use expects the same properties as the parameter of the corresponding method with an additional `kind` property that indicates the kind of transaction you want to emit (a handy `opKind` enum is [exported from the Taquito package](https://github.com/ecadlabs/taquito/blob/master/packages/taquito-rpc/src/opkind.ts) with the valid values for the `kind` property).
```js
import { OpKind } from '@taquito/taquito';
import { OpKind, UnitValue } from '@taquito/taquito';

const batch = await Tezos.wallet.batch([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class CancellableHttpBackend extends HttpBackend {

try {
const response = await fetch(urlWithQuery, {
keepalive: false, // generally only for Node 19 and above
method,
headers,
body: JSON.stringify(data),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Consensus Keys
author: Davis Sawali & Hui-An Yang
---

The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation/preendorsements and attestation/endorsements). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key)
The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation and attestation). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key)

Starting from Lima protocol, these 2 new operations will be available:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,23 +956,23 @@ ledger.set(
);

const url = 'https://storage.googleapis.com/tzip-16/fa2-views.json';
const bytesUrl = char2Bytes(url);
const bytesUrl = stringToBytes(url);
const metadata = new MichelsonMap();
metadata.set('', bytesUrl);

const operators = new MichelsonMap();

const tokens = new MichelsonMap();
const metadataMap0 = new MichelsonMap();
metadataMap0.set('', char2Bytes('https://storage.googleapis.com/tzip-16/token-metadata.json'));
metadataMap0.set('name', char2Bytes('Name from URI is prioritized!'));
metadataMap0.set('', stringToBytes('https://storage.googleapis.com/tzip-16/token-metadata.json'));
metadataMap0.set('name', stringToBytes('Name from URI is prioritized!'));
const metadataMap1 = new MichelsonMap();
metadataMap1.set('name', char2Bytes('AliceToken'));
metadataMap1.set('symbol', char2Bytes('ALC'));
metadataMap1.set('name', stringToBytes('AliceToken'));
metadataMap1.set('symbol', stringToBytes('ALC'));
metadataMap1.set('decimals', '30');
metadataMap1.set('extra', char2Bytes('Add more data'));
metadataMap1.set('extra', stringToBytes('Add more data'));
const metadataMap2 = new MichelsonMap();
metadataMap2.set('name', char2Bytes('Invalid token metadata'));
metadataMap2.set('name', stringToBytes('Invalid token metadata'));
tokens.set('0', {
metadata_map: metadataMap0,
total_supply: '20000',
Expand Down Expand Up @@ -1059,8 +1059,8 @@ const metadataJSON = {
};

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

const tacoShopStorageMap = new MichelsonMap();

Expand Down Expand Up @@ -1115,7 +1115,7 @@ storage (pair (big_map %metadata string bytes)

```js
const url = 'https://storage.googleapis.com/tzip-16/taco-shop-metadata.json';
const bytesUrl = char2Bytes(url);
const bytesUrl = stringToBytes(url);

const metadataBigMap = new MichelsonMap();
metadataBigMap.set('', bytesUrl);
Expand Down Expand Up @@ -1177,7 +1177,7 @@ const urlPercentEncoded = encodeURIComponent(
);
const metadataSha256 = '0x7e99ecf3a4490e3044ccdf319898d77380a2fc20aae36b6e40327d678399d17b';
const url = 'sha256://' + metadataSha256 + '/https:' + urlPercentEncoded;
const bytesUrl = char2Bytes(url);
const bytesUrl = stringToBytes(url);

const metadataBigMap = new MichelsonMap();
metadataBigMap.set('', bytesUrl);
Expand Down Expand Up @@ -1235,7 +1235,7 @@ storage (pair (big_map %metadata string bytes)

```js
const uri = 'ipfs://QmXnASUptTDnfhmcoznFqz3S1Mxu7X1zqo2YwbTN3nW52V';
const bytesUrl = char2Bytes(uri);
const bytesUrl = stringToBytes(uri);

const metadataBigMap = new MichelsonMap();
metadataBigMap.set('', bytesUrl);
Expand Down Expand Up @@ -1291,8 +1291,8 @@ storage (pair nat (big_map %metadata string bytes));

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

const op = await tezos.contract.originate({
code: contractCode,
Expand Down Expand Up @@ -1340,8 +1340,8 @@ storage (pair nat (big_map %metadata string bytes));

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

const op = await tezos.contract.originate({
code: contractCode,
Expand All @@ -1367,7 +1367,7 @@ license: MIT

Transactions to smart contracts operate in the same fashion as transactions to an implicit account, the only difference being the `KT1...` address. You will also receive a transaction hash and have to wait for the transaction to be confirmed. Once confirmed, it can be the right time to update the user's/contract's balance, for example.

Sending a transaction to a smart contract to update its storage will be a different type of action as it implies targetting a specific entrypoint and formatting correctly the data to be sent.
Sending a transaction to a smart contract to update its storage will be a different type of action as it implies targeting a specific entrypoint and formatting correctly the data to be sent.

Fortunately, Taquito will make this operation go like a breeze! First, you need the contract abstraction created with the address of the smart contract you are targeting:

Expand Down
Loading

0 comments on commit 188e0cc

Please sign in to comment.