Skip to content

Commit

Permalink
Paris (#2914)
Browse files Browse the repository at this point in the history
* feat: configured paris branch (#2911)

* feat: configured paris branch

* test: updated estimation assertion

* 2884 remove get endorsing rights (#2916)

* feat: removed rpc.getEndorsingRights

* docs: update getBlock desc with default version 1

* test: updated estimation assertion

* test: updated estimation assertion

* test: updated estimation assertion

* updated protocol constants test (#2918)

* updated protocol constants test

* updated constants response for proto20

* updated missing properties and estimation values

* removed duplicate property

* 2678 rpc ai launch cycle (#2919)

* feat: support new rpc getAdaptiveIssuanceLaunchCycle and unit tests

re #2678

* test: add integration test and updated response type and description

* test: update test descript for clarity

* test: update estimation consumedMilligas assertion

* docs: updated docs/rpc_nodes_integration_test.md with getAdaptiveIssuanceLaunchCycle

* 2887 update ai rpc (#2923)

* feat: update getDelegates rpc type with adaptive issuance changes

* test: updated estimation assertion

* 2676 new ai rpc (#2926)

* added staking support in contract API, with unit and integration tests (#2930)

* added staking support in contract API, with unit and integration tests

* updated ux to not require destination (for stake/unstake) and not require a param for finalize unstake

* updated error message

* addressed PR comments

* remove wrong check

* removed undefined check for a more general falsy check

* feat: walletAPI supports stake, unstake, finalizeUnstake with integration-tests (#2935)

* docs: adapting getPendingOperations version change in description (#2936)

* feat: update rpc for dal (#2937)

* chore(releng) bump version to 20.0.0-beta.0

* test: added pseudo-entrypoints-forgin.spec.ts (#2938)

* updated baker account for staking tests (#2951)

* updated baker account for staking tests

* updated paris tests to not run on oxfordnet

* Staking wallet api refine (#2950)

* test: updated wallet/staking tests to be robust and walletAPI desc to be accurate

* docs: address comments for typedoc

* docs: added rounding explanation

* Documentation for Staking (#2928)

* docs: draft of documentation for staking

* docs: modifications in response to An's comments

* docs: fix spelling errors

* docs: added code samples

* docs: fixed mermaid error

* docs: add a note to doc that staking will be disabled for about two weeks after protocol activation

* docs: add wallet api code

* 2880 forger attestation with dal (#2949)

* feat: added rpc type of attestation_with_dal & endorsement_with_dal

* feat: added local-forger support of attestation_with_dal

* test: added unit tests

* test: removed logging

* New Paris protocol ticket literal (#2940)

* ticket literal

* legacy ticket typeckeck fix

* feat: adding local-forger opMapping with Ticket

---------

Co-authored-by: huianyang <hui-an.yang@ecadlabs.com>

* 2881 dal publish commitment (#2948)

* feat: added rpc type of dal_publish_commitment

* feat: added forger support of dal_publish_commitment

* test: added dal_publish_commitment unit test

* test: remove debug logging

* docs: add comments for commitment_proof bytes length

* Update Paris branch with newest Beacon version (v4.2.2-beta.4) (#2956)

* update beacon version to v4.2.2-beta.4

* removed space

* updated algoliasearch and fortawesome deps (#2954)

* 2912 paris cleanup (#2957)

* test: replaced all oxford ref with paris

* test: updated test mentioning protocol

* test: removed unneeded test case

* test: refine failing_noop test

* updated beacon wallet with new event sub (#2961)

* added comment and trigger ci

* chore(releng) bump version to 20.0.0-beta.1

* 2953 dapp staking (#2959)

* feat: implement test-dapp set-delegate

* feat: implement test-dapp stake/unstake/finalize-unstake

* ci: removed pr test-dapp preview restirction

* feat: support parisnet on test-dapp

* feat: modified testnet specific test names

* Dependencies 20240521 (#2965)

* build: snyk suggested website dependencies upgrade

* build: dependabot suggested dependencies upgrade

* docs: udpate website rpc_nodes page (#2966)

* chore(releng) bump version to 20.0.0-RC.0

* feat: adding new protocol hash (#2974)

* feat: adding new protocol hash PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ

* addressed review comment

* feat: supporting getAllDelegates in rpc (#2975)

* feat: supporting getAllDelegates in rpc

* test: remove unneeded logging

* chore(releng) bump version to 20.0.0-RC.1

* chore: satisfy lerna

* chore(releng) bump version to 20.0.0

* test: adjusted tests for paris2 protocol (#2980)

* updated estimate test values and mainnet constants for paris (#2982)

* updated estimate test values and mainnet constants for paris

* updated assertion to check for a 403 instead of 401 (old node response)

---------

Co-authored-by: huianyang <hui-an.yang@ecadlabs.com>
Co-authored-by: hui-an-yang <106410553+hui-an-yang@users.noreply.github.com>
Co-authored-by: ac10n <alirezahaghshenas@gmail.com>
Co-authored-by: Eugene Zagidullin <e.asphyx@gmail.com>
  • Loading branch information
5 people authored Jun 5, 2024
1 parent f33b37d commit 2530a28
Show file tree
Hide file tree
Showing 208 changed files with 10,444 additions and 6,624 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy_test_dapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
strategy:
matrix:
include:
- testnet: oxfordnet
testnet_uppercase: OXFORDNET
- testnet: parisnet
testnet_uppercase: PARISNET
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
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": "19.2.1",
"version": "20.0.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -26,10 +26,10 @@
"dependencies": {
"@airgap/beacon-sdk": "^4.2.2",
"@airgap/beacon-types": "^4.2.2",
"@taquito/beacon-wallet": "^19.2.1",
"@taquito/core": "^19.2.1",
"@taquito/taquito": "^19.2.1",
"@taquito/utils": "^19.2.1",
"@taquito/beacon-wallet": "^20.0.0",
"@taquito/core": "^20.0.0",
"@taquito/taquito": "^20.0.0",
"@taquito/utils": "^20.0.0",
"buffer": "^6.0.3",
"svelte-select": "^5.7.0",
"vite-compatible-readable-stream": "^3.6.1"
Expand Down
4 changes: 4 additions & 0 deletions apps/taquito-test-dapp/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
let availableNetworks = [
{ value: "ghostnet", label: "Ghostnet", group: "current testnets" },
{ value: "oxfordnet", label: "Oxfordnet", group: "current testnets" },
{ value: "parisnet", label: "Parisnet", group: "current testnets" },
{ value: "mainnet", label: "Mainnet", group: "mainnet" },
{ value: "dailynet", label: "Dailynet", group: "other testnets" },
{ value: "weeklynet", label: "Weeklynet", group: "other testnets" },
Expand Down Expand Up @@ -42,6 +43,9 @@
case "oxfordnet":
store.updateNetworkType(NetworkType.OXFORDNET);
break;
case "parisnet":
store.updateNetworkType(NetworkType.PARISNET);
break;
case "custom":
//TODO: input custom RPC URL
showCustomNetworkInput = true;
Expand Down
6 changes: 5 additions & 1 deletion apps/taquito-test-dapp/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { NetworkType } from '@airgap/beacon-types';

export type SupportedNetworks = NetworkType.OXFORDNET | NetworkType.GHOSTNET | NetworkType.MAINNET | NetworkType.CUSTOM;
export type SupportedNetworks = NetworkType.PARISNET | NetworkType.OXFORDNET | NetworkType.GHOSTNET | NetworkType.MAINNET | NetworkType.CUSTOM;

const rpcUrls: Record<SupportedNetworks, string> = {
[NetworkType.MAINNET]: "https://mainnet.ecadinfra.com",
[NetworkType.GHOSTNET]: "https://ghostnet.ecadinfra.com/",
[NetworkType.OXFORDNET]: "https://oxfordnet.ecadinfra.com/",
[NetworkType.PARISNET]: "https://rpc.parisnet.teztnets.com/",
[NetworkType.CUSTOM]: "https://ghostnet.ecadinfra.com/",
};

Expand All @@ -21,6 +22,8 @@ export const getTzKtUrl = (networkType: SupportedNetworks): string | undefined =
return "https://ghostnet.tzkt.io";
case NetworkType.OXFORDNET:
return "https://oxfordnet.tzkt.io";
case NetworkType.PARISNET:
return "https://parisnet.tzkt.io";
case NetworkType.CUSTOM:
return undefined;
}
Expand All @@ -35,4 +38,5 @@ export const contractAddress = {
mainnet: "KT1ShtH2zCrKMuWGRejEd6RAcnePwxBQeMAN",
ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
oxfordnet: "KT1GYx1KDhMQt2GJEztRh8EyYxJUPM6fnAMM",
parisnet: "KT1E43cQefjM8fq7B5pEJFJoGbRmuNibDoBC",
};
26 changes: 25 additions & 1 deletion apps/taquito-test-dapp/src/lib/TestContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
let loading = false;
let success: boolean | undefined;
let opHash = "";
let input = { text: "", fee: 400, storageLimit: 400, gasLimit: 1320, amount: 0, address: "" };
let input = { text: "", fee: 400, storageLimit: 400, gasLimit: 1320, amount: 0, address: "", delegate: "", stake: 0, unstake: 0 };
let testResult: { id: string; title: string; body: any };
const run = async () => {
Expand All @@ -28,6 +28,9 @@
test.id === "sign-payload-and-send" ||
test.id === "sign-failingNoop" ||
test.id === "verify-signature" ||
test.id === "set-delegate" ||
test.id === "stake" ||
test.id === "unstake" ||
test.id === "send-tez-to-etherlink" ||
test.id === "set-transaction-limits"
) {
Expand Down Expand Up @@ -303,6 +306,27 @@
bind:value={input.text}
/>
</div>
{:else if test.inputRequired && test.inputType === "delegate"}
<div class="test-input set-delegate">
<label for="delegate-address">
<span>Delegate address</span>
<input type="delegate" id="delegate-address" bind:value={input.delegate} />
</label>
</div>
{:else if test.inputRequired && test.inputType === "stake"}
<div class="test-input stake">
<label for="stake-amount">
<span>Stake amount</span>
<input type="stake" id="stake-amount" bind:value={input.stake} />
</label>
</div>
{:else if test.inputRequired && test.inputType === "unstake"}
<div class="test-input unstake">
<label for="unstake-amount">
<span>Unstake amount</span>
<input type="unstake" id="unstake-amount" bind:value={input.unstake} />
</label>
</div>
{:else if test.inputRequired && test.inputType === "etherlink"}
<div class="test-input test-send-tez-to-etherlink">
<label for="etherlink-address">
Expand Down
123 changes: 117 additions & 6 deletions apps/taquito-test-dapp/src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,66 @@ const sendTez = async (Tezos: TezosToolkit): Promise<TestResult> => {
}
};

const setDelegate = async (delegate: string, Tezos: TezosToolkit): Promise<TestResult> => {
let opHash = "";
try {
const op = await Tezos.wallet
.setDelegate({ delegate })
.send();
await op.confirmation();
opHash = op.opHash;
return { success: true, opHash };
} catch (error) {
console.log(error);
return { success: false, opHash: "" };
}
};

const stake = async (amount: number, Tezos: TezosToolkit): Promise<TestResult> => {
let opHash = "";
try {
const op = await Tezos.wallet
.stake({ amount })
.send();
await op.confirmation();
opHash = op.opHash;
return { success: true, opHash };
} catch (error) {
console.log(error);
return { success: false, opHash: "" };
}
};

const unstake = async (amount: number, Tezos: TezosToolkit): Promise<TestResult> => {
let opHash = "";
try {
const op = await Tezos.wallet
.unstake({ amount })
.send();
await op.confirmation();
opHash = op.opHash;
return { success: true, opHash };
} catch (error) {
console.log(error);
return { success: false, opHash: "" };
}
};

const finalizeUnstake = async (Tezos: TezosToolkit): Promise<TestResult> => {
let opHash = "";
try {
const op = await Tezos.wallet
.finalizeUnstake({})
.send();
await op.confirmation();
opHash = op.opHash;
return { success: true, opHash };
} catch (error) {
console.log(error);
return { success: false, opHash: "" };
}
};

const sendInt = async (
contract: ContractAbstraction<Wallet> | ContractAbstraction<ContractProvider>
): Promise<TestResult> => {
Expand Down Expand Up @@ -567,7 +627,11 @@ const saplingShielded = async (

export const list = [
"Send tez",
"Send tez from Ghostnet to Etherlink",
"Set Delegate",
"[parisnet] Stake",
"[parisnet] Unstake",
"[parisnet] Finalize Unstake",
"[ghostnet] Send tez from Ghostnet to Etherlink",
"Contract call with int",
"Contract call with (pair nat string)",
"Contract call that fails",
Expand All @@ -582,8 +646,8 @@ export const list = [
"Verify a provided signature",
"Set the transaction limits",
"Subscribe to confirmations",
"Permit contract",
"Sapling"
"[wip] Permit contract",
"[wip] Sapling"
];

export const init = (
Expand All @@ -602,9 +666,56 @@ export const init = (
inputRequired: false,
lastResult: { option: "none", val: false }
},
{
id: "set-delegate",
name: "Set Delegate",
description: "This test sets delegate to your specified address",
documentation: 'https://taquito.io/docs/set_delegate/#setdelegate',
keyword: 'delegate',
run: input => setDelegate(input.delegate, Tezos),
showExecutionTime: false,
inputRequired: true,
inputType: "delegate",
lastResult: { option: "none", val: false }
},
{
id: "stake",
name: "[parisnet] Stake",
description: "This test stake your spendable balance into frozen staked balance",
documentation: 'https://taquito.io/docs/staking',
keyword: 'stake',
run: input => stake(input.stake, Tezos),
showExecutionTime: false,
inputRequired: true,
inputType: "stake",
lastResult: { option: "none", val: false }
},
{
id: "unstake",
name: "[parisnet] Unstake",
description: "This test unstake amount from your frozen staked balance into unstaked frozen balance which after 4 cycles will become unstaked finalizable balance",
documentation: 'https://taquito.io/docs/staking',
keyword: 'unstake',
run: input => unstake(input.unstake, Tezos),
showExecutionTime: false,
inputRequired: true,
inputType: "unstake",
lastResult: { option: "none", val: false }
},
{
id: "finalize-unstake",
name: "[parisnet] Finalize unstake",
description: "This test transfer all unstaked finalizable balance back into spendable balance",
documentation: 'https://taquito.io/docs/staking',
keyword: 'finalizeUnstake',
run: () => finalizeUnstake(Tezos),
showExecutionTime: false,
inputRequired: false,
lastResult: { option: "none", val: false }
},
{
id: "send-tez-to-etherlink",
name: "Send tez from Ghostnet to Etherlink",
name: "[ghostnet] Send tez from Ghostnet to Etherlink",
description:
"This test allows you send your ghostnet tez to etherlink address",
documentation: '',
Expand Down Expand Up @@ -799,7 +910,7 @@ export const init = (
},
{
id: "permit",
name: "Permit contract",
name: "[wip] Permit contract",
description: "This test implements TZIP-17",
keyword: 'permit',
run: () => permit(Tezos, wallet),
Expand All @@ -809,7 +920,7 @@ export const init = (
},
{
id: "sapling-shielded",
name: "Sapling shielded transaction",
name: "[wip] Sapling shielded transaction",
description: "This test prepares and sends a shielded transaction to a Sapling pool",
documentation: 'https://taquito.io/docs/sapling/',
keyword: 'sapling',
Expand Down
12 changes: 4 additions & 8 deletions apps/taquito-test-dapp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface TestSettings {
run: (input?: any) => Promise<TestResult>;
showExecutionTime: boolean;
inputRequired: boolean;
inputType?: "string" | "set-limits" | "sapling" | "etherlink";
inputType?: "string" | "set-limits" | "sapling" | "delegate" | "stake" | "unstake" | "etherlink";
lastResult: { option: "none" | "some"; val: boolean };
}

Expand All @@ -24,13 +24,9 @@ export type TezosAccountAddress = `tz${"1" | "2" | "3"}${string}`;

// export enum NetworkType {
// MAINNET = "mainnet",
// DELPHINET = "delphinet",
// EDONET = "edonet",
// FLORENCENET = "florencenet",
// GRANADANET = "granadanet",
// HANGZHOUNET = "hangzhounet",
// ITHACANET = "ithacanet",
// GHOSTNET = "ghostnet",
// JAKARTANET = "jakartanet",
// WEEKLYNET = "weeklynet",
// OXFORDNET = "oxfordnet",
// PARISNET = "parisnet",
// CUSTOM = "custom"
// }
4 changes: 4 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"etherlink",
"eztz",
"FAILWITH",
"Finalizable",
"flextesa",
"florencenet",
"forgeable",
Expand Down Expand Up @@ -72,6 +73,7 @@
"oxfordbox",
"oxfordnet",
"oxheadalpha",
"parisnet",
"Pkhfrom",
"preattestation",
"precommit",
Expand Down Expand Up @@ -116,10 +118,12 @@
"typeof",
"tzip",
"Umami",
"unfinalizable",
"unopt",
"UNPAIR",
"Unparsing",
"unstake",
"Unstaked",
"vals",
"walletbeacon",
"weeklynet",
Expand Down
2 changes: 1 addition & 1 deletion docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Alternatively, you can use a `WalletProvider` to interact with a wallet. Please

## Examples

### Get the current Tezos balance for an address
### Get the current Tezos spendable balance for an address

```js live noInline
// import { TezosToolkit } from '@taquito/taquito';
Expand Down
5 changes: 0 additions & 5 deletions docs/rpc_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ values={[
|------------------|--------------|------------------------------------------|---------------------------------------------------------------------------------|
| ECAD Labs | Mainnet | https://mainnet.ecadinfra.com | [Check](https://mainnet.ecadinfra.com/chains/main/blocks/head/header) |
| ECAD Labs | Ghostnet | https://ghostnet.ecadinfra.com | [Check](https://ghostnet.ecadinfra.com/chains/main/blocks/head/header) |
| ECAD Labs | Oxfordnet | https://oxfordnet.ecadinfra.com | [Check](https://oxfordnet.ecadinfra.com/chains/main/blocks/head/header) |
| SmartPy | Mainnet | https://mainnet.smartpy.io | [Check](https://mainnet.smartpy.io/chains/main/blocks/head/header) |
| SmartPy | Ghostnet | https://ghostnet.smartpy.io | [Check](https://ghostnet.smartpy.io/chains/main/blocks/head/header) |
| Tezos Foundation | Mainnet | https://rpc.tzbeta.net/ | [Check](https://rpc.tzbeta.net/chains/main/blocks/head/header) |
| Tezos Foundation | Ghostnet | https://rpc.ghostnet.teztnets.com/ | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) |
| Tezos Foundation | Oxfordnet | https://rpc.oxfordnet.teztnets.com/ | [Check](https://rpc.oxfordnet.teztnets.com/chains/main/blocks/head/header) |
| Tezos Foundation | Parisnet | https://rpc.parisnet.teztnets.com/ | [Check](https://rpc.parisnet.teztnets.com/chains/main/blocks/head/header) |
| Marigold | Mainnet | https://mainnet.tezos.marigold.dev/ | [Check](https://mainnet.tezos.marigold.dev/chains/main/blocks/head/header) |
| Marigold | Ghostnet | https://ghostnet.tezos.marigold.dev/ | [Check](https://ghostnet.tezos.marigold.dev/chains/main/blocks/head/header) |
| Marigold | Oxfordnet | https://oxfordnet.tezos.marigold.dev/ | [Check](https://oxfordnet.tezos.marigold.dev/chains/main/blocks/head/header) |

*If you are aware of a public node missing from our list or our information is inaccurate, please help us by submitting an issue or pull request on our GitHub page.*
</TabItem>
Expand Down
Loading

0 comments on commit 2530a28

Please sign in to comment.