forked from safe-global/safe-core-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Add EIP-1193 compatibility and use Abitype for contract types (s…
…afe-global#604) * feat(protocol-kit): add ABIType for Safe Contract 1.3.0 + ethers.js * feat(protocol-kit): Add ABIType for Safe Contract 1.3.0 + Web3.js (safe-global#633) * feat(protocol-kit): Add ABIType for Safe Contract 1.4.1 + Web3.js (safe-global#637) * feat(protocol-kit): Add ABItype for Safe Contract v1.4.1 + ethers.js (safe-global#624) * feat(protocol-kit): Add ABItype for Safe Contract v1.2.0 + ethers.js (safe-global#627) * feat(protocol-kit): Add ABIType for Safe Contract v1.1.1 for Ethers.js + Web3.js (safe-global#643) * feat(protocol-kit): Add ABIType for Safe Contract v1.2.0 for web3.js (safe-global#644) * feat(protocol-kit): Add ABIType for Multisend (safe-global#663) * feat(protocol-kit): Add ABIType for SignMessageLib (safe-global#676) * feat(protocol-kit): Add ABIType for Safe Proxy Factory (safe-global#664) * feat(protocol-kit): Add ABIType for Safe Contract v1.0.0 (safe-global#727) * feat(protocol-kit): Add ABIType for SimulateTxAccessor (safe-global#744) * feat(protocol-kit): Add ABIType for CreateCall (safe-global#742) * feat:(protocol-kit) Add ABIType for Compatibility FallbackHandler * feat(protocol-kit): Use AbiTypes in SignMessageLib and SimulateTxAccessor * feat(protocol-kit): refactor and improve contract classes for Abitype (safe-global#758) * Add compatibiliy for EIP-1193 * Remove ethAdapter for SafeAdapter * fix protocol-kit tests * fix moduleManager * Move SafeFactory to the root level * Rename signerAddress to signer * Rename SafeProvider properties * Rename files with EthAdapter suffix * Remove Ethers suffix from contracts * Remove remaining EthersAdapter instances * Simplify provider retrieval in test * Fix api-kit tests * Remove web3 specific related tests * Remove web3 gas options * Add viem specific error handling * Update api-kit playgrounds * Update relay-kit playgrounds * Move SafeFactory types to types folder * Fix protocol-kit playgrounds and improve eip1271 one * Add viem support for api-kit testing * Remove Adapter from the specific contract function * fix(auth-kit/onramp-kit): Migrate to Sepolia + various small fixes (safe-global#788) * fix(onramp-kit): Use valid mock contract address to fix unit test * Bump `@monerium/sdk` to v2.12.0 for Sepolia support * fix(onramp-kit): Fix unit test to use sepolia instead of goerli * Fix BaseContract not selecting specific chain deployments * Fix safeTxGas estimation for viem * Update contracts being memoized in the dev branch. Now seems to be working * Allow tests to continue on error to see all the errors in the actions * Fix account abstraction kit tests * Remove RPC from playground config and use fixed sepolia one * Fix signer not propagated * fix(protocol kit): Get modules paginated incorrect interface (safe-global#787) * Move abitype to dependencies * chore: bump dependencies with minor changes * Rename ContractManager to follow same approach * fix BaseContract provider (safe-global#811) * remove unused properties from contract assets (safe-global#809) * chore: add CONTRIBUTING and SUPPORT files (safe-global#815) * remove API reference from api-kit and protocol-kit * Add tests for externalProvider and externalSigner --------- Co-authored-by: Daniel <[email protected]> Co-authored-by: Tim <[email protected]> Co-authored-by: Yago Pérez Vázquez <[email protected]> Co-authored-by: leonardotc <[email protected]>
- Loading branch information
1 parent
84d1589
commit 12dccb6
Showing
340 changed files
with
15,901 additions
and
10,442 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Monorepo Test | ||
name: SDK - Unit Tests | ||
on: | ||
pull_request: | ||
push: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,9 +54,6 @@ cache | |
artifacts | ||
deployments | ||
|
||
# Typechain | ||
typechain | ||
|
||
openapi/ | ||
|
||
.idea | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Contributing Guidelines | ||
|
||
First off, **thank you** for considering contributing to this project! | ||
|
||
## Table of contents | ||
|
||
- [I Have a Question](#i-have-a-question) | ||
- [I Want to Contribute](#i-want-to-contribute) | ||
|
||
## <a name="i-have-a-question">I Have a Question</a> | ||
|
||
See our [support guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md). **Do not** use GitHub issues for general support or questions. | ||
|
||
## <a name="i-want-to-contribute">I Want to Contribute</a> | ||
### Legal Notice | ||
You will need to agree to [our CLA](https://safe.global/cla) in order to be possible to consider your contribution. | ||
|
||
### Starting Guide | ||
|
||
By following the steps bellow you will understand the development process and worflow. | ||
1. [Forking the repository](#forking-the-repository) | ||
2. [Installing Node and Yarn](#installing-node-and-yarn) | ||
3. [Installing dependencies](#installing-dependencies) | ||
4. [Running the tests](#running-the-tests) | ||
5. [Using the playground](#using-the-playground) | ||
6. [Submitting a pull request](#submitting-a-pull-request) | ||
|
||
#### Forking the repository | ||
|
||
The first step would be to [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository). This will allow you to get a current copy of the repository state. Follow the steps to also clone your forked repository locally. | ||
|
||
For active development we use the `development` branch. Our `main` branch contains only the currently published code. All new branches should be created from `development`. | ||
|
||
#### Installing Node and Yarn | ||
|
||
The Safe{Core} SDK uses [Node](https://nodejs.org) as development environment and Yarn to manage the dependencies. You will need to make sure you are using the [latest Node LTS version](https://nodejs.org/en/about/previous-releases) and that you have available Yarn v1. | ||
|
||
You can check which versions you are using with: | ||
|
||
```bash | ||
node -v | ||
yarn -v | ||
``` | ||
|
||
#### Installing dependencies | ||
|
||
The Safe{Core} SDK uses a mono-repository structure managed by [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/) and [Lerna](https://lerna.js.org). From the root of the repository you will need to install the whole dependency stack and do the project build. Some packages depend on each other, so even when modifiying only one package it's better to run the full build. | ||
|
||
Install all dependencies and build the whole project by using the following commands at the project root. | ||
|
||
```bash | ||
yarn install | ||
yarn build | ||
``` | ||
|
||
#### Running the tests | ||
|
||
There is already a test script that can be launched from the root of the repository and will use [Lerna](https://lerna.js.org) to run all the tests from all the packages. | ||
|
||
```bash | ||
yarn test | ||
``` | ||
|
||
If you would like to test individual packages, **once you make sure you did the build from the root**, you can: | ||
|
||
```bash | ||
yarn test --scope=<package-name> | ||
yarn test --scope=@safe-global/protocol-kit | ||
yarn test --scope=@safe-global/api-kit | ||
``` | ||
|
||
For some packages you may need to fill a .env file with some configuration. In those packages you will be able to find a `.env.example` file specifying the necessary parameters. | ||
|
||
#### Using the playground | ||
|
||
You can use the playground section to do some manual testing using a specific Safe or configuration. The playground can be run from the root of the project as follow: | ||
|
||
```bash | ||
yarn play <playground-command> | ||
``` | ||
|
||
You can find more information about the available commands [in the specific section.](https://github.com/safe-global/safe-core-sdk/tree/main/playground) | ||
|
||
#### Submitting a pull request | ||
|
||
From the forked repository you can [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to the original repository. Make sure to select the `safe-global:development` branch as the target branch. |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Support Guidelines | ||
|
||
We appreciate your interest in our project. If you have questions, need help, or encounter issues, please follow these guidelines: | ||
|
||
1. **GitHub Issues**: **Do not** use GitHub issues for general support or questions. Issues are primarily for bug reports, feature requests, and discussions related to code changes. | ||
|
||
2. **Stack Exchange**: For support-related questions, we recommend using [Stack Exchange with the appropriate tags](https://ethereum.stackexchange.com/questions/tagged/safe-core). The **safe-core** tag should always be included. Many community members and experts monitor Stack Exchange and can provide timely assistance. | ||
|
||
3. **Search First**: Before posting a new question, search existing issues and Stack Exchange to see if your question has already been answered. You might find a solution without waiting for a response. | ||
|
||
4. **Be Specific**: When asking for help, provide as much context as possible. Include relevant details such as error messages, steps to reproduce, testing addresses, and the version of our project packages you're using. | ||
|
||
5. **Be Respectful**: Treat others with kindness and respect. We're all here to learn and help each other. | ||
|
||
## Getting Help | ||
|
||
If you need assistance, follow these steps: | ||
|
||
1. **Documentation**: Refer to our [project's documentation](https://docs.safe.global/sdk/overview) for usage instructions, FAQs, and troubleshooting tips. | ||
|
||
2. **Stack Exchange**: Search for existing answers or ask a new question on Stack Exchange. Use relevant tags as **safe-core**. | ||
|
||
Remember that GitHub issues are not the right place for general support. Let's keep our issue tracker focused on improving the project! 😊 |
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
Oops, something went wrong.