Skip to content

Commit 25a8c19

Browse files
committed
add veda deployment script
1 parent 0f8ee51 commit 25a8c19

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

script/DeployVedaAdapter.s.sol

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// SPDX-License-Identifier: MIT AND Apache-2.0
2+
pragma solidity 0.8.23;
3+
4+
import "forge-std/Script.sol";
5+
import { console2 } from "forge-std/console2.sol";
6+
7+
import { VedaAdapter } from "../src/helpers/VedaAdapter.sol";
8+
9+
/**
10+
* @title DeployVedaAdapter
11+
* @notice Deploys the VedaAdapter contract.
12+
* @dev Update the hardcoded addresses below before deploying.
13+
* @dev Fill the SALT variable in the .env file
14+
* @dev run the script with:
15+
* forge script script/DeployVedaAdapter.s.sol --rpc-url <your_rpc_url> --private-key $PRIVATE_KEY --broadcast
16+
*/
17+
contract DeployVedaAdapter is Script {
18+
// Hardcoded constructor parameters - update these before deploying
19+
address constant OWNER = address(0x0000000000000000000000000000000000000000);
20+
address constant DELEGATION_MANAGER = address(0x0000000000000000000000000000000000000000);
21+
address constant BORING_VAULT = address(0x0000000000000000000000000000000000000000);
22+
address constant VEDA_TELLER = address(0x0000000000000000000000000000000000000000);
23+
24+
bytes32 salt;
25+
address deployer;
26+
27+
function setUp() public {
28+
salt = bytes32(abi.encodePacked(vm.envString("SALT")));
29+
deployer = msg.sender;
30+
console2.log("~~~");
31+
console2.log("Owner: %s", OWNER);
32+
console2.log("DelegationManager: %s", DELEGATION_MANAGER);
33+
console2.log("BoringVault: %s", BORING_VAULT);
34+
console2.log("VedaTeller: %s", VEDA_TELLER);
35+
console2.log("Deployer: %s", deployer);
36+
console2.log("Salt:");
37+
console2.logBytes32(salt);
38+
}
39+
40+
function run() public {
41+
console2.log("~~~");
42+
vm.startBroadcast();
43+
44+
address vedaAdapter = address(new VedaAdapter{ salt: salt }(OWNER, DELEGATION_MANAGER, BORING_VAULT, VEDA_TELLER));
45+
console2.log("VedaAdapter: %s", vedaAdapter);
46+
47+
vm.stopBroadcast();
48+
}
49+
}

0 commit comments

Comments
 (0)