Skip to content

Commit

Permalink
remove storage, rfk deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Dec 23, 2024
1 parent 9e640f4 commit 45b119b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 48 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,6 @@ Alternatively, you can see a summarized text-only output as well:
forge coverage --no-match-coverage "(test|mock|script)"
```

### Storage Layout

You can print storage layouts for each contract using:

```sh
./storage.sh
```

The resulting Markdown files will be created under the [`storage`](./storage/) directory.

### Gas Snapshot

You can examine the gas usage metrics using the command:
Expand Down
28 changes: 14 additions & 14 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ contract DeployLLMOracleRegistry is Script {
token = address(0x4200000000000000000000000000000000000006); // WETH
}

function run() external returns (address proxy, address impl) {
function run() public {
vm.startBroadcast();
(proxy, impl) = this.deploy();
(address proxy, address impl) = this.deploy();
vm.stopBroadcast();

helper.writeProxyAddresses("LLMOracleRegistry", proxy, impl);
}

function deploy() external returns (address proxy, address impl) {
function deploy() public returns (address proxy, address impl) {
proxy = Upgrades.deployUUPSProxy(
"LLMOracleRegistry.sol",
abi.encodeCall(
Expand All @@ -49,14 +49,14 @@ contract DeployLLMOracleRegistry is Script {
impl = Upgrades.getImplementationAddress(proxy);
}

function deployUnsafe(address impl) external returns (address proxy) {
proxy = UnsafeUpgrades.deployUUPSProxy(
impl,
abi.encodeCall(
LLMOracleRegistry.initialize, (stakes.generator, stakes.validator, token, minRegistrationTimeSec)
)
);
}
// function deployUnsafe(address impl) external returns (address proxy) {
// proxy = UnsafeUpgrades.deployUUPSProxy(
// impl,
// abi.encodeCall(
// LLMOracleRegistry.initialize, (stakes.generator, stakes.validator, token, minRegistrationTimeSec)
// )
// );
// }
}

contract DeployLLMOracleCoordinator is Script {
Expand All @@ -82,7 +82,7 @@ contract DeployLLMOracleCoordinator is Script {
token = address(0x4200000000000000000000000000000000000006);
}

function run() external returns (address proxy, address impl) {
function run() public {
// read registry address
string memory deployments = helper.getDeploymentsJson();
require(vm.keyExistsJson(deployments, "$.LLMOracleRegistry"), "Please deploy LLMOracleRegistry first");
Expand All @@ -92,13 +92,13 @@ contract DeployLLMOracleCoordinator is Script {
require(registryImlp != address(0), "LLMOracleRegistry implementation address is invalid");

vm.startBroadcast();
(proxy, impl) = this.deploy(registryProxy);
(address proxy, address impl) = this.deploy(registryProxy);
vm.stopBroadcast();

helper.writeProxyAddresses("LLMOracleCoordinator", proxy, impl);
}

function deploy(address registryAddr) external returns (address proxy, address impl) {
function deploy(address registryAddr) public returns (address proxy, address impl) {
proxy = Upgrades.deployUUPSProxy(
"LLMOracleCoordinator.sol",
abi.encodeCall(
Expand Down
22 changes: 0 additions & 22 deletions storage.sh

This file was deleted.

5 changes: 3 additions & 2 deletions test/script/Deploy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ contract DeployTest is Test {

function setUp() external {
deployLLMOracleRegistry = new DeployLLMOracleRegistry();
(llmOracleRegistryProxy, llmOracleRegistryImpl) = deployLLMOracleRegistry.run();
(llmOracleRegistryProxy, llmOracleRegistryImpl) = deployLLMOracleRegistry.deploy();

deployLLMOracleCoordinator = new DeployLLMOracleCoordinator();
(llmOracleCoordinatorProxy, llmOracleCoordinatorImpl) = deployLLMOracleCoordinator.run();
(llmOracleCoordinatorProxy, llmOracleCoordinatorImpl) =
deployLLMOracleCoordinator.deploy(llmOracleRegistryProxy);
}

modifier deployed() {
Expand Down

0 comments on commit 45b119b

Please sign in to comment.