Skip to content
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

Update Gnosis Safe API URLs to include '/api' suffix #337

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@safe-global/api-kit": "^2.4.1",
"@safe-global/protocol-kit": "^5.0.1",
"@safe-global/safe-core-sdk-types": "^5.0.1",
"@skalenetwork/skale-contracts-ethers-v6": "^1.0.2-develop.0",
"@skalenetwork/skale-contracts-ethers-v6": "^1.0.2-develop.30",
"axios": "^1.4.0",
"ethereumjs-util": "^7.1.4",
"semaphore-async-await": "^1.5.1"
Expand Down
30 changes: 15 additions & 15 deletions src/gnosis-safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,41 @@ import chalk from "chalk";
const URLS = {
"safe_transaction": {
[Network.from("mainnet").chainId.toString()]:
"https://safe-transaction-mainnet.safe.global",
"https://safe-transaction-mainnet.safe.global/api",
[Network.from("arbitrum").chainId.toString()]:
"https://safe-transaction-arbitrum.safe.global",
"https://safe-transaction-arbitrum.safe.global/api",
[Network.from("base").chainId.toString()]:
"https://safe-transaction-base.safe.global",
"https://safe-transaction-base.safe.global/api",
[Network.from("base-sepolia").chainId.toString()]:
"https://safe-transaction-base-sepolia.safe.global",
"https://safe-transaction-base-sepolia.safe.global/api",
[Network.from("bnb").chainId.toString()]:
"https://safe-transaction-bsc.safe.global",
"https://safe-transaction-bsc.safe.global/api",
[Network.from("xdai").chainId.toString()]:
"https://safe-transaction-gnosis-chain.safe.global",
"https://safe-transaction-gnosis-chain.safe.global/api",
[Network.from("optimism").chainId.toString()]:
"https://safe-transaction-optimism.safe.global",
"https://safe-transaction-optimism.safe.global/api",
[Network.from("matic").chainId.toString()]:
"https://safe-transaction-polygon.safe.global",
"https://safe-transaction-polygon.safe.global/api",
[Network.from("sepolia").chainId.toString()]:
"https://safe-transaction-sepolia.safe.global",
"https://safe-transaction-sepolia.safe.global/api",
// Aurora
"0x4e454152":
"https://safe-transaction-aurora.safe.global",
"https://safe-transaction-aurora.safe.global/api",
// Polygon zkEVM
"1101":
"https://safe-transaction-zkevm.safe.global",
"https://safe-transaction-zkevm.safe.global/api",
// ZkSync Era Mainnet
"324":
"https://safe-transaction-zksync.safe.global",
"https://safe-transaction-zksync.safe.global/api",
// Celo
"42220":
"https://safe-transaction-celo.safe.global",
"https://safe-transaction-celo.safe.global/api",
// Avalanche
"43114":
"https://safe-transaction-avalanche.safe.global",
"https://safe-transaction-avalanche.safe.global/api",
// Scroll
"534352":
"https://safe-transaction-scroll.safe.global",
"https://safe-transaction-scroll.safe.global/api",
}
};

Expand Down
12 changes: 6 additions & 6 deletions src/submitters/auto-submitter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {Transaction, ethers} from "ethers";
import {EXIT_CODES} from "../exitCodes";
import {EoaSubmitter} from "./eoa-submitter";
import {MARIONETTE_ADDRESS} from "./types/marionette";
Expand All @@ -7,9 +6,10 @@ import {
} from "./safe-ima-legacy-marionette-submitter";
import {SafeSubmitter} from "./safe-submitter";
import {Submitter} from "./submitter";
import {Transaction} from "ethers";
import {Upgrader} from "../upgrader";
import chalk from "chalk";
import hre from "hardhat";
import {ethers} from "hardhat";
import {skaleContracts} from "@skalenetwork/skale-contracts-ethers-v6";


Expand Down Expand Up @@ -50,7 +50,7 @@ export class AutoSubmitter extends Submitter {

private async getSubmitter () {
const owner = await this.upgrader.getOwner();
if (await hre.ethers.provider.getCode(owner) === "0x") {
if (await ethers.provider.getCode(owner) === "0x") {
console.log("Owner is not a contract");
return new EoaSubmitter();
}
Expand Down Expand Up @@ -117,7 +117,7 @@ export class AutoSubmitter extends Submitter {
process.exit(EXIT_CODES.UNKNOWN_IMA);
}
const contractsNetwork =
await skaleContracts.getNetworkByProvider(hre.ethers.provider);
await skaleContracts.getNetworkByProvider(ethers.provider);
const ima = await contractsNetwork.getProject("ima");
return await ima.getInstance(process.env.IMA);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ export class AutoSubmitter extends Submitter {
}

private static async _versionFunctionExists () {
const bytecode = await hre.ethers.provider.getCode(MARIONETTE_ADDRESS);
const bytecode = await ethers.provider.getCode(MARIONETTE_ADDRESS);
const hexPrefixLength = 2;
const selectorLength = 10;

Expand All @@ -179,7 +179,7 @@ export class AutoSubmitter extends Submitter {
const marionette = new ethers.Contract(
MARIONETTE_ADDRESS,
AutoSubmitter.marionetteInterface,
hre.ethers.provider
ethers.provider
);

/*
Expand Down
50 changes: 26 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -601,18 +601,18 @@
"@noble/hashes" "~1.5.0"
"@scure/base" "~1.1.8"

"@skalenetwork/skale-contracts-ethers-v6@^1.0.2-develop.0":
version "1.0.2-develop.15"
resolved "https://registry.yarnpkg.com/@skalenetwork/skale-contracts-ethers-v6/-/skale-contracts-ethers-v6-1.0.2-develop.15.tgz#80112f26ea0bca652c40d1ec6b361fa444141533"
integrity sha512-m4L6Wn+vNlXGQSiwDhh4yfs2Vdw1EVZvskV1Q7OBXPN/thN2qQorhO9OntZ3WoSlcHJ18otR/gkZTiDQuOl6Mg==
"@skalenetwork/skale-contracts-ethers-v6@^1.0.2-develop.30":
version "1.0.2-develop.30"
resolved "https://registry.yarnpkg.com/@skalenetwork/skale-contracts-ethers-v6/-/skale-contracts-ethers-v6-1.0.2-develop.30.tgz#d4adf188041fa5de7c34d6cefbabdd4835547266"
integrity sha512-mWYCyK1kneEAd4RsAYXoiVj2kmcYhKtB/gnAGM7nOGaaLjMsHPGLxGU9bGytiZZRiwGf5758x/F2Trrn5bKR9g==
dependencies:
"@skalenetwork/skale-contracts" "1.0.2-develop.15"
ethers "^6.13.3"
"@skalenetwork/skale-contracts" "1.0.2-develop.30"
ethers "^6.13.4"

"@skalenetwork/[email protected].15":
version "1.0.2-develop.15"
resolved "https://registry.yarnpkg.com/@skalenetwork/skale-contracts/-/skale-contracts-1.0.2-develop.15.tgz#37e28e0b4c13606bdb1ccf75551fee27d9324db3"
integrity sha512-5fwJGHcXBU78xS5YD5Ot575l1ALnHYldeWP9EYkd/IUPnfJ/1qqk3r+QwpHW0qaqmTrLymWagZbnDqoW0rYb/A==
"@skalenetwork/[email protected].30":
version "1.0.2-develop.30"
resolved "https://registry.yarnpkg.com/@skalenetwork/skale-contracts/-/skale-contracts-1.0.2-develop.30.tgz#ed165d49ef6de6c4bbc831a741b206ffb833d5ab"
integrity sha512-h84NQxobzbI5KZcPZtcgKZYL9/iOJym2mF876pfUY7ftBd0aIu/xtJqIPfeoAcDaevhxJEg9QeabCXKp+9tbCA==
dependencies:
"@renovatebot/pep440" "^3.0.20"
axios "^1.4.0"
Expand Down Expand Up @@ -677,10 +677,12 @@
dependencies:
undici-types "~6.19.2"

"@types/[email protected]":
version "18.15.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469"
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==
"@types/[email protected]":
version "22.7.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b"
integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==
dependencies:
undici-types "~6.19.2"

"@types/pbkdf2@^3.0.0":
version "3.1.0"
Expand Down Expand Up @@ -1516,17 +1518,17 @@ ethereumjs-util@^7.1.4:
ethereum-cryptography "^0.1.3"
rlp "^2.2.4"

ethers@^6.13.3:
version "6.13.3"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.3.tgz#b87afdadb91cc8df5f56b9c59c96e5b206f4a600"
integrity sha512-/DzbZOLVtoO4fKvvQwpEucHAQgIwBGWuRvBdwE/lMXgXvvHHTSkn7XqAQ2b+gjJzZDJjWA9OD05bVceVOsBHbg==
ethers@^6.13.4:
version "6.13.4"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.4.tgz#bd3e1c3dc1e7dc8ce10f9ffb4ee40967a651b53c"
integrity sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==
dependencies:
"@adraffy/ens-normalize" "1.10.1"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@types/node" "18.15.13"
"@types/node" "22.7.5"
aes-js "4.0.0-beta.5"
tslib "2.4.0"
tslib "2.7.0"
ws "8.17.1"

evp_bytestokey@^1.0.3:
Expand Down Expand Up @@ -2457,10 +2459,10 @@ ts-node@^10.5.0:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"

tslib@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
tslib@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==

type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
Expand Down
Loading