skalenetwork / IMA

SKALE Interchain Messaging Agent
https://skale.space
GNU Affero General Public License v3.0
37 stars 17 forks source link

Can't update IMA due to gnosis safe api url change #1542

Open DimaStebaev opened 1 year ago

DimaStebaev commented 1 year ago
### Tasks
- [ ] https://github.com/skalenetwork/IMA/issues/1638
DmytroNazarenko commented 12 months ago

IMA: 2.0.0-beta.8

OleksanderSalamatov commented 9 months ago

Gnosis updated their sdk from safe-core-sdk to protocol-kit. In IMA upgrade script we still use old SDK, which causes problems with upgrade procedure via multisig. We should update dependencies to use protocol-kit instead of deprecated safe-core-sdk.

https://github.com/skalenetwork/IMA/issues/1638

EvgeniyZZ commented 9 months ago

@DmytroNazarenko Triage

DmytroNazarenko commented 9 months ago

Moved to 2.4 as 2.3 does not contain IMA mainnet contracts changes

PolinaKiporenko commented 7 months ago

ima: 2.1.0-beta.2

OleksanderSalamatov commented 6 months ago

Contracts update via multisig still not working "out of the box" for modern testnets e.g. Sepolia and Holesky

IMA: 2.1.0-beta.2

Error log:

Owner is a contract
Using Gnosis Safe
Error: Can't get safe-transaction url at network with chainId = 11155111
    at getSafeTransactionUrl (/root/Workspace/IMA/proxy/node_modules/@skalenetwork/upgrade-tools/dist/src/gnosis-safe.js:109:15)
    at /root/Workspace/IMA/proxy/node_modules/@skalenetwork/upgrade-tools/dist/src/gnosis-safe.js:98:27
    at Generator.next (<anonymous>)
    at fulfilled (/root/Workspace/IMA/proxy/node_modules/@skalenetwork/upgrade-tools/dist/src/gnosis-safe.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Solution: Add networks and api urls to gnosis-safe.js/gnosis-safe.ts like this (example for Sepolia network):

(function (Network) {
    Network[Network["MAINNET"] = 1] = "MAINNET";
    Network[Network["GOERLI"] = 5] = "GOERLI";
    Network[Network["GANACHE"] = 1337] = "GANACHE";
    Network[Network["HARDHAT"] = 31337] = "HARDHAT";
    Network[Network["SEPOLIA"] = 11155111] = "SEPOLIA";
})(Network || (Network = {}));
// constants
const URLS = {
    safe_transaction: {
        [Network.MAINNET]: "https://safe-transaction-mainnet.safe.global",
        [Network.GOERLI]: "https://safe-transaction-goerli.safe.global",
        [Network.SEPOLIA]: "https://safe-transaction-sepolia.safe.global"
    }   
};

For the holesky we should consider using 3rd party api url, as gnosis-safe do not provide their own api for this network, maybe we can use this project: https://holesky-safe.protofire.io/