-
Notifications
You must be signed in to change notification settings - Fork 221
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(protocol-kit): Add EIP-1193 provider support #770
Merged
yagopv
merged 117 commits into
Abitype-1_3_0-safe-contract
from
feat/add-eip1193-provider
May 8, 2024
Merged
feat(protocol-kit): Add EIP-1193 provider support #770
yagopv
merged 117 commits into
Abitype-1_3_0-safe-contract
from
feat/add-eip1193-provider
May 8, 2024
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
dasanra
reviewed
Apr 16, 2024
packages/protocol-kit/tests/e2e/eip1271-contract-signatures.test.ts
Outdated
Show resolved
Hide resolved
…-global/safe-core-sdk into feat/add-eip1193-provider # Conflicts: # .github/workflows/test_contracts.yml # packages/api-kit/tests/e2e/addMessage.test.ts # packages/api-kit/tests/e2e/addMessageSignature.test.ts # packages/api-kit/tests/e2e/confirmTransaction.test.ts # packages/api-kit/tests/endpoint/index.test.ts # packages/protocol-kit/package.json # packages/protocol-kit/scripts/generateTypechainFiles.ts # packages/protocol-kit/src/Safe.ts # packages/protocol-kit/src/adapters/CreateCallBaseContract.ts # packages/protocol-kit/src/adapters/MultiSendBaseContract.ts # packages/protocol-kit/src/adapters/MultiSendCallOnlyBaseContract.ts # packages/protocol-kit/src/adapters/SafeBaseContract.ts # packages/protocol-kit/src/adapters/SafeProxyFactoryBaseContract.ts # packages/protocol-kit/src/adapters/SignMessageLibBaseContract.ts # packages/protocol-kit/src/adapters/SimulateTxAccessorBaseContract.ts # packages/protocol-kit/src/adapters/ethAdapter.ts # packages/protocol-kit/src/adapters/ethers/SafeProvider.ts # packages/protocol-kit/src/adapters/ethers/contracts/CreateCall/CreateCallBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/MultiSendBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/MultiSendCallOnlyBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/SafeBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/v1.0.0/SafeContract_v1_0_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/v1.1.1/SafeContract_v1_1_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/v1.2.0/SafeContract_v1_2_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/v1.3.0/SafeContract_v1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/Safe/v1.4.1/SafeContract_v1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SignMessageLib/SignMessageLibBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_V1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_V1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContractEthers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1_Ethers.ts # packages/protocol-kit/src/adapters/ethers/contracts/contractInstancesEthers.ts # packages/protocol-kit/src/adapters/ethers/index.ts # packages/protocol-kit/src/adapters/web3/README.md # packages/protocol-kit/src/adapters/web3/Web3Adapter.ts # packages/protocol-kit/src/adapters/web3/contracts/CreateCall/CreateCallBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/MultiSendBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/MultiSendCallOnlyBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/SafeBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/v1.0.0/SafeContract_v1_0_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/v1.1.1/SafeContract_v1_1_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/v1.2.0/SafeContract_v1_2_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/v1.3.0/SafeContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/Safe/v1.4.1/SafeContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SignMessageLib/SignMessageLibBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContractWeb3.ts # packages/protocol-kit/src/adapters/web3/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1_Web3.ts # packages/protocol-kit/src/adapters/web3/contracts/contractInstancesWeb3.ts # packages/protocol-kit/src/adapters/web3/index.ts # packages/protocol-kit/src/adapters/web3/utils/index.ts # packages/protocol-kit/src/contracts/AbiType/CreateCall/CreateCallBaseContract.ts # packages/protocol-kit/src/contracts/AbiType/Safe/SafeBaseContract.ts # packages/protocol-kit/src/contracts/AbiType/SafeProxyFactory/SafeProxyFactoryBaseContract.ts # packages/protocol-kit/src/contracts/AbiType/SignMessageLib/SignMessageLibBaseContract.ts # packages/protocol-kit/src/contracts/safeDeploymentContracts.ts # packages/protocol-kit/src/contracts/utils.ts # packages/protocol-kit/src/index.ts # packages/protocol-kit/src/managers/contractManager.ts # packages/protocol-kit/src/managers/fallbackHandlerManager.ts # packages/protocol-kit/src/managers/guardManager.ts # packages/protocol-kit/src/managers/moduleManager.ts # packages/protocol-kit/src/managers/ownerManager.ts # packages/protocol-kit/src/safeFactory/index.ts # packages/protocol-kit/src/types/index.ts # packages/protocol-kit/src/utils/signatures/utils.ts # packages/protocol-kit/src/utils/transactions/gas.ts # packages/protocol-kit/tests/e2e/ethAdapters.test.ts # packages/protocol-kit/tests/e2e/utils/setupContracts.ts # packages/protocol-kit/tests/e2e/utils/setupEthAdapter.ts # packages/protocol-kit/tests/e2e/utils/transactions.ts # packages/protocol-kit/tests/e2e/utilsContracts.test.ts # packages/safe-core-sdk-types/package.json # packages/safe-core-sdk-types/src/ethereumLibs/EthAdapter.ts # packages/safe-core-sdk-types/src/ethereumLibs/web3/types.ts # packages/safe-core-sdk-types/src/index.ts # packages/safe-core-sdk-types/src/safe-provider/SafeProvider.ts # yarn.lock
This was
linked to
issues
Apr 30, 2024
dasanra
reviewed
May 8, 2024
dasanra
reviewed
May 8, 2024
dasanra
reviewed
May 8, 2024
Co-authored-by: Daniel <25051234+dasanra@users.noreply.github.com>
dasanra
reviewed
May 8, 2024
dasanra
reviewed
May 8, 2024
Co-authored-by: Daniel <25051234+dasanra@users.noreply.github.com>
dasanra
reviewed
May 8, 2024
dasanra
reviewed
May 8, 2024
Co-authored-by: Daniel <25051234+dasanra@users.noreply.github.com>
Co-authored-by: Daniel <25051234+dasanra@users.noreply.github.com>
…lobal/safe-core-sdk into feat/add-eip1193-provider
dasanra
approved these changes
May 8, 2024
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.
What it solves
Resolves #651
How this PR fixes it
EthersAdapter
andWeb3Adapter
, and add theSafeProvider
with standard EIP-1193 support and additional Safe-specific functionality. TheSafeProvider
is instantiated internally, so there is no need to add it as an input parameter as with the adapters.signer
is optional so if not specified will try to get the first connected one in the provider (eth_accounts
,eth_requestAccounts
)This change make the
AccountAbstraction
andSafe4337Pack
instantiation different as well as the dependency with theEthAdapter
is changed to provider + signer (Same as Safe.create)viem
support tests in e2e action and scripts (same asethers
andweb3
)api-kit
testsprotocol-kit
testsgas
fromTransactionOptions
and specific return types from web3Safe*ImplementationType
's andDeepWriteable
'sEthers
suffixes as now are the unique contract types and files