Skip to content

Commit b744498

Browse files
dsawaliac10nmichaelkernaghandanielelisi
authored
17.0.0 (#2508)
* Configure Nairobinet for Integration Tests (#2492) * Configure Nairobinet * More Nairobinet configs * Originated known contracts * Configure Nairobinet for Integration Tests (#2492) * Configure Nairobinet * More Nairobinet configs * Originated known contracts * Update nairobi in other files (#2506) * Update nairobi in other files * undo changes to versioned docs * chore: rename PtNairob to PtNairobi * 2447 update gas limit for reveal in nairobi (#2494) * feat: updated GasLimit for reveal in Nairobi fix #2447 * fix: change mumbai tests to also run for later protocols * chore: fix failing unit tests * Fix failoing integration test * chore: rename PtNairob to PtNairobi * chore: apply changes as suggested by davis * chore: remove the unused logic * chore: fix values for the consumedMilligas in failing tests * fix unit tests after changes to reveal gasLimit * chore: revert gas limit for reveal to 2200 * Add EventSchema to ContractAbstraction (#2485) * fixed contract call estimate prep to check for reveal (#2502) * fixed contract call estimate prep to check for reveal * changed logic slightly * added keygen diagram to integration test readme (#2504) * added keygen diagram * text improvement * typo fix * Upgrade netlify-cli to fix the android dependency problem (#2496) * Re-create package-lock.json in root and website to trigger the problem * Upgrade netlify-cli * update most dependencies in website * Add EventSchema to ContractAbstraction * Remove duplicate events * fix typo * test: added integration test for events in ContractAbstraction * docs: add documentation for eventSchema --------- Co-authored-by: Davis Sawali <davis.sawali@ecadlabs.com> Co-authored-by: Michael Kernaghan <michaelkernaghan@ecadlabs.com> * removed mumbai references in v17 (#2511) * removed mumbai references in v17 * add block call for mumbai to get protocol constants * remove extraneous line * updated assertion values * updated assertion * fix test protocol constants * addressed pr comment and added proto15 tests * updated types for sc_rollup_cement in N (#2497) * Configure Nairobinet for Integration Tests (#2492) * Configure Nairobinet * More Nairobinet configs * Originated known contracts * updated types for sc_rollup_cement in N * updated unit test for updated types --------- Co-authored-by: AlirezaHaghshenas <alirezahaghshenas@gmail.com> * Both Mumbai and Nairobi integration test configurations should coexist * 1996 rpc 2 (#2522) * added validation for transferred amounts and updated readme * update flextesa image version * update sequence of test * chore(releng) bump version to 17.0.0-beta-RC.0 * chore: satisfy lerna * chore(releng) bump version to 17.0.0 --------- Co-authored-by: AlirezaHaghshenas <alirezahaghshenas@gmail.com> Co-authored-by: Michael Kernaghan <michaelkernaghan@ecadlabs.com> Co-authored-by: Daniele Lisi <22307776+danielelisi@users.noreply.github.com>
1 parent dbd427c commit b744498

File tree

87 files changed

+2844
-749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2844
-749
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
strategy:
4444
matrix:
4545
include:
46-
- testnet: mumbainet
47-
testnet_uppercase: MUMBAINET
46+
- testnet: nairobinet
47+
testnet_uppercase: NAIROBINET
4848
steps:
4949
- uses: actions/checkout@v3
5050
- uses: actions/setup-node@v3
@@ -69,10 +69,10 @@ jobs:
6969
strategy:
7070
matrix:
7171
include:
72-
- protocol: Mumbai
73-
testnet: mumbainet
74-
testnet_uppercase: MUMBAINET
75-
flextesa_docker_image: oxheadalpha/flextesa:20230313
72+
- protocol: Nairobi
73+
testnet: nairobinet
74+
testnet_uppercase: NAIROBINET
75+
flextesa_docker_image: oxheadalpha/flextesa:20230607
7676
steps:
7777
- uses: actions/checkout@v3
7878
- uses: actions/setup-node@v3
@@ -113,19 +113,19 @@ jobs:
113113
--protocol-kind ${{ matrix.protocol }}
114114
- run: npm ci
115115
- run: npm run build
116-
- run: npm -w integration-tests run test:${{ matrix.testnet }}-secret-key sandbox-ballot-operation.spec.ts
116+
- run: npm -w integration-tests run test:originate-known-contracts && npm -w integration-tests run test:${{ matrix.testnet }}-secret-key -- --testPathIgnorePatterns ledger-signer-failing-tests.spec.ts ledger-signer.spec.ts contract-estimation-tests.spec.ts rpc-get-protocol-constants.spec.ts sandbox-ballot-operation.spec.ts
117117
env:
118118
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
119-
SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
119+
SECRET_KEY: edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
120120
TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
121121
POLLING_INTERVAL_MILLISECONDS: 100
122122
RPC_CACHE_MILLISECONDS: 0
123123
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
124-
- run: npm -w integration-tests run test:originate-known-contracts && npm -w integration-tests run test:${{ matrix.testnet }}-secret-key -- --testPathIgnorePatterns ledger-signer-failing-tests.spec.ts ledger-signer.spec.ts contract-estimation-tests.spec.ts rpc-get-protocol-constants.spec.ts sandbox-ballot-operation.spec.ts
124+
- run: npm -w integration-tests run test:${{ matrix.testnet }}-secret-key sandbox-ballot-operation.spec.ts
125125
env:
126126
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
127-
SECRET_KEY: edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
127+
SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
128128
TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
129129
POLLING_INTERVAL_MILLISECONDS: 100
130130
RPC_CACHE_MILLISECONDS: 0
131-
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
131+
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb

apps/taquito-test-dapp/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "taquito-test-dapp-vite",
33
"private": true,
4-
"version": "16.2.0",
4+
"version": "17.0.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -25,9 +25,9 @@
2525
},
2626
"dependencies": {
2727
"@airgap/beacon-sdk": "4.0.2",
28-
"@taquito/beacon-wallet": "^16.2.0",
29-
"@taquito/taquito": "^16.2.0",
30-
"@taquito/utils": "^16.2.0",
28+
"@taquito/beacon-wallet": "^17.0.0",
29+
"@taquito/taquito": "^17.0.0",
30+
"@taquito/utils": "^17.0.0",
3131
"buffer": "^6.0.3",
3232
"svelte-select": "^4.4.7",
3333
"vite-compatible-readable-stream": "^3.6.1"

apps/taquito-test-dapp/src/App.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
let availableNetworks = [
2222
{ value: "ghostnet", label: "Ghostnet", group: "current testnets" },
2323
{ value: "mumbainet", label: "Mumbainet", group: "current testnets" },
24+
{ value: "nairobinet", label: "Nairobinet", group: "current testnets" },
2425
{ value: "mainnet", label: "Mainnet", group: "mainnet" },
2526
{ value: "dailynet", label: "Dailynet", group: "other testnets" },
2627
{ value: "mondaynet", label: "Mondaynet", group: "other testnets" },
@@ -50,6 +51,9 @@
5051
case "mumbainet":
5152
store.updateNetworkType(NetworkType.MUMBAINET);
5253
break;
54+
case "nairobinet":
55+
store.updateNetworkType(NetworkType.NAIROBINET);
56+
break;
5357
case "custom":
5458
//TODO: input custom RPC URL
5559
showCustomNetworkInput = true;

apps/taquito-test-dapp/src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NetworkType } from "@airgap/beacon-sdk";
22

33
export const rpcUrl = {
44
mumbainet: "https://mumbainet.ecadinfra.com/",
5+
nairobinet: "https://nairobinet.ecadinfra.com/",
56
ghostnet: "https://ghostnet.ecadinfra.com/",
67
ithacanet: "https://ithacanet.ecadinfra.com/",
78
mainnet: "https://mainnet.api.tez.ie", //"https://mainnet-tezos.giganode.io"
@@ -17,5 +18,6 @@ export const contractAddress = {
1718
ithacanet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
1819
ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
1920
custom: "KT1T2gL26SwYMxpkR5SZT1pHRBF84knfw8Cg",
20-
mumbainet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z"
21+
mumbainet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z",
22+
nairobinet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z" // TODO: originate the contract and update this.
2123
};

cspell.json

Lines changed: 107 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,108 @@
11
{
2-
"words": [
3-
"airgap",
4-
"annots",
5-
"Annot",
6-
"bignumber",
7-
"beaconwallet",
8-
"bigmap",
9-
"BIGMAPCONTRACT",
10-
"bigmaps",
11-
"Bjorsell",
12-
"Boissonneault",
13-
"camelcase",
14-
"crios",
15-
"dailynet",
16-
"delphinet",
17-
"ecad",
18-
"ecadlabs",
19-
"edonet",
20-
"Ejara",
21-
"entrypoints",
22-
"FAILWITH",
23-
"florencenet",
24-
"fxios",
25-
"ghostnet",
26-
"granadanet",
27-
"Guarda",
28-
"Hackathon",
29-
"inmemory",
30-
"IPFS",
31-
"ithacanet",
32-
"jakartanet",
33-
"Kernaghan",
34-
"kukai",
35-
"lambda",
36-
"Letourneau",
37-
"Ligo",
38-
"micheline",
39-
"Micheline",
40-
"michelsonmap",
41-
"mligo",
42-
"mondaynet",
43-
"mumbainet",
44-
"mutez",
45-
"nairobinet",
46-
"precommit",
47-
"println",
48-
"Protofire",
49-
"PtNairob",
50-
"rollups",
51-
"Roxane",
52-
"SAPLINGCONTRACT",
53-
"Sawali",
54-
"SCORU",
55-
"smartcontracts",
56-
"staker",
57-
"taquito",
58-
"tezbridge",
59-
"tezos",
60-
"ticketer",
61-
"toolbelt",
62-
"TORU",
63-
"typecheck",
64-
"typeof",
65-
"tzip",
66-
"unopt",
67-
"Umami",
68-
"UNPAIR"
69-
],
70-
"files": [
71-
"**/*.ts",
72-
"**/*.tsx",
73-
"**/*.toml",
74-
"**/*.md",
75-
"**/*.mdx",
76-
"**/*.yml",
77-
"**/*.yaml",
78-
"**/*.svelte"
79-
],
80-
"ignorePaths": [
81-
"**/node_modules/**",
82-
"**/dist/**",
83-
"**/coverage/**",
84-
"**/docs/**",
85-
"**/build/**",
86-
"**/scripts/**",
87-
"**/examples/**",
88-
"**/packages/**"
89-
],
90-
"ignoreRegExpList": [
91-
"KT1[a-zA-Z0-9]{33}",
92-
"o[a-zA-Z0-9]{50}",
93-
"tz[1-4][a-zA-Z0-9]{33}",
94-
"tx[a-zA-Z0-9]{35}",
95-
"B[LMK][a-zA-Z0-9]{49}",
96-
"[\"':][a-zA-Z0-9]{54}[\"':]",
97-
"[\"':][a-zA-Z0-9]{51}[\"':]"
98-
]
99-
}
2+
"words": [
3+
"airgap",
4+
"Annot",
5+
"annots",
6+
"beaconwallet",
7+
"bigmap",
8+
"BIGMAPCONTRACT",
9+
"bigmaps",
10+
"bignumber",
11+
"Bjorsell",
12+
"Boissonneault",
13+
"camelcase",
14+
"crios",
15+
"dailynet",
16+
"delphinet",
17+
"ecad",
18+
"ecadlabs",
19+
"edonet",
20+
"edsk",
21+
"Ejara",
22+
"entrypoints",
23+
"FAILWITH",
24+
"flextesa",
25+
"florencenet",
26+
"fxios",
27+
"ghostnet",
28+
"granadanet",
29+
"Guarda",
30+
"Hackathon",
31+
"inmemory",
32+
"IPFS",
33+
"ithacanet",
34+
"jakartanet",
35+
"Kernaghan",
36+
"kukai",
37+
"lambda",
38+
"Letourneau",
39+
"Ligo",
40+
"micheline",
41+
"Micheline",
42+
"michelsonmap",
43+
"mligo",
44+
"mondaynet",
45+
"mumbainet",
46+
"mutez",
47+
"nairobibox",
48+
"nairobinet",
49+
"octez",
50+
"oxheadalpha",
51+
"precommit",
52+
"println",
53+
"Protofire",
54+
"PtNairobi",
55+
"rollups",
56+
"Roxane",
57+
"SAPLINGCONTRACT",
58+
"Sawali",
59+
"SCORU",
60+
"smartcontracts",
61+
"staker",
62+
"taquito",
63+
"tcli",
64+
"tezbridge",
65+
"tezos",
66+
"ticketer",
67+
"toolbelt",
68+
"TORU",
69+
"typecheck",
70+
"typeof",
71+
"tzip",
72+
"Umami",
73+
"unopt",
74+
"UNPAIR"
75+
],
76+
"files": [
77+
"**/*.ts",
78+
"**/*.tsx",
79+
"**/*.toml",
80+
"**/*.md",
81+
"**/*.mdx",
82+
"**/*.yml",
83+
"**/*.yaml",
84+
"**/*.sh",
85+
"**/*.svelte"
86+
],
87+
"ignorePaths": [
88+
"**/node_modules/**",
89+
"**/dist/**",
90+
"**/coverage/**",
91+
"**/docs/**",
92+
"**/build/**",
93+
"**/scripts/**",
94+
"**/examples/**",
95+
"**/packages/**"
96+
],
97+
"ignoreRegExpList": [
98+
"KT1[a-zA-Z0-9]{33}",
99+
"o[a-zA-Z0-9]{50}",
100+
"tz[1-4][a-zA-Z0-9]{33}",
101+
"tx[a-zA-Z0-9]{35}",
102+
"B[LMK][a-zA-Z0-9]{49}",
103+
"Pt[a-zA-Z0-9]{49}",
104+
"edsk[a-zA-Z0-9]{50}",
105+
"[\"':][a-zA-Z0-9]{54}[\"':]",
106+
"[\"':][a-zA-Z0-9]{51}[\"':]"
107+
]
108+
}

docs/events.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,53 @@
11
---
2-
title: Event subscription
2+
title: Contract Events
33
id: subscribe_event
44
author: Davis Sawali
55
---
66

7-
# Contract Event Logging
7+
# Contract Events
88

99
## Introduction
1010
Contract events is a way for contracts to deliver event-like information to third-party (off-chain) applications. It can be emitted by using the EMIT instruction in Michelson.
1111

1212
For more details and examples of how the EMIT instruction works, refer to [this article](https://tezos.gitlab.io/kathmandu/event.html).
1313

14+
## Getting contract events in Taquito
15+
You can get the events in a contract through the `eventSchema` field of the `ContractAbstraction`.
16+
17+
### Example
18+
#### Usage
19+
```typescript
20+
const Tezos = new TezosToolkit(RPC_URL);
21+
const contractAbstraction = Tezos.contract.at('KT1...');
22+
console.log(contractAbstraction.eventSchema);
23+
```
24+
25+
If the contract has events this might log something similar to:
26+
27+
```json
28+
[
29+
{
30+
"tag": "%tag1",
31+
"type": {
32+
"prim": "int"
33+
}
34+
},
35+
{
36+
"tag": "%tag2",
37+
"type": {
38+
"prim": "int"
39+
}
40+
},
41+
{
42+
"tag": "%tag3",
43+
"type": {
44+
"prim": "string"
45+
}
46+
}
47+
]
48+
```
49+
50+
1451
## Subscribing to Events in Taquito
1552
Taquito provides a simple way for users to subscribe to certain events on the blockchain via the `PollingSubscribeProvider`.
1653

0 commit comments

Comments
 (0)