Skip to content

Conversation

satoshiotomakan
Copy link
Collaborator

Description

This pull request introduces changes to the Barz class and its associated functions to support the new Biz Smart Contract. The changes include updates to method parameters to accommodate the new contract details.

Key Changes:

Updates to Method Parameters:

  • src/Ethereum/Barz.cpp: Modified the getEncodedHash method to include new parameters codeAddress, codeName, codeVersion, sender, and userOpHash. Updated the logic to handle these new parameters.
  • include/TrustWalletCore/TWBarz.h: Updated the TWBarzGetEncodedHash method signature to include new parameters related to the Biz Smart Contract.

How to test

Run C++, Android tests

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

@satoshiotomakan satoshiotomakan requested a review from gupnik as a code owner March 31, 2025 13:27
Copy link

Binary size comparison

➡️ aarch64-apple-ios: 13.92 MB

➡️ aarch64-apple-ios-sim: 13.93 MB

➡️ aarch64-linux-android: 18.35 MB

➡️ armv7-linux-androideabi: 15.36 MB

➡️ wasm32-unknown-emscripten: 13.06 MB

@satoshiotomakan satoshiotomakan merged commit 73ee1b7 into master Mar 31, 2025
14 checks passed
@satoshiotomakan satoshiotomakan deleted the s/biz-user-operation-sig branch March 31, 2025 14:18
satoshiotomakan added a commit that referenced this pull request Apr 2, 2025
* feat(eip7702): Add Biz Smart Contract Account Type (#4319)

* fix(eip7702): Add `UserOperationMode`

* Add `erc4337.biz_account.abi.json` ABI

* fix(eip7702): Add `test_barz_transfer_erc7702_eoa` test

* fix(eip7702): Fix `Biz.execute4337Ops()`

* fix(eip7702): Minor changes

* fix(eip7702): Rename `UserOperationMode` to `SCAccountType`

* fix: tron message sign (#4326)

* Adds ability to specify the curve while constructing Private Key (#4324)

* Adds ability to specify the curve while constructing Private Key

* Adds signing functions without a curve

* Migrates to new API

* Use TWCoinTypeCurve

* Adds Curve

* feat(eip7702): Add `SetCode` transaction type (#4336)

* fix(eip7702): Add `SetCode` transaction type

* fix(eip7702): Add `Biz.executeBatch` function call

* Add `AuthorizationSigner`

* fix(eip7702): Fix Authorization list RLP encoding

* fix(eip7702): Add `Biz.execute` and `Biz.executeBatch` tests

* fix(eip7702): Add android test

* [CI] Trigger CI

* feat(biz): Adjust `Barz.getEncodedHash` according to the latest changes in Biz contract (#4342)

* fix(biz): Adjust `Barz.getEncodedHash` according to the latest Biz changes

* fix(biz): Adjust Android test

* chore(dependencies): Update `gtest` to 1.16.0 (#4343)

* [ETH]: Makes factory and paymaster optional while serialising UserOpV07 (#4345)

* Uses updated API

---------

Co-authored-by: Sergei Boiko <127754187+satoshiotomakan@users.noreply.github.com>
Co-authored-by: Yeferson Licet <111311418+y3fers0n@users.noreply.github.com>
satoshiotomakan added a commit that referenced this pull request Apr 9, 2025
* feat(eip7702): Add Biz Smart Contract Account Type (#4319)

* fix(eip7702): Add `UserOperationMode`

* Add `erc4337.biz_account.abi.json` ABI

* fix(eip7702): Add `test_barz_transfer_erc7702_eoa` test

* fix(eip7702): Fix `Biz.execute4337Ops()`

* fix(eip7702): Minor changes

* fix(eip7702): Rename `UserOperationMode` to `SCAccountType`

* fix: tron message sign (#4326)

* Adds ability to specify the curve while constructing Private Key (#4324)

* Adds ability to specify the curve while constructing Private Key

* Adds signing functions without a curve

* Migrates to new API

* Use TWCoinTypeCurve

* Adds Curve

* feat(eip7702): Add `SetCode` transaction type (#4336)

* fix(eip7702): Add `SetCode` transaction type

* fix(eip7702): Add `Biz.executeBatch` function call

* Add `AuthorizationSigner`

* fix(eip7702): Fix Authorization list RLP encoding

* fix(eip7702): Add `Biz.execute` and `Biz.executeBatch` tests

* fix(eip7702): Add android test

* [CI] Trigger CI

* feat(biz): Adjust `Barz.getEncodedHash` according to the latest changes in Biz contract (#4342)

* fix(biz): Adjust `Barz.getEncodedHash` according to the latest Biz changes

* fix(biz): Adjust Android test

* chore(dependencies): Update `gtest` to 1.16.0 (#4343)

* [ETH]: Makes factory and paymaster optional while serialising UserOpV07 (#4345)

* feat(biz): Allow to call `Biz.execute` when EOA is delegated already (#4351)

* fix(biz): Allow to call `Biz.execute` when EOA is delegated already

* feature(biz): Adopt C++ tests

* feat(biz): Add and fix android tests

* feat(biz): Fix ios tests

* chore(aa): Rename `Execute` and `Batch` to `AAExecute` and `AABatch` correspondingly

* chore(scw): Rename `AABatch` and `AAExecute` to `SCWalletBatch` and `SCWalletExecute`

* chore(uov7): Serialize UserOperation numbers as hex 0x prefixed (#4353)

---------

Co-authored-by: Sergei Boiko <127754187+satoshiotomakan@users.noreply.github.com>
Co-authored-by: Yeferson Licet <111311418+y3fers0n@users.noreply.github.com>
zkrypt-crossbar pushed a commit to Cramiumlabs/wallet-core that referenced this pull request Jun 15, 2025
…es in Biz contract (trustwallet#4342)

* fix(biz): Adjust `Barz.getEncodedHash` according to the latest Biz changes

* fix(biz): Adjust Android test
zkrypt-crossbar pushed a commit to Cramiumlabs/wallet-core that referenced this pull request Jun 21, 2025
…es in Biz contract (trustwallet#4342)

* fix(biz): Adjust `Barz.getEncodedHash` according to the latest Biz changes

* fix(biz): Adjust Android test
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.

1 participant