Skip to content

Commit

Permalink
Merge pull request #339 from SocketDotTech/fast2-rm
Browse files Browse the repository at this point in the history
Fast2 rm
  • Loading branch information
arthcp authored Nov 15, 2023
2 parents 52e65f6 + 1b35528 commit 9da878a
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 574 deletions.
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@socket.tech/dl-core",
"license": "UNLICENSED",
"version": "2.4.11-test.1",
"version": "2.4.11-test.2",
"description": "Smart contracts for socket data layer.",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
Expand Down
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

0 comments on commit 9da878a

Please sign in to comment.