Skip to content

Commit

Permalink
17.0.0 (#2508)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
4 people committed Jun 13, 2023
1 parent dbd427c commit b744498
Show file tree
Hide file tree
Showing 87 changed files with 2,844 additions and 749 deletions.
22 changes: 11 additions & 11 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: mumbainet
testnet_uppercase: MUMBAINET
- testnet: nairobinet
testnet_uppercase: NAIROBINET
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -69,10 +69,10 @@ jobs:
strategy:
matrix:
include:
- protocol: Mumbai
testnet: mumbainet
testnet_uppercase: MUMBAINET
flextesa_docker_image: oxheadalpha/flextesa:20230313
- protocol: Nairobi
testnet: nairobinet
testnet_uppercase: NAIROBINET
flextesa_docker_image: oxheadalpha/flextesa:20230607
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -113,19 +113,19 @@ jobs:
--protocol-kind ${{ matrix.protocol }}
- run: npm ci
- run: npm run build
- run: npm -w integration-tests run test:${{ matrix.testnet }}-secret-key sandbox-ballot-operation.spec.ts
- 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
env:
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
SECRET_KEY: edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
POLLING_INTERVAL_MILLISECONDS: 100
RPC_CACHE_MILLISECONDS: 0
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
- 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
- run: npm -w integration-tests run test:${{ matrix.testnet }}-secret-key sandbox-ballot-operation.spec.ts
env:
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
SECRET_KEY: edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
POLLING_INTERVAL_MILLISECONDS: 100
RPC_CACHE_MILLISECONDS: 0
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
8 changes: 4 additions & 4 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": "16.2.0",
"version": "17.0.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -25,9 +25,9 @@
},
"dependencies": {
"@airgap/beacon-sdk": "4.0.2",
"@taquito/beacon-wallet": "^16.2.0",
"@taquito/taquito": "^16.2.0",
"@taquito/utils": "^16.2.0",
"@taquito/beacon-wallet": "^17.0.0",
"@taquito/taquito": "^17.0.0",
"@taquito/utils": "^17.0.0",
"buffer": "^6.0.3",
"svelte-select": "^4.4.7",
"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 @@ -21,6 +21,7 @@
let availableNetworks = [
{ value: "ghostnet", label: "Ghostnet", group: "current testnets" },
{ value: "mumbainet", label: "Mumbainet", group: "current testnets" },
{ value: "nairobinet", label: "Nairobinet", group: "current testnets" },
{ value: "mainnet", label: "Mainnet", group: "mainnet" },
{ value: "dailynet", label: "Dailynet", group: "other testnets" },
{ value: "mondaynet", label: "Mondaynet", group: "other testnets" },
Expand Down Expand Up @@ -50,6 +51,9 @@
case "mumbainet":
store.updateNetworkType(NetworkType.MUMBAINET);
break;
case "nairobinet":
store.updateNetworkType(NetworkType.NAIROBINET);
break;
case "custom":
//TODO: input custom RPC URL
showCustomNetworkInput = true;
Expand Down
4 changes: 3 additions & 1 deletion apps/taquito-test-dapp/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NetworkType } from "@airgap/beacon-sdk";

export const rpcUrl = {
mumbainet: "https://mumbainet.ecadinfra.com/",
nairobinet: "https://nairobinet.ecadinfra.com/",
ghostnet: "https://ghostnet.ecadinfra.com/",
ithacanet: "https://ithacanet.ecadinfra.com/",
mainnet: "https://mainnet.api.tez.ie", //"https://mainnet-tezos.giganode.io"
Expand All @@ -17,5 +18,6 @@ export const contractAddress = {
ithacanet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
custom: "KT1T2gL26SwYMxpkR5SZT1pHRBF84knfw8Cg",
mumbainet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z"
mumbainet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z",
nairobinet: "KT1Tkm7U3NS9JWgeCGywrRTSQdLZJvDSgD5Z" // TODO: originate the contract and update this.
};
205 changes: 107 additions & 98 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,99 +1,108 @@
{
"words": [
"airgap",
"annots",
"Annot",
"bignumber",
"beaconwallet",
"bigmap",
"BIGMAPCONTRACT",
"bigmaps",
"Bjorsell",
"Boissonneault",
"camelcase",
"crios",
"dailynet",
"delphinet",
"ecad",
"ecadlabs",
"edonet",
"Ejara",
"entrypoints",
"FAILWITH",
"florencenet",
"fxios",
"ghostnet",
"granadanet",
"Guarda",
"Hackathon",
"inmemory",
"IPFS",
"ithacanet",
"jakartanet",
"Kernaghan",
"kukai",
"lambda",
"Letourneau",
"Ligo",
"micheline",
"Micheline",
"michelsonmap",
"mligo",
"mondaynet",
"mumbainet",
"mutez",
"nairobinet",
"precommit",
"println",
"Protofire",
"PtNairob",
"rollups",
"Roxane",
"SAPLINGCONTRACT",
"Sawali",
"SCORU",
"smartcontracts",
"staker",
"taquito",
"tezbridge",
"tezos",
"ticketer",
"toolbelt",
"TORU",
"typecheck",
"typeof",
"tzip",
"unopt",
"Umami",
"UNPAIR"
],
"files": [
"**/*.ts",
"**/*.tsx",
"**/*.toml",
"**/*.md",
"**/*.mdx",
"**/*.yml",
"**/*.yaml",
"**/*.svelte"
],
"ignorePaths": [
"**/node_modules/**",
"**/dist/**",
"**/coverage/**",
"**/docs/**",
"**/build/**",
"**/scripts/**",
"**/examples/**",
"**/packages/**"
],
"ignoreRegExpList": [
"KT1[a-zA-Z0-9]{33}",
"o[a-zA-Z0-9]{50}",
"tz[1-4][a-zA-Z0-9]{33}",
"tx[a-zA-Z0-9]{35}",
"B[LMK][a-zA-Z0-9]{49}",
"[\"':][a-zA-Z0-9]{54}[\"':]",
"[\"':][a-zA-Z0-9]{51}[\"':]"
]
}
"words": [
"airgap",
"Annot",
"annots",
"beaconwallet",
"bigmap",
"BIGMAPCONTRACT",
"bigmaps",
"bignumber",
"Bjorsell",
"Boissonneault",
"camelcase",
"crios",
"dailynet",
"delphinet",
"ecad",
"ecadlabs",
"edonet",
"edsk",
"Ejara",
"entrypoints",
"FAILWITH",
"flextesa",
"florencenet",
"fxios",
"ghostnet",
"granadanet",
"Guarda",
"Hackathon",
"inmemory",
"IPFS",
"ithacanet",
"jakartanet",
"Kernaghan",
"kukai",
"lambda",
"Letourneau",
"Ligo",
"micheline",
"Micheline",
"michelsonmap",
"mligo",
"mondaynet",
"mumbainet",
"mutez",
"nairobibox",
"nairobinet",
"octez",
"oxheadalpha",
"precommit",
"println",
"Protofire",
"PtNairobi",
"rollups",
"Roxane",
"SAPLINGCONTRACT",
"Sawali",
"SCORU",
"smartcontracts",
"staker",
"taquito",
"tcli",
"tezbridge",
"tezos",
"ticketer",
"toolbelt",
"TORU",
"typecheck",
"typeof",
"tzip",
"Umami",
"unopt",
"UNPAIR"
],
"files": [
"**/*.ts",
"**/*.tsx",
"**/*.toml",
"**/*.md",
"**/*.mdx",
"**/*.yml",
"**/*.yaml",
"**/*.sh",
"**/*.svelte"
],
"ignorePaths": [
"**/node_modules/**",
"**/dist/**",
"**/coverage/**",
"**/docs/**",
"**/build/**",
"**/scripts/**",
"**/examples/**",
"**/packages/**"
],
"ignoreRegExpList": [
"KT1[a-zA-Z0-9]{33}",
"o[a-zA-Z0-9]{50}",
"tz[1-4][a-zA-Z0-9]{33}",
"tx[a-zA-Z0-9]{35}",
"B[LMK][a-zA-Z0-9]{49}",
"Pt[a-zA-Z0-9]{49}",
"edsk[a-zA-Z0-9]{50}",
"[\"':][a-zA-Z0-9]{54}[\"':]",
"[\"':][a-zA-Z0-9]{51}[\"':]"
]
}
41 changes: 39 additions & 2 deletions docs/events.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,53 @@
---
title: Event subscription
title: Contract Events
id: subscribe_event
author: Davis Sawali
---

# Contract Event Logging
# Contract Events

## Introduction
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.

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

## Getting contract events in Taquito
You can get the events in a contract through the `eventSchema` field of the `ContractAbstraction`.

### Example
#### Usage
```typescript
const Tezos = new TezosToolkit(RPC_URL);
const contractAbstraction = Tezos.contract.at('KT1...');
console.log(contractAbstraction.eventSchema);
```

If the contract has events this might log something similar to:

```json
[
{
"tag": "%tag1",
"type": {
"prim": "int"
}
},
{
"tag": "%tag2",
"type": {
"prim": "int"
}
},
{
"tag": "%tag3",
"type": {
"prim": "string"
}
}
]
```


## Subscribing to Events in Taquito
Taquito provides a simple way for users to subscribe to certain events on the blockchain via the `PollingSubscribeProvider`.

Expand Down

0 comments on commit b744498

Please sign in to comment.