Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/safe-global/safe-cor…
Browse files Browse the repository at this point in the history
…e-sdk into feat/4337-pack

# Conflicts:
#	packages/relay-kit/package.json
  • Loading branch information
yagopv committed Mar 20, 2024
2 parents d4a1bee + 112c8df commit c65f94e
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 69 deletions.
8 changes: 4 additions & 4 deletions packages/account-abstraction-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/account-abstraction-kit-poc",
"version": "2.0.1",
"version": "2.0.2",
"description": "Safe Account Abstraction Kit PoC",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -34,8 +34,8 @@
"access": "public"
},
"dependencies": {
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/relay-kit": "^2.0.1",
"@safe-global/safe-core-sdk-types": "^4.0.0"
"@safe-global/protocol-kit": "^3.0.1",
"@safe-global/relay-kit": "^2.0.2",
"@safe-global/safe-core-sdk-types": "^4.0.1"
}
}
6 changes: 3 additions & 3 deletions packages/api-kit/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (PK) {
}

const config: HardhatUserConfig = {
defaultNetwork: 'goerli',
defaultNetwork: 'sepolia',
paths: {
tests: TESTS_PATH
},
Expand All @@ -39,9 +39,9 @@ const config: HardhatUserConfig = {
blockGasLimit: 100000000,
gas: 100000000
},
goerli: {
sepolia: {
...sharedNetworkConfig,
url: 'https://rpc.ankr.com/eth_goerli'
url: 'https://rpc.ankr.com/eth_sepolia'
}
},
//@ts-expect-error Type not found
Expand Down
6 changes: 3 additions & 3 deletions packages/api-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/api-kit",
"version": "2.1.0",
"version": "2.2.0",
"description": "Safe API Kit",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -55,8 +55,8 @@
"yargs": "^17.7.2"
},
"dependencies": {
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/safe-core-sdk-types": "^4.0.0",
"@safe-global/protocol-kit": "^3.0.1",
"@safe-global/safe-core-sdk-types": "^4.0.1",
"ethers": "^6.7.1",
"node-fetch": "^2.7.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api-kit/scripts/generateTxServiceTypes.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

mkdir -p openapi
curl 'https://safe-transaction-goerli.safe.global/?format=openapi' > openapi/tx-service.json
curl 'https://safe-transaction-sepolia.safe.global/?format=openapi' > openapi/tx-service.json
npx openapi-typescript openapi/tx-service.json --output openapi/tx-service.ts
5 changes: 3 additions & 2 deletions packages/api-kit/src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
export const TRANSACTION_SERVICE_URLS: Record<string, string> = {
'1': 'https://safe-transaction-mainnet.safe.global',
'5': 'https://safe-transaction-goerli.safe.global',
'10': 'https://safe-transaction-optimism.safe.global',
'56': 'https://safe-transaction-bsc.safe.global',
'100': 'https://safe-transaction-gnosis-chain.safe.global',
'137': 'https://safe-transaction-polygon.safe.global',
'324': 'https://safe-transaction-zksync.safe.global',
'1101': 'https://safe-transaction-zkevm.safe.global',
'8453': 'https://safe-transaction-base.safe.global',
'42161': 'https://safe-transaction-arbitrum.safe.global',
'42220': 'https://safe-transaction-celo.safe.global',
'43114': 'https://safe-transaction-avalanche.safe.global',
'84531': 'https://safe-transaction-base-testnet.safe.global',
'84532': 'https://safe-transaction-base-sepolia.safe.global',
'11155111': 'https://safe-transaction-sepolia.safe.global',
'1313161554': 'https://safe-transaction-aurora.safe.global'
}
8 changes: 5 additions & 3 deletions packages/api-kit/tests/endpoint/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const eip3770DelegateAddress = `${config.EIP_3770_PREFIX}:${delegateAddress}`
const tokenAddress = '0x210EC22dD6b1c174E5cA1A261DD9791e0755cc6D'
const eip3770TokenAddress = `${config.EIP_3770_PREFIX}:${tokenAddress}`
const safeTxHash = '0xede78ed72e9a8afd2b7a21f35c86f56cba5fffb2fff0838e253b7a41d19ceb48'
const txServiceBaseUrl = 'https://safe-transaction-goerli.safe.global/api'
const txServiceBaseUrl = 'https://safe-transaction-sepolia.safe.global/api'
const provider = getDefaultProvider(config.JSON_RPC)
const signer = new Wallet(
'0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d',
Expand Down Expand Up @@ -347,7 +347,8 @@ describe('Endpoint tests', () => {
})
})

it('proposeTransaction', async () => {
// FIXME when tests are migrated to Sepolia
it.skip('proposeTransaction', async () => {
const safeTransactionData = {
to: safeAddress,
data: '0x',
Expand Down Expand Up @@ -396,7 +397,8 @@ describe('Endpoint tests', () => {
})
})

it('proposeTransaction EIP-3770', async () => {
// FIXME when tests are migrated to Sepolia
it.skip('proposeTransaction EIP-3770', async () => {
const safeTransactionData = {
to: safeAddress,
data: '0x',
Expand Down
7 changes: 3 additions & 4 deletions packages/api-kit/tests/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const config = {
CHAIN_ID: 5n,
BASE_URL: 'https://safe-transaction-goerli.safe.global',
JSON_RPC: 'https://rpc.ankr.com/eth_goerli',
EIP_3770_PREFIX: 'gor'
CHAIN_ID: 11155111n,
JSON_RPC: 'https://rpc.ankr.com/eth_sepolia',
EIP_3770_PREFIX: 'sep'
}

export default config
2 changes: 1 addition & 1 deletion packages/auth-kit/example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function App() {
symbol: 'ETH',
decimals: 18
},
rpcUrls: ['https://base.publicnode.com'],
rpcUrls: ['https://rpc.ankr.com/base'],
blockExplorerUrls: ['https://basescan.org/']
}
])
Expand Down
6 changes: 3 additions & 3 deletions packages/auth-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/auth-kit",
"version": "2.0.1",
"version": "2.0.2",
"description": "Authentication library for web2 logins",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -40,8 +40,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@safe-global/api-kit": "^2.1.0",
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/api-kit": "^2.2.0",
"@safe-global/protocol-kit": "^3.0.1",
"@web3auth/safeauth-embed": "^0.0.0",
"ethers": "^6.7.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/onramp-kit/example/client/src/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const AuthProvider = ({ children }: AuthContextProviderProps) => {
const options: SafeAuthInitOptions = {
enableLogging: true,
showWidgetButton: false,
chainConfig: { chainId: '0x5', rpcTarget: 'https://ethereum-goerli.publicnode.com' }
chainConfig: { chainId: '0x5', rpcTarget: 'https://rpc.ankr.com/eth_goerli' }
}

await authPack.init(options)
Expand Down
6 changes: 3 additions & 3 deletions packages/onramp-kit/example/server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ finalhandler@1.2.0:
unpipe "~1.0.0"

follow-redirects@^1.15.0:
version "1.15.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf"
integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==

form-data@^4.0.0:
version "4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/onramp-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/onramp-kit",
"version": "3.0.0",
"version": "3.0.1",
"description": "Onramp library",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -36,9 +36,9 @@
},
"dependencies": {
"@monerium/sdk": "^2.9.0",
"@safe-global/api-kit": "^2.1.0",
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/safe-core-sdk-types": "^4.0.0",
"@safe-global/api-kit": "^2.2.0",
"@safe-global/protocol-kit": "^3.0.1",
"@safe-global/safe-core-sdk-types": "^4.0.1",
"@stripe/crypto": "^0.0.4",
"@stripe/stripe-js": "^1.54.2",
"ethers": "^6.7.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol-kit/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ const config: HardhatUserConfig = {
}
]
},
goerli: {
sepolia: {
...sharedNetworkConfig,
url: 'https://rpc.ankr.com/eth_goerli'
url: 'https://rpc.ankr.com/eth_sepolia'
}
},
//@ts-expect-error Type not found
Expand Down
6 changes: 3 additions & 3 deletions packages/protocol-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/protocol-kit",
"version": "3.0.0",
"version": "3.0.1",
"description": "SDK to interact with Safe smart contracts",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/contracts": "^2.5.1",
"@safe-global/safe-contracts-v1.4.1": "npm:@safe-global/safe-contracts@1.4.1",
"@safe-global/safe-core-sdk-types": "^4.0.0",
"@safe-global/safe-core-sdk-types": "^4.0.1",
"@typechain/ethers-v6": "^0.5.0",
"@typechain/web3-v1": "^6.0.7",
"@types/chai": "^4.3.11",
Expand All @@ -81,7 +81,7 @@
},
"dependencies": {
"@noble/hashes": "^1.3.3",
"@safe-global/safe-deployments": "^1.32.0",
"@safe-global/safe-deployments": "^1.33.0",
"ethereumjs-util": "^7.1.5",
"ethers": "^6.7.1",
"semver": "^7.5.4",
Expand Down
11 changes: 11 additions & 0 deletions packages/protocol-kit/src/utils/eip-3770/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const networks: NetworkShortName[] = [
{ chainId: 100n, shortName: 'gno' },
{ chainId: 106n, shortName: 'vlx' },
{ chainId: 108n, shortName: 'tt' },
{ chainId: 109n, shortName: 'shibariumecosystem' },
{ chainId: 111n, shortName: 'etl' },
{ chainId: 122n, shortName: 'fuse' },
{ chainId: 123n, shortName: 'spark' },
Expand Down Expand Up @@ -68,6 +69,7 @@ export const networks: NetworkShortName[] = [
{ chainId: 599n, shortName: 'metis-goerli' },
{ chainId: 686n, shortName: 'kar' },
{ chainId: 787n, shortName: 'aca' },
{ chainId: 919n, shortName: 'modesep' },
{ chainId: 1001n, shortName: 'baobab' },
{ chainId: 1008n, shortName: 'eun' },
{ chainId: 1030n, shortName: 'cfx' },
Expand All @@ -90,6 +92,7 @@ export const networks: NetworkShortName[] = [
{ chainId: 1890n, shortName: 'lightlink_phoenix' },
{ chainId: 1891n, shortName: 'lightlink_pegasus' },
{ chainId: 1984n, shortName: 'euntest' },
{ chainId: 1998n, shortName: 'kyoto-testnet' },
{ chainId: 2001n, shortName: 'milkada' },
{ chainId: 2002n, shortName: 'milkalgo' },
{ chainId: 2008n, shortName: 'cloudwalk_testnet' },
Expand All @@ -108,6 +111,7 @@ export const networks: NetworkShortName[] = [
{ chainId: 4919n, shortName: 'xvm' },
{ chainId: 5000n, shortName: 'mantle' },
{ chainId: 5001n, shortName: 'mantle-testnet' },
{ chainId: 5003n, shortName: 'mnt-sep' },
{ chainId: 5700n, shortName: 'tsys' },
{ chainId: 6102n, shortName: 'cascadia' },
{ chainId: 7001n, shortName: 'zetachain-athens' },
Expand All @@ -132,6 +136,8 @@ export const networks: NetworkShortName[] = [
{ chainId: 12357n, shortName: 'rei-testnet' },
{ chainId: 13337n, shortName: 'beam-testnet' },
{ chainId: 17000n, shortName: 'holesky' },
{ chainId: 17172n, shortName: 'eclipse' },
{ chainId: 18231n, shortName: 'unreal' },
{ chainId: 23294n, shortName: 'sapphire' },
{ chainId: 23295n, shortName: 'sapphire-testnet' },
{ chainId: 34443n, shortName: 'mode' },
Expand All @@ -154,8 +160,10 @@ export const networks: NetworkShortName[] = [
{ chainId: 71402n, shortName: 'gw-mainnet-v1' },
{ chainId: 73799n, shortName: 'vt' },
{ chainId: 80001n, shortName: 'maticmum' },
{ chainId: 80085n, shortName: 'berachainArtio' },
{ chainId: 84531n, shortName: 'basegor' },
{ chainId: 84532n, shortName: 'basesep' },
{ chainId: 167008n, shortName: 'tko-katla' },
{ chainId: 200101n, shortName: 'milktada' },
{ chainId: 200202n, shortName: 'milktalgo' },
{ chainId: 333999n, shortName: 'olympus' },
Expand All @@ -166,12 +174,15 @@ export const networks: NetworkShortName[] = [
{ chainId: 534352n, shortName: 'scr' },
{ chainId: 534353n, shortName: 'scr-alpha' },
{ chainId: 622277n, shortName: 'rth' },
{ chainId: 713715n, shortName: 'sei-devnet' },
{ chainId: 7777777n, shortName: 'zora' },
{ chainId: 11155111n, shortName: 'sep' },
{ chainId: 11155420n, shortName: 'opsep' },
{ chainId: 222000222n, shortName: 'kanazawa' },
{ chainId: 245022926n, shortName: 'neonevm-devnet' },
{ chainId: 245022934n, shortName: 'neonevm-mainnet' },
{ chainId: 333000333n, shortName: 'meld' },
{ chainId: 999999999n, shortName: 'zsep' },
{ chainId: 1313161554n, shortName: 'aurora' },
{ chainId: 1313161555n, shortName: 'aurora-testnet' },
{ chainId: 1666600000n, shortName: 'hmy-s0' },
Expand Down
6 changes: 3 additions & 3 deletions packages/relay-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/relay-kit",
"version": "2.0.1",
"version": "2.0.2",
"description": "Safe Relay Kit",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -36,8 +36,8 @@
},
"dependencies": {
"@gelatonetwork/relay-sdk": "^5.5.0",
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/safe-core-sdk-types": "^4.0.0",
"@safe-global/protocol-kit": "^3.0.1",
"@safe-global/safe-core-sdk-types": "^4.0.1",
"@safe-global/safe-modules-deployments": "^2.0.0",
"ethers": "^6.7.1"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/safe-core-sdk-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-core-sdk-types",
"version": "4.0.0",
"version": "4.0.1",
"description": "Safe Core SDK types",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -29,7 +29,7 @@
],
"homepage": "https://github.com/safe-global/safe-core-sdk#readme",
"dependencies": {
"@safe-global/safe-deployments": "^1.32.0",
"@safe-global/safe-deployments": "^1.33.0",
"ethers": "^6.7.1",
"web3-core": "^1.10.3",
"web3-utils": "^1.10.3"
Expand Down
6 changes: 2 additions & 4 deletions playground/api-kit/confirm-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ interface Config {
RPC_URL: string
SIGNER_ADDRESS_PRIVATE_KEY: string
SAFE_ADDRESS: string
TX_SERVICE_URL: string
SAFE_TX_HASH: string
}

const config: Config = {
CHAIN_ID: 5n,
RPC_URL: 'https://rpc.ankr.com/eth_goerli',
CHAIN_ID: 11155111n,
RPC_URL: 'https://rpc.ankr.com/eth_sepolia',
SIGNER_ADDRESS_PRIVATE_KEY: '<SIGNER_ADDRESS_PRIVATE_KEY>',
SAFE_ADDRESS: '<SAFE_ADDRESS>',
TX_SERVICE_URL: 'https://safe-transaction-goerli.safe.global/', // Check https://docs.safe.global/safe-core-api/available-services
SAFE_TX_HASH: '<SAFE_TX_HASH>'
}

Expand Down
6 changes: 2 additions & 4 deletions playground/api-kit/execute-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ interface Config {
RPC_URL: string
SIGNER_ADDRESS_PRIVATE_KEY: string
SAFE_ADDRESS: string
TX_SERVICE_URL: string
SAFE_TX_HASH: string
}

const config: Config = {
CHAIN_ID: 5n,
RPC_URL: 'https://rpc.ankr.com/eth_goerli',
CHAIN_ID: 11155111n,
RPC_URL: 'https://rpc.ankr.com/eth_sepolia',
SIGNER_ADDRESS_PRIVATE_KEY: '<SIGNER_ADDRESS_PRIVATE_KEY>',
SAFE_ADDRESS: '<SAFE_ADDRESS>',
TX_SERVICE_URL: 'https://safe-transaction-goerli.safe.global/', // Check https://docs.safe.global/safe-core-api/available-services
SAFE_TX_HASH: '<SAFE_TX_HASH>'
}

Expand Down
8 changes: 3 additions & 5 deletions playground/api-kit/propose-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ interface Config {
RPC_URL: string
SIGNER_ADDRESS_PRIVATE_KEY: string
SAFE_ADDRESS: string
TX_SERVICE_URL: string
}

const config: Config = {
CHAIN_ID: 5n,
RPC_URL: 'https://rpc.ankr.com/eth_goerli',
CHAIN_ID: 11155111n,
RPC_URL: 'https://rpc.ankr.com/eth_sepolia',
SIGNER_ADDRESS_PRIVATE_KEY: '<SIGNER_ADDRESS_PRIVATE_KEY>',
SAFE_ADDRESS: '<SAFE_ADDRESS>',
TX_SERVICE_URL: 'https://safe-transaction-goerli.safe.global/' // Check https://docs.safe.global/safe-core-api/available-services
SAFE_ADDRESS: '<SAFE_ADDRESS>'
}

async function main() {
Expand Down
Loading

0 comments on commit c65f94e

Please sign in to comment.