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

Fast2 rm #339

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
331 changes: 57 additions & 274 deletions deployments/dev_addresses.json

Large diffs are not rendered by default.

367 changes: 131 additions & 236 deletions deployments/prod_addresses.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions scripts/constants/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export const getDefaultIntegrationType = (
): IntegrationTypes => {
return switchboards?.[chain]?.[sibling]
? IntegrationTypes.native
: IntegrationTypes.fast2;
// : IntegrationTypes.fast; // revert back this when migration done
: IntegrationTypes.fast; // revert back this when migration done
};

export const switchboards = {
Expand Down
32 changes: 0 additions & 32 deletions scripts/deploy/2-check-roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,38 +126,6 @@ const main = async () => {
});
summary.push(s);

// Setup Fast Switchboard2 roles
s = await checkAndUpdateRoles({
userSpecificRoles: [
{
userAddress: ownerAddress,
filterRoles: [
ROLES.RESCUE_ROLE,
ROLES.GOVERNANCE_ROLE,
ROLES.TRIP_ROLE,
ROLES.UN_TRIP_ROLE,
ROLES.WITHDRAW_ROLE,
ROLES.FEES_UPDATER_ROLE,
],
},
{
userAddress: transmitterAddress,
filterRoles: [ROLES.FEES_UPDATER_ROLE],
},
{
userAddress: watcherAddress,
filterRoles: [ROLES.WATCHER_ROLE],
},
],

contractName: CORE_CONTRACTS.FastSwitchboard2,
filterChains,
filterSiblingChains,
sendTransaction,
newRoleStatus,
});
summary.push(s);

// Grant watcher role to watcher for OptimisticSwitchboard
s = await checkAndUpdateRoles({
userSpecificRoles: [
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/3-configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ export const main = async () => {
addr = await registerSwitchboards(
chain,
siblingSlugs,
CORE_CONTRACTS.FastSwitchboard2,
IntegrationTypes.fast2,
CORE_CONTRACTS.FastSwitchboard,
IntegrationTypes.fast,
addr,
addresses,
socketSigner
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy/helpers/fastSwitchboards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const main = async (srcChains: ChainSlug[], dstChains: ChainSlug[]) => {
await Promise.all(
srcChainSlugs.map(async (chainSlug) => {
let fastSwitchboardAddress =
addresses[chainSlug as ChainSlug]?.FastSwitchboard2;
addresses[chainSlug as ChainSlug]?.FastSwitchboard;
if (!fastSwitchboardAddress) return;

let siblingChains = dstChainSlugs.filter((s) => chainSlug !== s);
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/scripts/deploySwitchboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export default async function deploySwitchboards(
mode: DeploymentMode
): Promise<ChainSocketAddresses> {
let updatedConfig: any = sourceConfig;
if (!sourceConfig.FastSwitchboard2)
if (!sourceConfig.FastSwitchboard)
updatedConfig = await deploySwitchboard(
IntegrationTypes.fast2,
IntegrationTypes.fast,
chainSlug,
"",
signer,
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/single-click-deploy/addChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const main = async () => {
let addr = await registerSwitchboards(
chain,
siblings,
CORE_CONTRACTS.FastSwitchboard2,
IntegrationTypes.fast2,
CORE_CONTRACTS.FastSwitchboard,
IntegrationTypes.fast,
addresses[chain],
allAddresses,
socketSigner
Expand Down
24 changes: 2 additions & 22 deletions scripts/deploy/single-click-deploy/configureChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export const main = async () => {
addr = await registerSwitchboards(
sibling,
[chain],
CORE_CONTRACTS.FastSwitchboard2,
IntegrationTypes.fast2,
CORE_CONTRACTS.FastSwitchboard,
IntegrationTypes.fast,
addresses[sibling]!,
addresses,
socketSigner
Expand Down Expand Up @@ -115,26 +115,6 @@ const grantRoles = async () => {
newRoleStatus,
});

// Setup Fast Switchboard2 roles
await checkAndUpdateRoles({
userSpecificRoles: [
{
userAddress: config.feeUpdaterAddress,
filterRoles: [ROLES.FEES_UPDATER_ROLE],
},
{
userAddress: config.watcherAddress,
filterRoles: [ROLES.WATCHER_ROLE],
},
],

contractName: CORE_CONTRACTS.FastSwitchboard2,
filterChains,
filterSiblingChains: [chain],
sendTransaction,
newRoleStatus,
});

// Grant watcher role to watcher for OptimisticSwitchboard
await checkAndUpdateRoles({
userSpecificRoles: [
Expand Down
Loading