diff --git a/examples/action-proposal/index.js b/examples/action-proposal/index.js index c8be5db8..604e0ebb 100644 --- a/examples/action-proposal/index.js +++ b/examples/action-proposal/index.js @@ -9,7 +9,7 @@ async function main() { const proposal = await client.createProposal({ contract: { address: '0xf62322658Cb0F51C71Da36637a6846B0967cA264', - network: 'goerli', + network: 'sepolia', }, title: 'Set to 42', description: 'Set value to 42', diff --git a/examples/batch-proposal/index.js b/examples/batch-proposal/index.js index 07353ff9..a91797ef 100644 --- a/examples/batch-proposal/index.js +++ b/examples/batch-proposal/index.js @@ -12,12 +12,12 @@ const contracts = [ { address: ERC20Token, name: 'ERC20 Token', - network: 'goerli', + network: 'sepolia', abi: '[{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]', }, { address: RolesContract, - network: 'goerli', + network: 'sepolia', name: 'Roles Contract', abi: '[{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"}]', }, @@ -27,7 +27,7 @@ const safeAddress = '0xba4A8019166BB0E066dF2De99b37fbd5916eCf20'; const steps = [ { - contractId: `goerli-${ERC20Token}`, + contractId: `sepolia-${ERC20Token}`, targetFunction: { name: 'mint', inputs: [{ type: 'uint256', name: 'amount' }], @@ -36,7 +36,7 @@ const steps = [ type: 'custom', }, { - contractId: `goerli-${ERC20Token}`, + contractId: `sepolia-${ERC20Token}`, targetFunction: { name: 'transfer', inputs: [ @@ -48,7 +48,7 @@ const steps = [ type: 'custom', }, { - contractId: `goerli-${RolesContract}`, + contractId: `sepolia-${RolesContract}`, metadata: { action: 'grantRole', role: '0x0000000000000000000000000000000000000000000000000000000000000000', diff --git a/examples/create-relayer/index.js b/examples/create-relayer/index.js index f1385f72..51190c20 100644 --- a/examples/create-relayer/index.js +++ b/examples/create-relayer/index.js @@ -8,7 +8,7 @@ async function main() { const createParams = { name: 'MyNewRelayer', - network: 'goerli', + network: 'sepolia', minBalance: BigInt(1e17).toString(), policies: { whitelistReceivers: ['0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'], diff --git a/examples/create-sentinel/index.js b/examples/create-sentinel/index.js index 9f8b7fab..b3c39377 100644 --- a/examples/create-sentinel/index.js +++ b/examples/create-sentinel/index.js @@ -28,7 +28,7 @@ async function main() { const blockRequestParameters = { type: 'BLOCK', // BLOCK or FORTA - network: 'goerli', + network: 'sepolia', // optional confirmLevel: 1, // if not set, we pick the blockwatcher for the chosen network with the lowest offset name: 'MyNewSentinel', diff --git a/examples/pause-proposal/index.js b/examples/pause-proposal/index.js index e2c654e7..63f7f550 100644 --- a/examples/pause-proposal/index.js +++ b/examples/pause-proposal/index.js @@ -3,7 +3,7 @@ require('dotenv').config(); const { AdminClient } = require('@openzeppelin/defender-admin-client'); const address = '0xB07b1C80371915dEFd254d1C57BeF2bDe6D3b610'; -const network = 'goerli'; +const network = 'sepolia'; async function main() { const creds = { apiKey: process.env.ADMIN_API_KEY, apiSecret: process.env.ADMIN_API_SECRET }; diff --git a/examples/unpause-proposal/index.js b/examples/unpause-proposal/index.js index cdd43219..c1a2b0db 100644 --- a/examples/unpause-proposal/index.js +++ b/examples/unpause-proposal/index.js @@ -3,7 +3,7 @@ require('dotenv').config(); const { AdminClient } = require('@openzeppelin/defender-admin-client'); const address = '0xB07b1C80371915dEFd254d1C57BeF2bDe6D3b610'; -const network = 'goerli'; +const network = 'sepolia'; async function main() { const creds = { apiKey: process.env.ADMIN_API_KEY, apiSecret: process.env.ADMIN_API_SECRET }; diff --git a/examples/upgrade-proposal/index.js b/examples/upgrade-proposal/index.js index bf8311cc..8b527761 100644 --- a/examples/upgrade-proposal/index.js +++ b/examples/upgrade-proposal/index.js @@ -6,7 +6,7 @@ const proxy = '0xB07b1C80371915dEFd254d1C57BeF2bDe6D3b610'; const newImplementation = '0x86690db6c757fcc71ff1b69cf24529e5ab6481fb'; const newImplementationAbi = '[{"inputs":[{"internalType":"string","name":"newValue","type":"string"}],"name":"changeValue","outputs":[],"stateMutability":"nonpayable","type":"function"}]'; // If no newImplementationAbi is provided the previous implementation ABI will be assumed -const network = 'goerli'; +const network = 'sepolia'; async function main() { const creds = { apiKey: process.env.ADMIN_API_KEY, apiSecret: process.env.ADMIN_API_SECRET }; diff --git a/examples/verify-contract/index.js b/examples/verify-contract/index.js index 45ca2429..354d589d 100644 --- a/examples/verify-contract/index.js +++ b/examples/verify-contract/index.js @@ -31,8 +31,8 @@ async function main() { 'https://raw.githubusercontent.com/OpenZeppelin/defender-client/fa441208febac7f46fe7bb03c787659089315f78/examples/verify-contract/compilation-artifact.json', solidityFilePath: 'contracts/Vault.sol', contractName: 'VaultV2', - contractAddress: '0x38e373CC414e90dDec45cf7166d497409902e998', - contractNetwork: 'goerli', + contractAddress: '0xc1a35c687c72AE7ccF7067F018848e5FceED637F', + contractNetwork: 'sepolia', }); printVerificationToConsole(verification); @@ -46,8 +46,8 @@ async function main() { 'https://github.com/OpenZeppelin/defender-client/blob/master/examples/verify-contract/compilation-artifact.json', solidityFilePath: 'contracts/Vault.sol', contractName: 'VaultV2', - contractAddress: '0x38e373CC414e90dDec45cf7166d497409902e998', - contractNetwork: 'goerli', + contractAddress: '0xc1a35c687c72AE7ccF7067F018848e5FceED637F', + contractNetwork: 'sepolia', }); printVerificationToConsole(verification); @@ -56,8 +56,8 @@ async function main() { // state of your contract, you can call `get` providing // the address and network verification = await client.getDeploymentVerification({ - contractAddress: '0x38e373CC414e90dDec45cf7166d497409902e998', - contractNetwork: 'goerli', + contractAddress: '0xc1a35c687c72AE7ccF7067F018848e5FceED637F', + contractNetwork: 'sepolia', }); printVerificationToConsole(verification); diff --git a/packages/admin/README.md b/packages/admin/README.md index a03f78f8..b9c4736c 100644 --- a/packages/admin/README.md +++ b/packages/admin/README.md @@ -29,7 +29,7 @@ To create a `custom` action proposal, you need to provide the function interface ```js await client.createProposal({ - contract: { address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E', network: 'goerli' }, // Target contract + contract: { address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E', network: 'sepolia' }, // Target contract title: 'Adjust fee to 10%', // Title of the proposal description: 'Adjust the contract fee collected per action to 10%', // Description of the proposal type: 'custom', // Use 'custom' for custom admin actions @@ -101,7 +101,7 @@ To create an `upgrade` action proposal, provide the proxy contract network and a ```js const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9'; const newImplementationAbi = '[...]'; -const contract = { network: 'goerli', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; +const contract = { network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; await client.proposeUpgrade({ newImplementation, newImplementationAbi }, contract); ``` @@ -113,7 +113,7 @@ If your proxies do not implement the [EIP1967 admin slot](https://eips.ethereum. const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9'; const proxyAdmin = '0x2fC100f1BeA4ACCD5dA5e5ed725D763c90e8ca96'; const newImplementationAbi = '[...]'; -const contract = { network: 'goerli', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; +const contract = { network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; await client.proposeUpgrade({ newImplementation, newImplementationAbi, proxyAdmin }, contract); ``` @@ -123,7 +123,7 @@ await client.proposeUpgrade({ newImplementation, newImplementationAbi, proxyAdmi const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9'; const via = '0xF608FA64c4fF8aDdbEd106E69f3459effb4bC3D1'; const viaType = 'Safe'; // 'Gnosis Multisig', 'Safe' or 'EOA' -const contract = { network: 'goerli', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; +const contract = { network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; const newImplementationAbi = '[...]'; await client.proposeUpgrade({ newImplementation, newImplementationAbi, via, viaType }, contract); ``` @@ -133,7 +133,7 @@ await client.proposeUpgrade({ newImplementation, newImplementationAbi, via, viaT To create `pause` and `unpause` action proposals, you need to provide the contract network and address, as well as the multisig that will be used for approving it. Defender takes care of the rest: ```js -const contract = { network: 'goerli', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; +const contract = { network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' }; // Create a pause proposal await client.proposePause({ via: '0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b', viaType: 'Safe' }, contract); @@ -156,12 +156,12 @@ const contracts = [ { address: ERC20Token, name: 'ERC20 Token', - network: 'goerli', + network: 'sepolia', abi: '[{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]', }, { address: RolesContract, - network: 'goerli', + network: 'sepolia', name: 'Roles Contract', abi: '[{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"}]', }, @@ -171,7 +171,7 @@ const safeAddress = '0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b'; const steps = [ { - contractId: `goerli-${ERC20Token}`, + contractId: `sepolia-${ERC20Token}`, targetFunction: { name: 'mint', inputs: [{ type: 'uint256', name: 'amount' }], @@ -180,7 +180,7 @@ const steps = [ type: 'custom', }, { - contractId: `goerli-${ERC20Token}`, + contractId: `sepolia-${ERC20Token}`, targetFunction: { name: 'transfer', inputs: [ @@ -192,7 +192,7 @@ const steps = [ type: 'custom', }, { - contractId: `goerli-${RolesContract}`, + contractId: `sepolia-${RolesContract}`, metadata: { action: 'grantRole', role: '0x0000000000000000000000000000000000000000000000000000000000000000', @@ -219,7 +219,7 @@ await client.createProposal({ To use a relayer as an execution strategy you need to provide the `relayerId` as well as setting `via` to the relayer address and `viaType: 'Relayer'` ```js -const contract = { network: 'goerli', address: '0xC73dAd1D9a356Ab2F3c6bC0049034aFe4B59DbB5' }; +const contract = { network: 'sepolia', address: '0xC73dAd1D9a356Ab2F3c6bC0049034aFe4B59DbB5' }; const proposal = await client.proposePause( { @@ -313,7 +313,7 @@ If you create a new proposal for a Contract that has not yet been added to Defen ```js const contract = { - network: 'goerli', + network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E', name: 'My contract', // Name of the contract if it is created along with this proposal abi: '[...]', // ABI to set for this contract if it is created @@ -325,7 +325,7 @@ Alternatively, you can add any contract explicitly by using the `addContract` me ```js await client.addContract({ - network: 'goerli', + network: 'sepolia', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E', name: 'My contract', abi: '[...]', diff --git a/packages/base/src/utils/network.test.ts b/packages/base/src/utils/network.test.ts index 8772d064..1704909e 100644 --- a/packages/base/src/utils/network.test.ts +++ b/packages/base/src/utils/network.test.ts @@ -2,12 +2,12 @@ import { fromChainId, isValidNetwork, Network, toChainId } from './network'; describe('utils/network', () => { describe('fromChainId', () => { - test('valid chainId', () => expect(fromChainId(5)).toEqual('goerli')); + test('valid chainId', () => expect(fromChainId(11155111)).toEqual('sepolia')); test('invalid chainId', () => expect(fromChainId(99)).toBeUndefined()); }); describe('toChainId', () => { - test('valid network', () => expect(toChainId('goerli')).toEqual(5)); + test('valid network', () => expect(toChainId('sepolia')).toEqual(11155111)); test('invalid network', () => expect(toChainId('invalid' as Network)).toBeUndefined()); }); diff --git a/packages/base/src/utils/network.ts b/packages/base/src/utils/network.ts index 1dc888e8..8c115331 100644 --- a/packages/base/src/utils/network.ts +++ b/packages/base/src/utils/network.ts @@ -3,7 +3,6 @@ import { findKey } from 'lodash'; type PublicNetwork = | 'mainnet' | 'sepolia' - | 'goerli' | 'xdai' | 'sokol' | 'fuse' @@ -19,11 +18,9 @@ type PublicNetwork = | 'avalanche' | 'fuji' | 'optimism' - | 'optimism-goerli' | 'optimism-sepolia' | 'arbitrum' | 'arbitrum-nova' - | 'arbitrum-goerli' | 'arbitrum-sepolia' | 'celo' | 'alfajores' @@ -34,10 +31,8 @@ type PublicNetwork = | 'hedera' | 'hederatest' | 'zksync' - | 'zksync-goerli' | 'zksync-sepolia' | 'base' - | 'base-goerli' | 'base-sepolia' | 'linea' | 'linea-goerli' @@ -54,7 +49,6 @@ export type Network = PublicNetwork | CustomNetwork; export const Networks: Network[] = [ 'mainnet', 'sepolia', - 'goerli', 'xdai', 'sokol', 'fuse', @@ -70,11 +64,9 @@ export const Networks: Network[] = [ 'avalanche', 'fuji', 'optimism', - 'optimism-goerli', 'optimism-sepolia', 'arbitrum', 'arbitrum-nova', - 'arbitrum-goerli', 'arbitrum-sepolia', 'celo', 'alfajores', @@ -85,10 +77,8 @@ export const Networks: Network[] = [ 'hedera', 'hederatest', 'zksync', - 'zksync-goerli', 'zksync-sepolia', 'base', - 'base-goerli', 'base-sepolia', 'linea', 'linea-goerli', @@ -115,7 +105,6 @@ export function toChainId(network: Network): number | undefined { const chainIds: { [key in Network]: number } = { 'mainnet': 1, 'sepolia': 11155111, - 'goerli': 5, 'xdai': 100, 'sokol': 77, 'fuse': 122, @@ -131,11 +120,9 @@ const chainIds: { [key in Network]: number } = { 'avalanche': 0xa86a, 'fuji': 0xa869, 'optimism': 10, - 'optimism-goerli': 420, 'optimism-sepolia': 11155420, 'arbitrum': 42161, 'arbitrum-nova': 42170, - 'arbitrum-goerli': 421613, 'arbitrum-sepolia': 421614, 'celo': 42220, 'alfajores': 44787, @@ -146,10 +133,8 @@ const chainIds: { [key in Network]: number } = { 'hedera': 295, 'hederatest': 296, 'zksync': 324, - 'zksync-goerli': 280, 'zksync-sepolia': 300, 'base': 8453, - 'base-goerli': 84531, 'base-sepolia': 84532, 'linea': 59144, 'linea-goerli': 59140, diff --git a/packages/deploy/src/api/block-explorer-api-key.test.ts b/packages/deploy/src/api/block-explorer-api-key.test.ts index a2eaa689..72fa6a47 100644 --- a/packages/deploy/src/api/block-explorer-api-key.test.ts +++ b/packages/deploy/src/api/block-explorer-api-key.test.ts @@ -14,7 +14,7 @@ describe('Block Explorer Api Key Client', () => { const createPaylod: CreateBlockExplorerApiKeyRequest = { key: 'random-key', - network: 'goerli', + network: 'sepolia', }; const updatePaylod: UpdateBlockExplorerApiKeyRequest = { key: 'random-key', diff --git a/packages/deploy/src/api/deployment.test.ts b/packages/deploy/src/api/deployment.test.ts index 3ed6aefd..cb3a4563 100644 --- a/packages/deploy/src/api/deployment.test.ts +++ b/packages/deploy/src/api/deployment.test.ts @@ -15,7 +15,7 @@ describe('Deploy Client', () => { const deployCreatePayload: DeployContractRequest = { contractName: 'ERC20', contractPath: 'contracts/ERC20.sol', - network: 'goerli', + network: 'sepolia', artifactUri: 'url', verifySourceCode: true, }; diff --git a/packages/relay/README.md b/packages/relay/README.md index 356f4d18..536937ad 100644 --- a/packages/relay/README.md +++ b/packages/relay/README.md @@ -42,7 +42,7 @@ Create a new relayer: ```js const requestParameters = { name: 'MyNewRelayer', - network: 'goerli', + network: 'sepolia', minBalance: BigInt(1e17).toString(), policies: { whitelistReceivers: ['0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'], diff --git a/packages/relay/src/ethers/signer.test.ts b/packages/relay/src/ethers/signer.test.ts index d1a5313f..87e73211 100644 --- a/packages/relay/src/ethers/signer.test.ts +++ b/packages/relay/src/ethers/signer.test.ts @@ -54,7 +54,7 @@ describe('ethers/signer', () => { jest.resetAllMocks(); relayer.getRelayer.mockResolvedValue({ - network: 'goerli', + network: 'sepolia', address: from, relayerId: '1', createdAt: '', diff --git a/packages/relay/src/test/relayClient.test.ts b/packages/relay/src/test/relayClient.test.ts index 657eaed2..b14dc11f 100644 --- a/packages/relay/src/test/relayClient.test.ts +++ b/packages/relay/src/test/relayClient.test.ts @@ -14,7 +14,7 @@ describe('RelayClient', () => { let relayer: TestRelayClient; const relayerId = '1'; const mockRelayerResponse: RelayerGetResponse = { - network: 'goerli', + network: 'sepolia', address: '0x0', relayerId: relayerId, createdAt: '', diff --git a/packages/relay/src/web3/sender.test.ts b/packages/relay/src/web3/sender.test.ts index dce06790..84419a50 100644 --- a/packages/relay/src/web3/sender.test.ts +++ b/packages/relay/src/web3/sender.test.ts @@ -54,7 +54,7 @@ describe('web3/sender', () => { jest.resetAllMocks(); relayer.getRelayer.mockResolvedValue({ - network: 'goerli', + network: 'sepolia', address: from, relayerId: '1', createdAt: '', diff --git a/packages/sentinel/README.md b/packages/sentinel/README.md index efa84b93..896ae3a2 100644 --- a/packages/sentinel/README.md +++ b/packages/sentinel/README.md @@ -225,7 +225,7 @@ There are two types of sentinels, `BLOCK` and `FORTA`. For more information on w To create a new sentinel, you need to provide the type, network, name, pause-state, conditions, alert threshold and notification configuration. This request is exported as type `CreateSentinelRequest`. -An example for a `BLOCK` sentinel is provided below. This sentinel will be named `MyNewSentinel` and will be monitoring the `renounceOwnership` function on the `0x0f06aB75c7DD497981b75CD82F6566e3a5CAd8f2` contract on the Goerli network. +An example for a `BLOCK` sentinel is provided below. This sentinel will be named `MyNewSentinel` and will be monitoring the `renounceOwnership` function on the `0x0f06aB75c7DD497981b75CD82F6566e3a5CAd8f2` contract on the Sepolia network. The alert threshold is set to 2 times within 1 hour, and the user will be notified via email. Furthermore, you may optionally set the `riskCategory` property of your sentinel, which labels your sentinel under a certain category: @@ -234,7 +234,7 @@ Furthermore, you may optionally set the `riskCategory` property of your sentinel ```js const requestParameters = { type: 'BLOCK', - network: 'goerli', + network: 'sepolia', // optional confirmLevel: 1, // if not set, we pick the blockwatcher for the chosen network with the lowest offset name: 'MyNewSentinel', diff --git a/packages/sentinel/src/api/index.test.ts b/packages/sentinel/src/api/index.test.ts index 93bc3f2c..2ad70968 100644 --- a/packages/sentinel/src/api/index.test.ts +++ b/packages/sentinel/src/api/index.test.ts @@ -73,7 +73,7 @@ describe('SentinelClient', () => { name: 'Test BLOCK sentinel', addresses: ['0xdead'], notificationChannels: [], - network: 'goerli', + network: 'sepolia', confirmLevel: 1, paused: false, abi: ABI, @@ -94,7 +94,7 @@ describe('SentinelClient', () => { const createFortaPayload: ExternalCreateFortaSubscriberRequest = { type: 'FORTA', name: 'Test FORTA sentinel', - network: 'goerli', + network: 'sepolia', addresses: ['0xdead'], notificationChannels: [], paused: false, @@ -107,7 +107,7 @@ describe('SentinelClient', () => { name: 'Previous sentinel', paused: false, blockWatcherId: 'i-am-the-watcher', - network: 'goerli', + network: 'sepolia', addressRules: [ { abi: '[{ method: "type" }]', @@ -344,7 +344,7 @@ describe('SentinelClient', () => { subscriberId: 'old-subscriber-id', name: 'Previous sentinel', paused: false, - network: 'goerli', + network: 'sepolia', fortaRule: { addresses: ['0xdead'], conditions: { @@ -544,7 +544,7 @@ describe('SentinelClient', () => { describe('getBlockwatcherIdByNetwork', () => { it('finds blockwatchers for network when there are available', async () => { // Make sure the network provided is the network mocked above - const results = await sentinel.getBlockwatcherIdByNetwork('goerli'); + const results = await sentinel.getBlockwatcherIdByNetwork('sepolia'); expect(results[0]?.blockWatcherId).toEqual('i-am-the-watcher'); });