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

feat: integrate Protocol Contracts v2 #2594

Merged
merged 37 commits into from
Aug 19, 2024
Merged

feat: integrate Protocol Contracts v2 #2594

merged 37 commits into from
Aug 19, 2024

Commits on Jul 26, 2024

  1. Configuration menu
    Copy the full SHA
    54db7f3 View commit details
    Browse the repository at this point in the history
  2. update config and runner

    lumtis committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    1b39785 View commit details
    Browse the repository at this point in the history
  3. init contract deploy

    lumtis committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    c83c263 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. add erc1967proxy in contracts

    lumtis committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    a6694b1 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2024

  1. fix gateway evm deploy

    lumtis committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    00241f2 View commit details
    Browse the repository at this point in the history
  2. zevm setuip

    lumtis committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    054016a View commit details
    Browse the repository at this point in the history
  3. format

    lumtis committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    f9572ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dc52ad7 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. update version

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    da88f46 View commit details
    Browse the repository at this point in the history
  2. update v1 import path

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    33c4428 View commit details
    Browse the repository at this point in the history
  3. reorganize import v2

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    ba30025 View commit details
    Browse the repository at this point in the history
  4. fix import

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    9a0e367 View commit details
    Browse the repository at this point in the history
  5. update new version

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    026a9b7 View commit details
    Browse the repository at this point in the history
  6. add custody setup

    lumtis committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    53337e6 View commit details
    Browse the repository at this point in the history
  7. feat(E2E): add body for smart contract V2 tests (#2609)

    * add runner for v2
    
    * implement helper function
    
    * add test bodies
    
    * add makefile entry
    
    * import
    lumtis authored Jul 31, 2024
    Configuration menu
    Copy the full SHA
    ba5a7d0 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. update system contracts

    lumtis committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    37b09fa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c3e5ff View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. feat: implement gas token deposit with protocol contract v2 (#2616)

    * add protocol contract version in cctx
    
    * read deposit from ZetaClient
    
    * deposit gas token
    
    * run deposit
    
    * add tests
    
    * add event check
    
    * add workflow for test
    
    * put error handling higher level ObserverGateway
    
    * add named interface
    lumtis authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    5a9e339 View commit details
    Browse the repository at this point in the history
  2. feat: withdraw SOL from ZEVM to Solana (#2560)

    * port Panruo's outbound code and make compile pass
    
    * make SOL withdraw e2e test passing
    
    * make solana outbound tracker goroutine working
    
    * allow solana gateway address to update
    
    * integrate sub methods of SignMsgWithdraw and SignWithdrawTx
    
    * initiate solana outbound tracker reporter
    
    * implemented solana outbound tx verification
    
    * use the amount in tx result for outbound vote
    
    * post Solana priority fee to zetacore
    
    * config Solana fee payer private key
    
    * resolve 1st wave of comments in PR review
    
    * resolve 2nd wave of comments
    
    * refactor IsOutboundProcessed as VoteOutboundIfConfirmed; move outbound tracker iteration logic into ProcessOutboundTrackers sub method
    
    * resolve 3rd wave of PR feedback
    
    * added description to explain what do we do about the outbound tracker txHash
    
    * add additional error message; add additional method comment
    
    * fix gosec err
    
    * replace contex.TODO() with context.Background()
    ws4charlie authored and lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    e158344 View commit details
    Browse the repository at this point in the history
  3. feat: detect memo in btc txn from OP_RETURN and inscription (#2533)

    * parse inscription like witness data
    
    * more comment
    
    * remove unused code
    
    * parse inscription
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
    
    * pull origin
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * review feedbacks
    
    * update review feedbacks
    
    * add mainnet txn
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
    
    * parse inscription like witness data
    
    * more comment
    
    * remove unused code
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tx_script.go
    
    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
    
    * pull origin
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Dmitry S <[email protected]>
    
    * review feedbacks
    
    * update review feedbacks
    
    * update make generate
    
    * fix linter
    
    * remove over flow
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tokenizer.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tokenizer.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tokenizer.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update zetaclient/chains/bitcoin/tokenizer.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * update review feedback
    
    * update code commnet
    
    * update comment
    
    * more comments
    
    * Update changelog.md
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update zetaclient/chains/bitcoin/observer/inbound.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * clean up
    
    * format code
    
    ---------
    
    Co-authored-by: Dmitry S <[email protected]>
    Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    4 people authored and lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    d21147f View commit details
    Browse the repository at this point in the history
  4. refactor(zetaclient)!: improve AppContext (#2568)

    * Implement chain registry
    
    * Rewrite test-cases for AppContext
    
    * Drop `supplychecker`
    
    * Refactor app ctx Update worker
    
    * Refactor orchestrator
    
    * Refactor observer&signer; DROP postBlockHeaders
    
    * Fix test cases [1]
    
    * Update changelog
    
    * Allow Zeta Chain in appContext; address PR comments [1]
    
    * Fix app context update
    
    * Check for `chain.IsZeta()`
    
    * Add AppContext.FilterChains
    
    * Fix test cases [2]
    
    * Fix test cases [3]
    
    * Address PR comments [1]
    
    * Address PR comments [2]
    
    * Add tests for `slices`
    
    * Fix e2e tests [1]
    
    * Fix e2e tests [2]
    
    * Resolve conflicts, converge codebase between PRs
    
    * Add lodash; remove slices pkg
    
    * Address PR comments
    
    * Minor logging fix
    
    * Address PR comments
    swift1337 authored and lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ebf100d View commit details
    Browse the repository at this point in the history
  5. fix(crosschain): set sender for ERC20 whitelist admin CCTX inbound (#…

    …2631)
    
    * fix whitelist sender
    
    * add E2E test
    lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    d1d3a45 View commit details
    Browse the repository at this point in the history
  6. fix(ci): Update golang cross compile to 1.22.4 (#2635)

    * Update golang cross compile to 1.22.4
    
    * update deprecated --skip-validate --skip-release flags
    CryptoFewka authored and lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ef554d4 View commit details
    Browse the repository at this point in the history
  7. Added goreleaser check (#2636)

    CharlieMc0 authored and lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    2642ac9 View commit details
    Browse the repository at this point in the history
  8. update solidity version

    lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    fa9713c View commit details
    Browse the repository at this point in the history
  9. conflicts

    lumtis committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    0a596a9 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. feat: integrate Smart Contract V2 depositAndCall for ETH and ERC20 (#…

    …2639)
    
    * add testdapp v2
    
    * update ZRC20 version
    
    * initialize deposit and call
    
    * add deposit and call
    
    * implement E2E test
    
    * move contracts
    
    * fix evm deploy ZRC20
    
    * deposit and call local test
    
    * complete deposit and call test
    
    * add support for E2E tests
    
    * comments
    
    * fix unit tests
    lumtis authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    39a3ca7 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. feat: support withdraws, calls and reverts with Gateway contract (#2666)

    * add v2 zevm inbound
    
    * refactor abi in signers
    
    * outbound for gas withdraw
    
    * fix withdraw
    
    * gateway execute parse
    
    * add support for withdraw and call
    
    * erc20 withdraw and withdraw and call
    
    * implement erc20 withdraw e2e tests
    
    * test withdraw and call
    
    * reading inbound for no assset call
    
    * simple call implementation
    
    * initialize revert
    
    * fix the tests
    
    * upgrade smart contracts to latest version
    
    * small fix smart contract call
    
    * revert tests skeleton
    
    * fix test
    
    * implement revert tests
    
    * add revert support
    
    * fix revert tests
    
    * make generate
    
    * add support for revert gas limit
    
    * fix tests
    
    * add liquidity test
    
    * fix liquidity test
    
    * Update proto/zetachain/zetacore/pkg/coin/coin.proto
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update x/crosschain/types/revert_options.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Update x/crosschain/types/revert_options.go
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    
    * Borja comments
    
    * Stefan comments
    
    * dmitry review
    
    * fix unit tests
    
    ---------
    
    Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
    lumtis and fbac authored Aug 16, 2024
    Configuration menu
    Copy the full SHA
    e900a96 View commit details
    Browse the repository at this point in the history
  2. changelogs

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    cdfcb34 View commit details
    Browse the repository at this point in the history
  3. conflicts

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    5dc63ff View commit details
    Browse the repository at this point in the history
  4. fix unit test

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    4838739 View commit details
    Browse the repository at this point in the history
  5. tentative fix for upgrade

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    e18bf2c View commit details
    Browse the repository at this point in the history
  6. fix gateway zero address

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    1faed35 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4d6ea41 View commit details
    Browse the repository at this point in the history
  8. fix admin test

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    c8a19a1 View commit details
    Browse the repository at this point in the history
  9. add back admin tests

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    71a608e View commit details
    Browse the repository at this point in the history
  10. v2 conditional matric

    lumtis committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    c13c70b View commit details
    Browse the repository at this point in the history