Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTimepunk committed Nov 21, 2024
1 parent a819b83 commit 569f865
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 42 deletions.
2 changes: 1 addition & 1 deletion script/forge-scripts/Abstract.Deploy.Single.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ abstract contract AbstractDeploySingle is BatchScript {
uint64 public constant BLAST = 81_457;
uint64 public constant BARTIO = 80_084;

uint256[] public manualNonces = [21, 21, 21, 21, 20, 20, 19, 8, 2, 1, 0];
uint256[] public manualNonces = [22, 22, 22, 22, 21, 21, 20, 9, 3, 2, 0];
uint64[] public chainIds = [1, 56, 43_114, 137, 42_161, 10, 8453, 250, 59_144, 81_457, 80_084];
string[] public chainNames = [
"Ethereum",
Expand Down
27 changes: 1 addition & 26 deletions script/forge-scripts/misc/Abstract.Configure.PreBeraLaunch.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,6 @@ struct UpdateVars {
}

abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
function _setBlastDelegate(
uint256 env,
uint256 srcChainIndex,
Cycle cycle,
uint64[] memory finalDeployedChains
)
internal
setEnvDeploy(cycle)
{
assert(salt.length > 0);
UpdateVars memory vars;

vars.chainId = finalDeployedChains[srcChainIndex];

vars.srcLzImpl = _readContractsV1(env, chainNames[srcChainIndex], vars.chainId, "LayerzeroImplementation");
assert(vars.srcLzImpl != address(0));
assert(PROTOCOL_ADMINS[srcChainIndex] == 0x95B5837CF46E6ab340fFf3844ca5e7d8ead5B8AF);
bytes memory txn =
abi.encodeWithSelector(LayerzeroV2Implementation.setDelegate.selector, PROTOCOL_ADMINS[srcChainIndex]);
addToBatch(vars.srcLzImpl, 0, txn);

executeBatch(vars.chainId, PROTOCOL_ADMINS[srcChainIndex], manualNonces[srcChainIndex], true);
}

function _configure(
uint256 env,
uint256 srcChainIndex,
Expand All @@ -75,14 +51,13 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
vars.superRegistryC =
SuperRegistry(_readContractsV1(env, chainNames[srcChainIndex], vars.chainId, "SuperRegistry"));
assert(address(vars.superRegistryC) != address(0));
bytes memory txn;

txn = abi.encodeWithSelector(
vars.superRegistryC.setAddress.selector, rewardsAdminRole, REWARDS_ADMIN, vars.chainId
);
addToBatch(address(vars.superRegistryC), 0, txn);

bytes memory txn;

console.log("Setting config");
UlnConfig memory ulnConfig;

Expand Down
15 changes: 0 additions & 15 deletions script/forge-scripts/misc/Mainnet.Configure.PreBera.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ import { AbstractPreBeraLaunch } from "./Abstract.Configure.PreBeraLaunch.s.sol"
import "forge-std/console.sol";

contract MainnetConfigPreBeraDVN is AbstractPreBeraLaunch {
function setBlastDelegate(uint256 env, uint256 selectedChainIndex, uint256 useNewSalt) external {
_setEnvironment(env, useNewSalt == 1 ? true : false);
_preDeploymentSetup();

uint256 trueIndex;
for (uint256 i = 0; i < chainIds.length; i++) {
if (TARGET_CHAINS[selectedChainIndex] == chainIds[i]) {
trueIndex = i;
break;
}
}

_setBlastDelegate(env, trueIndex, Cycle.Prod, TARGET_CHAINS);
}

function configure(uint256 env, uint256 selectedChainIndex, uint256 useNewSalt) external {
_setEnvironment(env, useNewSalt == 1 ? true : false);
_preDeploymentSetup();
Expand Down

0 comments on commit 569f865

Please sign in to comment.