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

Paris #2914

Merged
merged 53 commits into from
Jun 5, 2024
Merged

Paris #2914

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a58bfaa
Merge branch 'master' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 11, 2024
b2a69e3
Merge branch 'master' of github.com:ecadlabs/taquito into paris
dsawali Apr 11, 2024
7df8e39
feat: configured paris branch (#2911)
hui-an-yang Apr 12, 2024
e52f40a
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 12, 2024
cf41c8b
2884 remove get endorsing rights (#2916)
hui-an-yang Apr 15, 2024
6047339
updated protocol constants test (#2918)
dsawali Apr 16, 2024
bb8a273
2678 rpc ai launch cycle (#2919)
hui-an-yang Apr 17, 2024
4aaff0f
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 17, 2024
b660df9
2887 update ai rpc (#2923)
hui-an-yang Apr 17, 2024
8e0a88e
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 18, 2024
a89b872
2676 new ai rpc (#2926)
hui-an-yang Apr 19, 2024
d95d865
added staking support in contract API, with unit and integration test…
dsawali Apr 24, 2024
de6f509
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 24, 2024
4e1b113
feat: walletAPI supports stake, unstake, finalizeUnstake with integra…
hui-an-yang Apr 24, 2024
90843ee
docs: adapting getPendingOperations version change in description (#2…
hui-an-yang Apr 25, 2024
e92898b
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 25, 2024
0ef6318
feat: update rpc for dal (#2937)
hui-an-yang Apr 25, 2024
31738db
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang Apr 25, 2024
8898070
chore(releng) bump version to 20.0.0-beta.0
dsawali Apr 25, 2024
e5a73d5
test: added pseudo-entrypoints-forgin.spec.ts (#2938)
hui-an-yang Apr 29, 2024
ff4e343
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 1, 2024
a288d19
Merge branch 'paris' of github.com:ecadlabs/taquito into paris
dsawali May 3, 2024
0840424
updated baker account for staking tests (#2951)
dsawali May 6, 2024
cce27ff
Staking wallet api refine (#2950)
hui-an-yang May 6, 2024
4fc008a
Documentation for Staking (#2928)
ac10n May 6, 2024
5fc27da
2880 forger attestation with dal (#2949)
hui-an-yang May 6, 2024
7794db7
Merge branch 'paris' of github.com:ecadlabs/taquito into paris
dsawali May 6, 2024
b99a184
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 6, 2024
c42a420
New Paris protocol ticket literal (#2940)
e-asphyx May 8, 2024
0491a9f
2881 dal publish commitment (#2948)
hui-an-yang May 9, 2024
1847951
Update Paris branch with newest Beacon version (v4.2.2-beta.4) (#2956)
dsawali May 9, 2024
404affa
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 13, 2024
65bd481
updated algoliasearch and fortawesome deps (#2954)
dsawali May 14, 2024
9c30e01
2912 paris cleanup (#2957)
hui-an-yang May 14, 2024
d990528
updated beacon wallet with new event sub (#2961)
dsawali May 14, 2024
7dfd058
added comment and trigger ci
dsawali May 14, 2024
4c6e079
resolved merge conflict
dsawali May 14, 2024
55491db
chore(releng) bump version to 20.0.0-beta.1
dsawali May 14, 2024
0fa050d
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 21, 2024
9040b83
2953 dapp staking (#2959)
hui-an-yang May 21, 2024
0243c01
Dependencies 20240521 (#2965)
hui-an-yang May 21, 2024
053d01d
docs: udpate website rpc_nodes page (#2966)
hui-an-yang May 21, 2024
2d8a33c
Merge branch 'paris' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 21, 2024
8e07853
Merge branch 'master' of https://github.com/ecadlabs/taquito into paris
hui-an-yang May 21, 2024
35bba2d
chore(releng) bump version to 20.0.0-RC.0
hui-an-yang May 22, 2024
38e2525
feat: adding new protocol hash (#2974)
hui-an-yang May 28, 2024
3374a55
feat: supporting getAllDelegates in rpc (#2975)
hui-an-yang May 28, 2024
410beab
chore(releng) bump version to 20.0.0-RC.1
dsawali May 28, 2024
45fea4a
chore: satisfy lerna
dsawali May 31, 2024
4871f03
chore(releng) bump version to 20.0.0
dsawali May 31, 2024
18bca78
resolved merge conflicts
dsawali Jun 3, 2024
9bda597
test: adjusted tests for paris2 protocol (#2980)
hui-an-yang Jun 3, 2024
6865b99
updated estimate test values and mainnet constants for paris (#2982)
dsawali Jun 5, 2024
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
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@v3
- uses: actions/setup-node@v3
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
Loading