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

Sei Mainnet deployment and custom createx #7

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: accidental code paste in roles authority
CarsonCase committed Aug 9, 2024
commit af4f50819f26afafd9cc566d39da9db215a8b6bc
8 changes: 3 additions & 5 deletions script/DeployCustomCreatex.s.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity =0.8.23;

import {console} from "forge-std/console.sol";
import { console } from "forge-std/console.sol";
import { CreateX } from "lib/createx/src/CreateX.sol";
import { Script, stdJson } from "@forge-std/Script.sol";

contract DeployCustomCreateX is Script{
contract DeployCustomCreateX is Script {
address broadcaster;
string internal mnemonic;
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk";
@@ -21,7 +21,6 @@ contract DeployCustomCreateX is Script{
mnemonic = vm.envOr({ name: "MNEMONIC", defaultValue: TEST_MNEMONIC });
(broadcaster,) = deriveRememberKey({ mnemonic: mnemonic, index: 0 });
}

}

modifier broadcast() {
@@ -30,11 +29,10 @@ contract DeployCustomCreateX is Script{
vm.stopBroadcast();
}


function run() public broadcast {
require(EXPECTED.code.length == 0, "Createx already exists on this chain");

CreateX createx = new CreateX{salt:SALT}();
CreateX createx = new CreateX{ salt: SALT }();

console.log(address(createx));
require(address(createx) == EXPECTED, "address is not expected");
2 changes: 0 additions & 2 deletions script/deploy/deployAll.s.sol
Original file line number Diff line number Diff line change
@@ -57,7 +57,6 @@ contract DeployAll is BaseScript {
}

function deploy(ConfigReader.Config memory config) public override returns (address) {

address boringVault = new DeployIonBoringVaultScript().deploy(config);
config.boringVault = boringVault;
console.log("Boring Vault: ", boringVault);
@@ -84,7 +83,6 @@ contract DeployAll is BaseScript {

new SetAuthorityAndTransferOwnerships().deploy(config);
console.log("Set Authority And Transfer Ownerships Complete");

}

function _deployTeller(ConfigReader.Config memory config) public returns (address teller) {
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ contract DeployAccountantWithRateProviders is BaseScript {
require(config.payoutAddress != address(0), "payout address must not be zero");
require(config.base != address(0), "base address must not be zero");
require(config.allowedExchangeRateChangeUpper > 1e4, "allowedExchangeRateChangeUpper");
require(config.allowedExchangeRateChangeUpper <= 1.0030e4, "allowedExchangeRateChangeUpper upper bound");
require(config.allowedExchangeRateChangeUpper <= 1.003e4, "allowedExchangeRateChangeUpper upper bound");
require(config.allowedExchangeRateChangeLower < 1e4, "allowedExchangeRateChangeLower");
require(config.allowedExchangeRateChangeLower >= 0.9970e4, "allowedExchangeRateChangeLower lower bound");
require(config.allowedExchangeRateChangeLower >= 0.997e4, "allowedExchangeRateChangeLower lower bound");
require(config.minimumUpdateDelayInSeconds >= 3600, "minimumUpdateDelayInSeconds");
require(config.managementFee < 1e4, "managementFee");
require(startingExchangeRate == 1e18, "starting exchange rate must be 1e18");
5 changes: 2 additions & 3 deletions script/deploy/single/06_DeployRolesAuthority.s.sol
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ contract DeployRolesAuthority is BaseScript {
// 3. TELLER_ROLE
// - boringVault.enter()
// - boringVault.exit()
// - assigned to TELLERaddress(0) // `Authority`
// - assigned to TELLER
// --- Public ---
// 1. teller.deposit
rolesAuthority.setRoleCapability(
@@ -115,8 +115,7 @@ contract DeployRolesAuthority is BaseScript {
require(
rolesAuthority.doesUserHaveRole(config.strategist, STRATEGIST_ROLE),
"strategist should have STRATEGIST_ROLE"
); IAuthority(config.rolesAuthority).transferOwnership(config.protocolAdmin);

);
require(rolesAuthority.doesUserHaveRole(config.manager, MANAGER_ROLE), "manager should have MANAGER_ROLE");
require(rolesAuthority.doesUserHaveRole(config.teller, TELLER_ROLE), "teller should have TELLER_ROLE");
require(

Unchanged files with check annotations Beta

"node_modules/require-from-string": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",

Check failure on line 2936 in package-lock.json

GitHub Actions / codespell (ubuntu-latest)

vEw ==> view, vow, vex
"engines": {
"node": ">=0.10.0"
}