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

Add constants to web3-utils #493

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Add constants to web3-utils #493

merged 1 commit into from
Nov 16, 2023

Conversation

Ben-Rey
Copy link
Collaborator

@Ben-Rey Ben-Rey commented Nov 15, 2023

No description provided.

Copy link

sonarcloud bot commented Nov 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Ben-Rey Ben-Rey merged commit d9009b7 into main Nov 16, 2023
6 checks passed
@Ben-Rey Ben-Rey deleted the add-constants branch November 16, 2023 08:19
Ben-Rey added a commit that referenced this pull request Nov 16, 2023
* add max_coins (#233)

* little style fix (#234)

* removing esmify (#236)

* update version (#241)

* improved error message (#245)

* 243 testnet 23 objects format changes (#246)

* first changements

* some fixes

* fix buyrolls

* clean

* update version for testnet 23 (#248)

* remove env variables (#244)

* fix powered-by.yml (#239)

* remove fee from IReadData (#253)

* adding EventEmitter polyfill (#265)

* adding EventEmitter polyfill

* handling support of StringDecoder in both browser and node.js

* Generate coverage badge

* [CLEAN] Remove unnecessary else

* [CLEAN] suspend job temporarily

---------

Co-authored-by: massabot <info@massa.net>
Co-authored-by: Ben <br@massa.net>

* 261 setup test environment (#262)

Co-authored-by: massabot <info@massa.net>
Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>

* 269 test getBaseAccount, getWalletAccounts (#271)

Co-authored-by: massabot <info@massa.net>

* 251 refactor code for testnet 23 (#256)

Co-authored-by: Grégory Libert <greg_libert@yahoo.fr>

* 273 fix ci (#274)

* Generate coverage badge

* fix  ci (Smart contract example Deploy and Smart contract example Deploy)

---------

Co-authored-by: massabot <info@massa.net>

* tests getWalletAccountByAddress, addsecretkeystowallet (#272)

* Generate powered-by

* add u128, u256 serializers (#278)

* add u128, u256 serializers

* Generate coverage badge

* add u128, u256 args support

* Generate coverage badge

* review changes

---------

Co-authored-by: massabot <info@massa.net>

* 269 test walletGenerateNewAccount & getAccountFromSecretKey (#279)

* tests walletSignMessage & signMessage (#280)

* walletInfo, removeAddressesFromWallet, cleanWallet (#281)

* walletInfo, removeAddressesFromWallet, cleanWallet

* ci rpc url

* Generate coverage badge

* removing useless test

* fix conflicts

* Generate coverage badge

---------

Co-authored-by: massabot <info@massa.net>

* 269 tests getAccountBalance and verifySignature (#282)

* verifySignature test, fix verifySignature and names

* fix signMessage and verifySignature interfaces

* getAccountBalance test

* mock on console.log

* [TEST] skip node dependent test

* Generate coverage badge

---------

Co-authored-by: Ben <br@massa.net>
Co-authored-by: massabot <info@massa.net>

* add the "getProtoFiles" method to the SmartContractsClient class (#267)

* Generate coverage badge

* Delete test-wallet-example.yml (#289)

* update readSmartContract documentation (#255)

Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>

* 284 tests baseclient setProviders, getPrivateProviders & getPublicProviders (#285)

Co-authored-by: Grégory Libert <gl@massa.net>

* 292 clientFactory unit tests (#294)

* defaultClient factory

* customClientFactory

* Generate coverage badge

* fix sonarcloud

---------

Co-authored-by: massabot <info@massa.net>

* 295 unit tests eventpoller (#296)

* setup

* pollEvents test

* emit massa_event_error test

* Generate coverage badge

* timeout test

* fix ci

* setup

* pollEvents test

* emit massa_event_error test

* timeout test

* fix ci

* Generate coverage badge

* Generate coverage badge

* Add console error mock

* Generate coverage badge

* remove useless code mock

* Generate coverage badge

---------

Co-authored-by: massabot <info@massa.net>
Co-authored-by: Ben <br@massa.net>

* 284 tests baseclient sendJsonRPCRequest (#287)

* getprivateproviders ok

* getpublicproviders ok

* put public fonction instead of protected

* fix setProviders when empty array provided

* setProviders

* Generate coverage badge

* ci testing api

* getProviderForRpcMethod

* put getProviderForRpcMethod public (for testing purpose)

* Generate coverage badge

* adding nock to mock http request

* promisifyJsonRpcCall needs to be fixed

* handle errors from rpc

* fix urls

* Generate coverage badge

* remove old tests which are in other pr

* Generate coverage badge

* fix period offset

* testing protected functions

* Generate coverage badge

* put back protected/private sig

* new tests with private functions

* private signatures for functions

* removing nock

* remove old tests

* api urls

* Generate coverage badge

* private sig

* fix describe name

* add tests missing for coverage

* Generate coverage badge

* mock console.error

* resolve conflicts

* Generate coverage badge

* adding https

* Generate coverage badge

* export requestHeaders

---------

Co-authored-by: massabot <info@massa.net>

* Tests walletclient sendtransaction (#311)

* Generate coverage badge

* Generate coverage badge

* add support for u128 and u256 arrays (#299)

* add support for u128 and u256 arrays

* add missing exports

* Generate coverage badge

---------

Co-authored-by: massabot <info@massa.net>

* 297 tests eventPoller:  startPolling, stopPolling & compareByThreadAndPeriod (#301)

Co-authored-by: Grégory Libert <gl@massa.net>

* Generate coverage badge

* 313 tests walletclient buyrolls sellrolls (#314)

* feat(proto):  modifed proto fetcher to generate files in place (#309)

Co-authored-by: Grégory Libert <gl@massa.net>

* Generate coverage badge

* Test public api client (#319)

* 322 test smartContractsClient: deploySmartcontract (#325)

* 307 tests walletclient addaccountstowallet getwalletaddressesinfo getthreadnumber (#310)

* tests addAccountsToWallet

* Generate coverage badge

* add a waletinfo test

* Generate coverage badge

* getThreadNumber test

* Generate coverage badge

* add tests to walletInfo

* add getwalletaddressesinfo test + clean ts exception

* add final test to getwalletaddressesinfo

* mockData to pass ci

* Generate coverage badge

* fixing conflicts with main

* Generate coverage badge

* Generate coverage badge

* fix retryStrategyOn test

* fix code smell

* fix unnecessary await

* fix test because of code smell changes

* solve conflicts

* Generate coverage badge

* Generate coverage badge

---------

Co-authored-by: massabot <info@massa.net>

* 322 test smartContractsClient: callSmartContract (#328)

* fix serialization of string arrays (#316)

* fix serialization of string arrays

* Generate coverage badge

* Generate coverage badge

---------

Co-authored-by: massabot <info@massa.net>

* 322 test smartContractsClient: ReadSmartContract (#329)

* ci: support publish for multiple networks (#326)

* fix ci missing branch name (#340)

* fix ci release (#347)

* 322 test smartcontractsclient: getContractBalance & getFilteredScOutputEvents (#330)

* tests smartContractsClient: awaitRequiredOperationStatus (#338)

Co-authored-by: Grégory Libert <gl@massa.net>

* Remove DS_Store and add to gitignore (#351)

* unit tests for time.ts (#312)

* unit tests for time.ts

* fix
---------

Co-authored-by: massabot <info@massa.net>

* clean ci (#355)

* clean ci

* trigger only on main and buildnet

* commit only on main

---------

Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>

* fix skipped tests (#356)

* fix skipped tests

---------

Co-authored-by: massabot <info@massa.net>

* 346 tests privateapiclient (#348)

Co-authored-by: Grégory Libert <gl@massa.net>

* encode_decode unit tests (#321)

* encode_decode unit tests

---------

Co-authored-by: massabot <info@massa.net>

* tests for client.ts (#353)

Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>
Co-authored-by: Grégory Libert <gl@massa.net>

* 302 unit tests retry execute function (#305)

* added unit tests for retryExecuteFunction.ts

* adding console error mock

* add missing args parameter tests

* fix lint

---------

Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>

* Generate coverage badge

* update version (#357)

* SmartContractsClient.ts : getOperationStatus test (#334)

* 358 test smartcontractsclient executereadonlysmartcontract (#359)

Co-authored-by: Grégory Libert <gl@massa.net>

* Generate coverage badge

* clean SmartContractClient.spec.ts (#364)

* remove warnings

* validSignature mock data

* cleaning

* clean

* add test

* clean mock data

* add tests (#366)

* 370 add more tests for number.ts (#371)

* add tests to catch errors

* fix tests

* fix sonarcloud on privateApiClient spec (#361)

* add tests arrayToBytes & bytesToArray (#369)

* 360 mock tests getaccountbalance + small additional tests (#362)

* Generate coverage badge

* add buildnet in defaultProvider (#372)

* add buildnet in defaultProvider

* add new providers

---------

Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>

* add tests (#368)

* fix (and remake) getProtoFiles (#379)

* fix smells and set getProtoFiles to static (#381)

* export PROTO_FILE_SEPARATOR and MASSA_PROTOFILE_KEY (#383)

* add keyAndAddresses test (#385)

* simplify getProtofiles (#388)

* fixed (#389)

* Refactor verifySignature code (#378)

Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>
Co-authored-by: Grégory Libert <gl@massa.net>

* fix rpc uint8array buffer instanciation (#396)

* update getBlocks documentation (#403)

* delete duplicate mock data file (#394)

* delete useless file

* transfer content of deleted file

* new test of wallet operations

* comment rolls test

* Revert "new test of wallet operations"

This reverts commit ad3c880.

* remove getProtoFile (and move it to proto-cli) (#406)

* remove getProtoFile

* Delete MassaProtoFile.ts

* Generate coverage badge

* update version minor (#407)

* update version major (#408)

* fix rpc uint8array buffer instanciation (#413)

* add some serializer tests (#414)

* 374 update readme for testnet 23 (#375)

* add getDatastoreEntries remark

* update Readme

* update README

* update readme

* purge readme useless informations

* update readme

* Convert datastore entries to real uint8Array (#416)

* Convert datastore entries to real uint8Array

* Refactor datastore entries conversion to use map

* Refactor the conversion of datastore entries to use map

* Change entry to e

* Remove as cast on datastore entries

* update url of readme (#419)

* update url

* fix url

* add a readSmartContract method  (#418)

* add a readSmartContract method that could be called without initiating a smartContractClient

* Update src/web3/SmartContractsClient.ts

Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>

* fix code smell

---------

Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>

* Generate coverage badge

* 420 reorganizing typescript doc (#421)

* removing xbqcrypto and time from typedoc modules

* removing  time and xbqcrypto from modules sidebar

* adding navigation link + sidebar links

* fix links

* fix typo (#410)

* Bump word-wrap from 1.2.3 to 1.2.4 (#405)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump tough-cookie from 4.1.2 to 4.1.3 (#391)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Introduce wallet provider (#423)

* Use wallet provider in massa-web3

* Remove constraint private provider

* Remove test on constraint private API and fix parameters format in call sc using wallet providers.

* Remove duplicate readsmart contract

* Rework client initialization

* Generate powered-by

* Update package json (#425)

* Remove args and use web3-utils

* Update version

* update p json

---------

Co-authored-by: AurelienFT <aurelien.foucault@epitech.eu>

* Generate powered-by

* export withTimeoutRejection (#431)

* Update index.ts

* export Web3Account and WalletProviderAccount

* test fix example (#429)

* test fix example

* fix example smart contract

* fix wallet example

* remove slice

* try fix wallet example

* fix test-example

* clean console.log

---------

Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>

* attempt to fix sourcemap error (#432)

* move some interfaces to web3-utils (#434)

* move some interfaces to web3-utils

* update web3-utils

* Generate powered-by

* adding errors (#438)

* adding errors

* fixing some mockData

* adding errors throw

* Update src/web3/SmartContractsClient.ts

* use getContractBalance instead (#441)

* update to latest version of axios (#446)

* Generate powered-by

* add Args support for callSmartContract (#449)

* add Args support for callSmartContract

* update web3-utils import

* fix ci

* fix ci

* fix tests

* Generate powered-by

* Revert "update to latest version of axios (#446)" (#450)

This reverts commit 4a6b2c6.

* Generate powered-by

* fix args bearby (#451)

* fix args bearby

* update version web3-utils

* patch web3-utils

* Generate powered-by

* readOnly accept Args (#452)

* 444 make coins field optional (#445)

* coins is 0 by default and optional

* unit test

* new EOperationStatus (#448)

* new eoperationStatus

* all tests ok except included_pending

* update web3 utils version

* retrocompatibility

* Generate powered-by

* add string and uint8Array support for sign function (#454)

* Generate coverage badge

* Fix sign method (#455)

* fix sign

* fix sign

* return publicKey in Isignature

* fix tests

* update verifySignature

* fix tests

* update wallet pro (#458)

* update wallet pro

* update version minor

* Generate powered-by

* fix test (#459)

* fix signature from wallet pro (#461)

* fix signature from wallet pro

* fix wallet pro version

* patch

* Generate powered-by

* export IBaseAccount (#463)

* Fix address validation (#466) (#470)

Fix address validation with the right version decoding

* 473 adds code snippet for addresses public keys and private keys generation (#474)

* Generate code snippets

* Generate powered-by

* Remove Node.js 16 from CI (#476)

* Remove webpack and bundle related files (#478)

* Generate powered-by

* Convert repo to monorepo using npm workspaces and introduce web3-utils project (#481)

* Convert repo to monorepo using npm workspaces and introduce web3-utils project

* Generate coverage badge

* Fix tsconfig.base.json (#482)

* refactor awaitRequiredStatus (#483)

* refactor awaitRequiredStatus

* Update SmartContractsClient.ts

---------

Co-authored-by: Ben <br@massa.net>

* Generate coverage badge

* Fix code snippet job (#484)

* Fix tsconfig.esm.json files (#486)

* Add awaitMultipleRequiredOperationStatuses method (#487)

* Generate coverage badge

* add support of i128 serialization (#488)

* add support of i128 serialization

---------

Co-authored-by: Senji888 <44082144+Ben-Rey@users.noreply.github.com>

* Generate coverage badge

* Fix publish-dev.sh script (#490)

* Fix publish-dev.sh script (#491)

* Add constants to web3-utils (#493)

* Generate coverage badge

* Generate coverage badge

* update web3-utils to 1.4.3 (#494)

* Update massa-web3 to 2.2.2 (#495)

* Fix web3-utils import (#497)

* Fix web3-utils import

* Update massa-web3 to 2.2.3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: julienbrs <106234742+julienbrs@users.noreply.github.com>
Co-authored-by: Adrian C <92168447+windushka@users.noreply.github.com>
Co-authored-by: Nathan HERVIER <113121626+Elli610@users.noreply.github.com>
Co-authored-by: massabot <info@massa.net>
Co-authored-by: Grégory Libert <greg_libert@yahoo.fr>
Co-authored-by: Grégory Libert <gl@massa.net>
Co-authored-by: Pierre Seznec <34547263+peterjah@users.noreply.github.com>
Co-authored-by: 0xSwapFeeder <72012341+0xSwapFeeder@users.noreply.github.com>
Co-authored-by: Adrien LF <alf@massa.net>
Co-authored-by: c1tt1 <mnxx@protonmail.ch>
Co-authored-by: AurelienFT <32803821+AurelienFT@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: AurelienFT <aurelien.foucault@epitech.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants