Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Conversation

@mpetrun5
Copy link
Member

@mpetrun5 mpetrun5 commented Oct 4, 2021

Description

Fix lint and test errors

Related Issue Or Context

Closes: #

How Has This Been Tested? Testing details.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in chainbridge-docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

@mpetrun5 mpetrun5 requested review from P1sar and roethke October 4, 2021 14:53
@github-actions
Copy link

github-actions bot commented Oct 4, 2021

Go Test coverage is 28.2 %\ ✨ ✨ ✨

t.Fatal(err)
}

err = missingType.Validate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye i guess there were a bug in test

@P1sar P1sar merged commit 0d1addc into main Oct 4, 2021
@P1sar P1sar deleted the mpetrun5/fix-ci-errors branch October 4, 2021 15:18
//wait for vote log event
proposalEvent := "ProposalEvent(uint8,uint64,uint8,bytes32,bytes32)"
evts, err := s.client2.FetchEventLogs(context.Background(), s.bridgeAddr, proposalEvent, b, ba)
evts, _ := s.client2.FetchEventLogs(context.Background(), s.bridgeAddr, proposalEvent, b, ba)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is error being ignored here?

I see that within the FilterLogs the error could occur and would get returned back to the calling code, FetchEventLogs, then returned back here but the error is being ignored

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it may not matter as much because this is just a test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late, but it was in tests and wasn't checked anyway so wasn't a big deal as it would expect different value anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I answered a minute to late 😄

P1sar pushed a commit that referenced this pull request Oct 5, 2021
P1sar pushed a commit that referenced this pull request Oct 6, 2021
P1sar added a commit that referenced this pull request Oct 6, 2021
* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* remove execute from vote flow

* Add setDepositNonce Admin command (#87)

* Update ABIs, binaries, remove unwanted comments, add set-deposit-nonce cmd and add cmd to admin command list

* Improve description and add required flag checks

* Remove comment

* Fix nonce type, add unit test

* Fix CI errors (#109)

* proposal type moved to separate module, all its methods moved to separate module to be more goway

* fix

* fix import problem

* fix how we hqandle errors that probably should not happen in cli:

* function name update, return status fix

* remove unclear code comment:

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>
nmlinaric added a commit that referenced this pull request Oct 11, 2021
P1sar added a commit that referenced this pull request Oct 22, 2021
* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>
MakMuftic pushed a commit that referenced this pull request Oct 27, 2021
* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>
MakMuftic pushed a commit that referenced this pull request Oct 28, 2021
* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>
P1sar added a commit that referenced this pull request Nov 19, 2021
* Generic handler implementation (#102)

* Implement generic event handler

* Fix generic message handler type

* Move abi to consts package

* Fix generic handler abi string

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Remove get deposit record logic

* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Implement generic event handler

* Move abi to consts package

* Fix generic handler abi string

* ERC721 handler implementation (#112)

* Add Erc721 event handler function

* Change return type of message handler

* Remove Proposer usage

* Add mising props to payload

* Listen to events unit tests (#116)

* Add unit tests

* Add listener mocks

* Add blockstore mocks

* Add gomock lib

* Define resource ID type (#117)

* Define type for resource ID

* Use resource ID as type instead of [32]bytes + rename rID to resourceID

* Replace [32]byte with resource id type

* Add the CLI command for base currency transfer (#115)

* add value parameter to the transact function call;

Signed-off-by: tcar <[email protected]>

* add cli command for base currency transfer;

Signed-off-by: tcar <[email protected]>

* add value parameter to the transact function;

Signed-off-by: tcar <[email protected]>

* fix minor issues;

Signed-off-by: tcar <[email protected]>

* handle error;

Signed-off-by: tcar <[email protected]>

* add nil check;

Signed-off-by: tcar <[email protected]>

* add transfer command to the readme document;

Signed-off-by: tcar <[email protected]>

* optimize code;

Signed-off-by: tcar <[email protected]>

* Replace Deposit Record with Event (#90)

* Update contract ABIs + binaries

* Update deposit signature

* Update Erc20EventHandler function signature

* Update deposit event struct fields, add documentation, remove deprecated function, add todo

* Add documentation + refactor

* Add unit test

* Fix deposit signature

* Fix type in signature

* Rename address field for clarity

* Add documentation, update variable names

* refactor, add todo, fix test

* remove recipient address length from payload field

* pull ABI definition from consts, remove todo

* add mock + mock test

* fix resource ID type

* fix resource ID type

* fix test

* EIP1559 fees (#111)

* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>

* Generic integration e2e test (#134)

* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Add command to deploy generic handler

* Implement registering generic resource with function sig hashing

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Refactor deposit to accept deposit data instead of targeting only erc20 deposits

* Add generic deposit e2e test

* Move test setup to SetupSuite

* Check stored hash from created hash in generic test

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Fix deposit command

* Cleanup rebase

* Update abi consts

* Add generic handler unit tests

* Reduce calldata length on generic event handler to include only metadata length

* Add depositer offset to setting generic resource

* Update README

* Replace using topics for deposits with unpacking it from raw data

* Add unpack deposit event log tests

* Replace calldata with data to fix unpack into interface

* Add unpack deposit event unit tests

* Update VoteProposal for new contracts

* Vote on proposal if it is inactive as well

* Fix tests

* Fix vote proposal

* Move test config to struct

* Fix generic handler deploy

* Fix erc20 e2e test RID

* Replace manually creating calldata in test with ConstructErc20DepositData

Co-authored-by: Jon Roethke <[email protected]>

* Integrate changes from develop

* Update e2e tests

* Refactor e2e env params as struct

* Fix makefile

* Fix lint errors

* Fix centrifuge tests

* ERC721 related cli CMDs (#143)

* fix typo and wrong cmd use; (#138)

* Implement generic event handler

* Move abi to consts package

* ERC721 handler implementation (#112)

* Add Erc721 event handler function

* Change return type of message handler

* Remove Proposer usage

* Add mising props to payload

* Implement deploy flow for ERC721

* Add implementation of all erc721 commands

* Add addminter command

* Refactor mint cmd

* Refactor owner command

* Refactor deposit CLI command

* Refactor approve CLI command

* Refactor add-minter CLI command

* Fix client type

* Fix merge bugs

* Expand README file and code cleanup in CLI commands

* Remove generic handler code

* Revert updates on generic event handler

* Add deploy flags to README and mark all flags as required in deploy command

* Update mod and sum files

* Remove duplicated functions (#130)

* brake import cycle and remove duplicated functions;

Signed-off-by: tcar <[email protected]>

* add test for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* add test case for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* move ChainClient interface to listener;

Signed-off-by: tcar <[email protected]>

* Refactor CLI commands to call new calls

* Refactor deposit function to return hash and error

* Initial test setup

* Write cli I/O output data to file (#119)

* Add func for writing cli i/o data to log file

* Add test for writing cli i/o data to log file

* Refactor cli data writer

* Add test for writing cli i/o data to log file

* Implement cli writer into all commands

* Refactor and rename writer to logger

* Add test for logger

* Move logger to comand PreRun

* Fix lint

* Remove excess func call

* Code cleanup

* Fix cli deploy command flags (#146)

* set some flags to be optional;

Signed-off-by: tcar <[email protected]>

* use value from func param;

Signed-off-by: tcar <[email protected]>

* use fee flag and validate flags

Signed-off-by: tcar <[email protected]>

* update tests;

Signed-off-by: tcar <[email protected]>

* Fix fee type

* Remove old check for empty bridge address from deploy command

* Fix failing tests

* Fix typos

* Fix event-handler and add basic unit test

* Expand unit tests for event-handler

* Merge deposit logs and remove error definitions in deploy cmd

* Fix bind flag commands

Co-authored-by: tcar121293 <[email protected]>
Co-authored-by: Matija Petrunic <[email protected]>
Co-authored-by: Nikola Mlinarić <[email protected]>

* Fix linter

* Fix merge bugs

* Add e2e setup command in Makefile

* Add logging to erc721 CLI commands

* ERC721 e2e tests (#185)

* Update abis

* WIP adding e2e tests

* Fix tests and add event hendler tests

* Fix linter error

* Fix handling erc721 metadata and expand event handler testst

* Fix missing comment

* Add missing comment

* Fix missing props in e2e config

* Fix duplicate function in deploy

* Change minimal calldata length for erc721 handler

* Fix failin unit test

* Fix failing logger tests

* Change assertion in logger test

Co-authored-by: Matija Petrunić <[email protected]>
Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Nikola Mlinarić <[email protected]>
Co-authored-by: tcar121293 <[email protected]>
Co-authored-by: Kirill <[email protected]>
P1sar added a commit that referenced this pull request Nov 19, 2021
* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Add setDepositNonce Admin command (#87)

* Update ABIs, binaries, remove unwanted comments, add set-deposit-nonce cmd and add cmd to admin command list

* Improve description and add required flag checks

* Remove comment

* Fix nonce type, add unit test

* Feat/#70 combine vote with execute (#110)

* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* remove execute from vote flow

* Add setDepositNonce Admin command (#87)

* Update ABIs, binaries, remove unwanted comments, add set-deposit-nonce cmd and add cmd to admin command list

* Improve description and add required flag checks

* Remove comment

* Fix nonce type, add unit test

* Fix CI errors (#109)

* proposal type moved to separate module, all its methods moved to separate module to be more goway

* fix

* fix import problem

* fix how we hqandle errors that probably should not happen in cli:

* function name update, return status fix

* remove unclear code comment:

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>

* Define resource ID type (#117)

* Define type for resource ID

* Use resource ID as type instead of [32]bytes + rename rID to resourceID

* Replace [32]byte with resource id type

* Add the CLI command for base currency transfer (#115)

* add value parameter to the transact function call;

Signed-off-by: tcar <[email protected]>

* add cli command for base currency transfer;

Signed-off-by: tcar <[email protected]>

* add value parameter to the transact function;

Signed-off-by: tcar <[email protected]>

* fix minor issues;

Signed-off-by: tcar <[email protected]>

* handle error;

Signed-off-by: tcar <[email protected]>

* add nil check;

Signed-off-by: tcar <[email protected]>

* add transfer command to the readme document;

Signed-off-by: tcar <[email protected]>

* optimize code;

Signed-off-by: tcar <[email protected]>

* Replace Deposit Record with Event (#90)

* Update contract ABIs + binaries

* Update deposit signature

* Update Erc20EventHandler function signature

* Update deposit event struct fields, add documentation, remove deprecated function, add todo

* Add documentation + refactor

* Add unit test

* Fix deposit signature

* Fix type in signature

* Rename address field for clarity

* Add documentation, update variable names

* refactor, add todo, fix test

* remove recipient address length from payload field

* pull ABI definition from consts, remove todo

* add mock + mock test

* fix resource ID type

* fix resource ID type

* fix test

* Calldata length check logic + test (#121)

* Update contract ABIs + binaries

* Update deposit signature

* Update Erc20EventHandler function signature

* Update deposit event struct fields, add documentation, remove deprecated function, add todo

* Add documentation + refactor

* Add unit test

* Fix deposit signature

* Fix type in signature

* Rename address field for clarity

* Add documentation, update variable names

* refactor, add todo, fix test

* remove recipient address length from payload field

* pull ABI definition from consts, remove todo

* add mock + mock test

* fix resource ID type

* fix resource ID type

* fix test

* add test for incorrect calldata length

* add dev notes

* fix slice index in test

* Update calls for new contracts (#128)

* Replace using topics for deposits with unpacking it from raw data

* Add unpack deposit event log tests

* Replace calldata with data to fix unpack into interface

* Add unpack deposit event unit tests

* Update VoteProposal for new contracts

* Vote on proposal if it is inactive as well

* EIP1559 fees (#111)

* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>

* Cli flag usage refactor (#127)

* refactor CLI flags handling;

Signed-off-by: tcar <[email protected]>

* mark required fields;

Signed-off-by: tcar <[email protected]>

* update docs;

Signed-off-by: tcar <[email protected]>

* fix variable name;

Signed-off-by: tcar <[email protected]>

* fix variable name;

Signed-off-by: tcar <[email protected]>

* rename function and refactor utils;

Signed-off-by: tcar <[email protected]>

* rename handler into minter;

Signed-off-by: tcar <[email protected]>

* refactor accounts cli flags; optimise code;

Signed-off-by: tcar <[email protected]>

* remove unnecessary error check;

Signed-off-by: tcar <[email protected]>

* fix linter error;

Signed-off-by: tcar <[email protected]>

* fix lint error;

Signed-off-by: tcar <[email protected]>

* Omit shorthand flag name option + make validate and process functions public (#136)

* Omit shorthand flag name option

* Make validate and process flags functions public

* fix typo and wrong cmd use; (#138)

* Remove duplicated functions (#130)

* brake import cycle and remove duplicated functions;

Signed-off-by: tcar <[email protected]>

* add test for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* add test case for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* move ChainClient interface to listener;

Signed-off-by: tcar <[email protected]>

* Write cli I/O output data to file (#119)

* Add func for writing cli i/o data to log file

* Add test for writing cli i/o data to log file

* Refactor cli data writer

* Add test for writing cli i/o data to log file

* Implement cli writer into all commands

* Refactor and rename writer to logger

* Add test for logger

* Move logger to comand PreRun

* Fix lint

* Remove excess func call

* Fix cli deploy command flags (#146)

* set some flags to be optional;

Signed-off-by: tcar <[email protected]>

* use value from func param;

Signed-off-by: tcar <[email protected]>

* use fee flag and validate flags

Signed-off-by: tcar <[email protected]>

* update tests;

Signed-off-by: tcar <[email protected]>

* Relayer config (#162)

* Move chain config to separate directory

* Implement relayer config

* Add default relayer config values

* Use port and address for Prometheus from config

* Add config tests

* Update go.mod

* Fix rename chain ID to domain ID (#155)

* Fix rename chain ID to domain ID

* rename occurrences of dest id to domain id

* add e2e tests (#163)

* add e2e tests

* fix GA flow

* fix GA flow

* some renames to make idea more clear

* remove redundad geth nodes, fix rleayer config

* add unit tests for evm-tx bug

* add unit tests for evm-tx bug

* Update chains/evm/evmtransaction/evm-tx_test.go

Co-authored-by: Matija Petrunić <[email protected]>

* type fiix:

Co-authored-by: Matija Petrunić <[email protected]>

* add set and get relayer threshold commands; (#170)

Signed-off-by: tcar <[email protected]>

Co-authored-by: Kirill <[email protected]>

* Fix nonce not unlocking (#167)

* Fix nonce not unlocking

* Add tests for nonce not unlocking

* Add utils package mock

* Add utils mock generation

* Fix gas price check after EIp-1559 implementation

* Add happy path utils test

* Add happy path deploy tests

Co-authored-by: Kirill <[email protected]>

* Fix flags default values (#172)

* Set decimals default value to 0

* Set decimals flags as required

Co-authored-by: Kirill <[email protected]>

* Add cmd argument to binding function (#173)

* add cmd argument to binding function;

Signed-off-by: tcar <[email protected]>

* add argument to bindings function;

Signed-off-by: tcar <[email protected]>

* make codebase consistent;

Signed-off-by: tcar <[email protected]>

Co-authored-by: Kirill <[email protected]>

* Increase e2e relayer count (#180)

* Increase e2e test relayer count

* Fix GA e2e workflow

* update ABI constants with V2 contracts ABI; (#182)

* update ABI constants with V2 contracts ABI;

Signed-off-by: tcar <[email protected]>

* Fix failing tests

Co-authored-by: Kirill <[email protected]>
Co-authored-by: Mak Muftic <[email protected]>

* Update and separate constants (#183)

* update ABI constants with V2 contracts ABI;

Signed-off-by: tcar <[email protected]>

* separate constants into separate files;

Signed-off-by: tcar <[email protected]>

* Generic handler implementation (#174)

* Generic handler implementation (#102)

* Implement generic event handler

* Fix generic message handler type

* Move abi to consts package

* Fix generic handler abi string

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Remove get deposit record logic

* Generic integration e2e test (#134)

* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Add command to deploy generic handler

* Implement registering generic resource with function sig hashing

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Refactor deposit to accept deposit data instead of targeting only erc20 deposits

* Add generic deposit e2e test

* Move test setup to SetupSuite

* Check stored hash from created hash in generic test

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Fix deposit command

* Cleanup rebase

* Update abi consts

* Add generic handler unit tests

* Reduce calldata length on generic event handler to include only metadata length

* Add depositer offset to setting generic resource

* Update README

* Replace using topics for deposits with unpacking it from raw data

* Add unpack deposit event log tests

* Replace calldata with data to fix unpack into interface

* Add unpack deposit event unit tests

* Update VoteProposal for new contracts

* Vote on proposal if it is inactive as well

* Fix tests

* Fix vote proposal

* Move test config to struct

* Fix generic handler deploy

* Fix erc20 e2e test RID

* Replace manually creating calldata in test with ConstructErc20DepositData

Co-authored-by: Jon Roethke <[email protected]>

* Integrate changes from develop

* Update e2e tests

* Refactor e2e env params as struct

* Fix makefile

* Fix lint errors

* Fix centrifuge tests

* Fix linter

* Update Generic ABI

* FIx README centrifuge deploy description

* Fix bug when getHash command doesn't error

* Refactor ResourceID type to be consistently typed

* Fix linter

* Move Centrifuge ABI to separate file

Co-authored-by: Jon Roethke <[email protected]>

* Local setup CLI command (#139)

* move e2e calls, fix resource ID type, update test

* fix to remove gas price

* fix misspelling

* Rename local deploy functions, move file into local cli directory, modify test

* add zero fee

* wrap domain ID

* refactor

* move alice kp to avoid import cycle conflict

* add local command to CLI root

* add local-setup make instruction

* update readme with local setup section + refactor

* fix readme title

* add local setup script

* fix syntax

* add additional information to local setup step

* Implement admin withdraw cmd + update flag names/descriptions (#164)

* update custom withdraw binding from updated adminWithdraw method

* add missing error return, fix default error return

* add additional processed flag vars

* implement admin withdrawal command

* add dev notes + remove commented code

* remove redundant if block/fix default error return

* refactor withdraw input + transact

* fix lint error

* add missing error return

* make function public for unit testing

* update command documentation

* add unit test

Co-authored-by: Kirill <[email protected]>

* Add Erc721 support (#186)

* Generic handler implementation (#102)

* Implement generic event handler

* Fix generic message handler type

* Move abi to consts package

* Fix generic handler abi string

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Remove get deposit record logic

* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Implement generic event handler

* Move abi to consts package

* Fix generic handler abi string

* ERC721 handler implementation (#112)

* Add Erc721 event handler function

* Change return type of message handler

* Remove Proposer usage

* Add mising props to payload

* Listen to events unit tests (#116)

* Add unit tests

* Add listener mocks

* Add blockstore mocks

* Add gomock lib

* Define resource ID type (#117)

* Define type for resource ID

* Use resource ID as type instead of [32]bytes + rename rID to resourceID

* Replace [32]byte with resource id type

* Add the CLI command for base currency transfer (#115)

* add value parameter to the transact function call;

Signed-off-by: tcar <[email protected]>

* add cli command for base currency transfer;

Signed-off-by: tcar <[email protected]>

* add value parameter to the transact function;

Signed-off-by: tcar <[email protected]>

* fix minor issues;

Signed-off-by: tcar <[email protected]>

* handle error;

Signed-off-by: tcar <[email protected]>

* add nil check;

Signed-off-by: tcar <[email protected]>

* add transfer command to the readme document;

Signed-off-by: tcar <[email protected]>

* optimize code;

Signed-off-by: tcar <[email protected]>

* Replace Deposit Record with Event (#90)

* Update contract ABIs + binaries

* Update deposit signature

* Update Erc20EventHandler function signature

* Update deposit event struct fields, add documentation, remove deprecated function, add todo

* Add documentation + refactor

* Add unit test

* Fix deposit signature

* Fix type in signature

* Rename address field for clarity

* Add documentation, update variable names

* refactor, add todo, fix test

* remove recipient address length from payload field

* pull ABI definition from consts, remove todo

* add mock + mock test

* fix resource ID type

* fix resource ID type

* fix test

* EIP1559 fees (#111)

* Migrate CLI documentation from core-example (#91)

* migrate CLI documentation from core-example

* fix syntax

* add celo-evm differences

* fix formatting

* small missing error + add error handling

* Fix CI errors (#109)

* squashed erip1559 old branch

* revisited how gas prcie estimation happen on the london gaspricer
all logic related to gasprice calulations moved to gasprices from client

* make client to be an argument to gaspricers methods

* gas prices calculations or estmation moved from client

* add gaspricer usage to cli:

* fix e2e tests, linters

* Add static gasPricer unit tests
GaPRicer Multiplayer renamed to Factor

* unit tests added for london gasPricer

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>

* Generic integration e2e test (#134)

* Rename chainID to domainID (#86)

* Rename chainID to domainID

* Fix ChainID usage as related to Ethereum client

* Fix chainID CLI arguments + tests

* Fix flag names + descriptions

* Update ABIs + BINs

* update ABIs + binaries

* replace chainID with domainID + fix comments

* refactor error

* add missing error handling

* remove unnecessary struct field

* Get deposit record tests (#114)

* Make GetDepositRecord public

* Add fetching deposit record unit tests

* Add gomock to dependecies

* Check if rec is not nil

* Add command to deploy generic handler

* Implement registering generic resource with function sig hashing

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Refactor deposit to accept deposit data instead of targeting only erc20 deposits

* Add generic deposit e2e test

* Move test setup to SetupSuite

* Check stored hash from created hash in generic test

* Generic handler cmd commands (#118)

* Add command to deploy generic handler

* Fix deploy generic handler types

* Implement registering generic resource with function sig hashing

* Implement hash functionality when setting generic resource

* Implement deploying cent asset

* Move centrifuge related cli commands to separate package

* Refactor balance erc20 command

* Implement checking if centrifuge hash exists

* Add checking if asset hash exists tests

* Revert deploy flag changes

* Add get solidity function tests

* Rename hash-exists command

* Update README

* Fix linter

* Mark cmd flags that previously had default values as required

* Fix deposit command

* Cleanup rebase

* Update abi consts

* Add generic handler unit tests

* Reduce calldata length on generic event handler to include only metadata length

* Add depositer offset to setting generic resource

* Update README

* Replace using topics for deposits with unpacking it from raw data

* Add unpack deposit event log tests

* Replace calldata with data to fix unpack into interface

* Add unpack deposit event unit tests

* Update VoteProposal for new contracts

* Vote on proposal if it is inactive as well

* Fix tests

* Fix vote proposal

* Move test config to struct

* Fix generic handler deploy

* Fix erc20 e2e test RID

* Replace manually creating calldata in test with ConstructErc20DepositData

Co-authored-by: Jon Roethke <[email protected]>

* Integrate changes from develop

* Update e2e tests

* Refactor e2e env params as struct

* Fix makefile

* Fix lint errors

* Fix centrifuge tests

* ERC721 related cli CMDs (#143)

* fix typo and wrong cmd use; (#138)

* Implement generic event handler

* Move abi to consts package

* ERC721 handler implementation (#112)

* Add Erc721 event handler function

* Change return type of message handler

* Remove Proposer usage

* Add mising props to payload

* Implement deploy flow for ERC721

* Add implementation of all erc721 commands

* Add addminter command

* Refactor mint cmd

* Refactor owner command

* Refactor deposit CLI command

* Refactor approve CLI command

* Refactor add-minter CLI command

* Fix client type

* Fix merge bugs

* Expand README file and code cleanup in CLI commands

* Remove generic handler code

* Revert updates on generic event handler

* Add deploy flags to README and mark all flags as required in deploy command

* Update mod and sum files

* Remove duplicated functions (#130)

* brake import cycle and remove duplicated functions;

Signed-off-by: tcar <[email protected]>

* add test for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* add test case for ToCallArg function;

Signed-off-by: tcar <[email protected]>

* move ChainClient interface to listener;

Signed-off-by: tcar <[email protected]>

* Refactor CLI commands to call new calls

* Refactor deposit function to return hash and error

* Initial test setup

* Write cli I/O output data to file (#119)

* Add func for writing cli i/o data to log file

* Add test for writing cli i/o data to log file

* Refactor cli data writer

* Add test for writing cli i/o data to log file

* Implement cli writer into all commands

* Refactor and rename writer to logger

* Add test for logger

* Move logger to comand PreRun

* Fix lint

* Remove excess func call

* Code cleanup

* Fix cli deploy command flags (#146)

* set some flags to be optional;

Signed-off-by: tcar <[email protected]>

* use value from func param;

Signed-off-by: tcar <[email protected]>

* use fee flag and validate flags

Signed-off-by: tcar <[email protected]>

* update tests;

Signed-off-by: tcar <[email protected]>

* Fix fee type

* Remove old check for empty bridge address from deploy command

* Fix failing tests

* Fix typos

* Fix event-handler and add basic unit test

* Expand unit tests for event-handler

* Merge deposit logs and remove error definitions in deploy cmd

* Fix bind flag commands

Co-authored-by: tcar121293 <[email protected]>
Co-authored-by: Matija Petrunic <[email protected]>
Co-authored-by: Nikola Mlinarić <[email protected]>

* Fix linter

* Fix merge bugs

* Add e2e setup command in Makefile

* Add logging to erc721 CLI commands

* ERC721 e2e tests (#185)

* Update abis

* WIP adding e2e tests

* Fix tests and add event hendler tests

* Fix linter error

* Fix handling erc721 metadata and expand event handler testst

* Fix missing comment

* Add missing comment

* Fix missing props in e2e config

* Fix duplicate function in deploy

* Change minimal calldata length for erc721 handler

* Fix failin unit test

* Fix failing logger tests

* Change assertion in logger test

Co-authored-by: Matija Petrunić <[email protected]>
Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Nikola Mlinarić <[email protected]>
Co-authored-by: tcar121293 <[email protected]>
Co-authored-by: Kirill <[email protected]>

* Opentelemetry integration (#158)

* Implement OpenTelementry tracer and metrics

* Move message processors tests

* Remove extra test file

* Configure OpenTelemetry from relayer config

* Move message definition to separate package to prevent import cycle

* Fix message imports

* Fix import

* Make opentelemetyr conform to tracing interface

* Fix imports

* Implement TraceDepositEvent

* Add TraceDepositEvent tests

* Write relayer tests

* Initialize Prometheus by default if OpenTelemetry does not exist

* Fix lint

* Name tracer and meter

* Add godoc to opentelemetry package

* Remove prometheus implementation

* Remove tracer implementation

* Pass in metrics implementation into relayer

* Remove extra mocks

* Remove extra mocks

* Update relayer tests

* Add ConsoleTelemetry to turn off OpenTelemetry in tests

* Remove Prometheus related flags

* Add Metrics README

* Add link to OpenTelemetry integration in README

* Fix merge error

* Fix tests

Co-authored-by: Kirill <[email protected]>

* Prevent excess votes (#184)

* Remove subkey from evm-evm e2e tests Dockerfile

* Fix typo

* Fix evm-evm test name

* Switch e2e tests to run with ws

* Bump go-ethereum

* Refactor proposal status to include yes votes count

* Implement voter pending proposal tracking to prevent extra votes

* Fix proposal status fetching

* Remove annoying log

* Increase pending proposal votes by proposal ID

* Rebuild mocks

* Add voter tests

* Update godocs

* Fix typo

* Lint

* Add godocs, remove channel from shouldVoteForProposal and add fallback constructor when subscription is not supported

* Remove extra argument

* Fix linter

* Fix tests

* Improve voter pending tx subscription godocs

Co-authored-by: Kirill <[email protected]>

* fix unit tests wrong mock expectation

Co-authored-by: Jon Roethke <[email protected]>
Co-authored-by: Matija Petrunić <[email protected]>
Co-authored-by: Nikola Mlinarić <[email protected]>
Co-authored-by: tcar121293 <[email protected]>
Co-authored-by: Mak Muftic <[email protected]>
Co-authored-by: mace <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants