Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
caglacelik committed Dec 16, 2024
1 parent 66b1f33 commit c9444a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ forge clean && forge script ./script/Deploy.s.sol:Deploy<CONTRACT_NAME> --rpc-ur
or for instant verification use:

```sh
forge clean && forge script ./script/Deploy.s.sol:Deploy --rpc-url <RPC_URL> --account <FILE_NAME_OF_YOUR_KEYSTORE> --sender <DEPLOYER_ADDRESS> --broadcast --verify --verifier <etherscan|blockscout|sourcify> --verifier-url <VERIFIER_URL>
forge clean && forge script ./script/Deploy.s.sol:Deploy<CONTRACT_NAME> --rpc-url <RPC_URL> --account <FILE_NAME_OF_YOUR_KEYSTORE> --sender <DEPLOYER_ADDRESS> --broadcast --verify --verifier <etherscan|blockscout|sourcify> --verifier-url <VERIFIER_URL>
```

> [!NOTE]
Expand Down
7 changes: 4 additions & 3 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;

import {Upgrades} from "@openzeppelin/foundry-upgrades/Upgrades.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Script} from "forge-std/Script.sol";
import {Vm} from "forge-std/Vm.sol";
import {HelperConfig} from "./HelperConfig.s.sol";
import {Upgrades} from "@openzeppelin/foundry-upgrades/Upgrades.sol";

import {LLMOracleRegistry} from "@firstbatch/dria-oracle-contracts/LLMOracleRegistry.sol";
import {
LLMOracleCoordinator, LLMOracleTaskParameters
} from "@firstbatch/dria-oracle-contracts/LLMOracleCoordinator.sol";
import {AIAgentFactory} from "../src/AIAgent.sol";
import {ArtifactFactory} from "../src/Artifact.sol";
import {Swan, SwanMarketParameters} from "../src/Swan.sol";
import {Vm} from "forge-std/Vm.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

contract DeployLLMOracleRegistry is Script {
HelperConfig public config;
Expand Down
10 changes: 10 additions & 0 deletions script/HelperConfig.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ contract HelperConfig is Script {
// create dir if it doesn't exist
vm.createDir(dir, true);

// create file if it doesn't exist
if (!vm.isFile(path)) {
vm.writeFile(path, "");
}

// check if the key exists
string memory contractAddresses = vm.readFile(path);

Expand Down Expand Up @@ -247,6 +252,11 @@ contract HelperConfig is Script {
// create dir if it doesn't exist
vm.createDir(dir, true);

// create file if it doesn't exist
if (!vm.isFile(path)) {
vm.writeFile(path, "");
}

// create a new JSON object
string memory newContract =
string.concat('"', name, '": {', ' "proxyAddr": "', proxyAddr, '",', ' "implAddr": "', implAddr, '"', "}");
Expand Down

0 comments on commit c9444a3

Please sign in to comment.