This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Develop #142
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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
* 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
* 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 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 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]>
* 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
* 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
* 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
* 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]>
* 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]>
… public (#136) * Omit shorthand flag name option * Make validate and process flags functions public
* 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]>
* 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
* 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]>
* 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 * rename occurrences of dest id to domain id
* 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]>
Signed-off-by: tcar <[email protected]> Co-authored-by: Kirill <[email protected]>
* 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]>
* Set decimals default value to 0 * Set decimals flags as required Co-authored-by: Kirill <[email protected]>
* 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 test relayer count * Fix GA e2e workflow
* 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 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 (#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]>
* 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
* 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]>
* 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]>
* 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]>
* 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]>
Go Test coverage is 31.9 %\ ✨ ✨ ✨ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Related Issue Or Context
Closes: #
How Has This Been Tested? Testing details.
Types of changes
Checklist: