Skip to content

Commit

Permalink
Merge pull request #332 from safe-global/development
Browse files Browse the repository at this point in the history
v3.3.1
  • Loading branch information
germartinez authored Jan 26, 2023
2 parents 1f77a6f + 0090944 commit 53a21d6
Show file tree
Hide file tree
Showing 29 changed files with 108 additions and 278 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@ on:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: 'CLA Assistant'
if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Alpha Release
uses: gnosis/github-action@master
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
# Beta Release
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-cla-document: 'https://gnosis-safe.io/cla/'
branch: 'cla-signatures'
allowlist: germartinez,mikheevm,rmeissner,Uxio0,dasanra,luarx,lukasschor,tschubotz,bot*,katspaugh
empty-commit-flag: false
blockchain-storage-flag: false
path-to-document: 'https://safe.global/cla/' # e.g. a CLA or a DCO document
# branch should not be protected
branch: 'main'
# user names of users allowed to contribute without CLA
allowlist: germartinez,rmeissner,Uxio0,dasanra,luarx,DaniSomoza,yagopv,JagoFigueroa,bot*

# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
# enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
remote-organization-name: 'safe-global'
# enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
remote-repository-name: 'cla-signatures'
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
#use-dco-flag: true - If you are using DCO instead of CLA
7 changes: 4 additions & 3 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: |
yarn install
yarn install --frozen-lockfile
yarn build
yarn test:ci
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test_contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Safe Core SDK Test - Contracts
on:
pull_request:
push:
branches:
- main
- development
env:
INFURA_KEY: ${{ secrets.INFURA_KEY }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
provider: [ethers, web3]
contract-version: [v1.0.0, v1.1.1, v1.2.0, v1.3.0]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: |
yarn install --frozen-lockfile
yarn build
- name: Test ${{ matrix.provider }} - Safe ${{ matrix.contract-version }}
run: |
cd packages/safe-core-sdk
yarn test:hardhat:${{ matrix.provider }}:${{ matrix.contract-version }}
26 changes: 0 additions & 26 deletions .github/workflows/test_ethers_V1_0_0.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_ethers_V1_1_1.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_ethers_V1_2_0.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_ethers_V1_3_0.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_web3_V1_0_0.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_web3_V1_1_1.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_web3_V1_2_0.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/test_web3_V1_3_0.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
typedoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Safe Core SDK Monorepo

[![Logo](https://raw.githubusercontent.com/gnosis/safe-core-sdk/main/assets/logo.png)](https://gnosis-safe.io/)
[![Logo](https://raw.githubusercontent.com/safe-global/safe-core-sdk/main/assets/logo.png)](https://safe.global/)

![license](https://img.shields.io/github/license/safe-global/safe-core-sdk)

Software developer tools that facilitate the interaction with the Safe [contracts](https://github.com/safe-global/safe-contracts) and [services](https://github.com/safe-global/safe-transaction-service).

Expand Down
1 change: 0 additions & 1 deletion packages/safe-core-sdk-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"typings": "dist/src/index.d.ts",
"keywords": [
"Ethereum",
"Gnosis",
"Safe",
"SDK"
],
Expand Down
3 changes: 1 addition & 2 deletions packages/safe-core-sdk-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "@safe-global/safe-core-sdk-utils",
"version": "1.7.0",
"version": "1.7.1",
"description": "Safe Core SDK Utilities",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"keywords": [
"Ethereum",
"Gnosis",
"Safe",
"SDK"
],
Expand Down
1 change: 1 addition & 0 deletions packages/safe-core-sdk-utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './eip-3770'
export * from './eip-712'
export * from './safeVersions'
23 changes: 23 additions & 0 deletions packages/safe-core-sdk-utils/src/safeVersions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import semverSatisfies from 'semver/functions/satisfies'

export enum SAFE_FEATURES {
SAFE_TX_GAS_OPTIONAL = 'SAFE_TX_GAS_OPTIONAL',
SAFE_TX_GUARDS = 'SAFE_TX_GUARDS',
SAFE_FALLBACK_HANDLER = 'SAFE_FALLBACK_HANDLER',
ETH_SIGN = 'ETH_SIGN'
}

const SAFE_FEATURES_BY_VERSION: Record<SAFE_FEATURES, string> = {
[SAFE_FEATURES.SAFE_TX_GAS_OPTIONAL]: '>=1.3.0',
[SAFE_FEATURES.SAFE_TX_GUARDS]: '>=1.3.0',
[SAFE_FEATURES.SAFE_FALLBACK_HANDLER]: '>=1.1.1',
[SAFE_FEATURES.ETH_SIGN]: '>=1.1.0'
}

export const hasSafeFeature = (feature: SAFE_FEATURES, version: string): boolean => {
if (!(feature in SAFE_FEATURES_BY_VERSION)) {
return false
}

return semverSatisfies(version, SAFE_FEATURES_BY_VERSION[feature])
}
Loading

0 comments on commit 53a21d6

Please sign in to comment.