Skip to content

Commit

Permalink
Merge branch 'feature/setup-deploy' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Aug 12, 2024
2 parents d81b1c7 + e6abe6d commit caf8eac
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ charset = utf-8
indent_style = space
indent_size = 2

[*.toml]
charset = utf-8
indent_style = space
indent_size = 2

[*.{js,ts}]
charset = utf-8
indent_style = space
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ out/
# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/*/11155111/
/broadcast/**/dry-run/

# Docs
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
20 changes: 18 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
[profile.default]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]
src = "src"
out = "out"
libs = ["lib", "node_modules"]
gas_reports = ["*"]
solc_version = "0.8.26"
remappings = [
"ds-test/=lib/forge-std/lib/ds-test/src/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
"@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",
"@openzeppelin/foundry-upgrades/=node_modules/@openzeppelin/foundry-upgrades/src/",
"forge-std/=node_modules/forge-std/src/",
"ds-test/=node_modules/ds-test/src/",
"solidity-stringutils/=node_modules/solidity-stringutils/",
]

[fmt]
line_length = 80
tab_width = 2
bracket_spacing = true

[rpc_endpoints]
mainnet = "${MAINNET_RPC_URL}"
sepolia = "${SEPOLIA_RPC_URL}"

[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}" }
sepolia = { key = "${ETHERSCAN_API_KEY}" }
1 change: 0 additions & 1 deletion lib/forge-std
Submodule forge-std deleted from bf6606
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@
"dependencies": {
"@openzeppelin/contracts": "5.0.2",
"@openzeppelin/contracts-upgradeable": "5.0.2",
"@openzeppelin/hardhat-upgrades": "3.2.1"
"@openzeppelin/foundry-upgrades": "github:OpenZeppelin/openzeppelin-foundry-upgrades",
"@openzeppelin/hardhat-upgrades": "3.2.1",
"@openzeppelin/upgrades-core": "1.35.0",
"ds-test": "github:dapphub/ds-test",
"forge-std": "github:foundry-rs/forge-std",
"solidity-stringutils": "github:Arachnid/solidity-stringutils"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "2.0.7",
Expand Down
71 changes: 52 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ds-test/=lib/forge-std/lib/ds-test/src/
@openzeppelin/=node_modules/@openzeppelin/
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/
@openzeppelin/foundry-upgrades/=node_modules/@openzeppelin/foundry-upgrades/src/
forge-std/=node_modules/forge-std/src/
ds-test/=node_modules/ds-test/src/
solidity-stringutils/=node_modules/solidity-stringutils/
eth-gas-reporter/=node_modules/eth-gas-reporter/
forge-std/=lib/forge-std/src/
hardhat/=node_modules/hardhat/
27 changes: 27 additions & 0 deletions script/LilNounsVault.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.26;

import { Script, console } from "forge-std/Script.sol";
import { LilNounsVault } from "../src/LilNounsVault.sol";
import { Upgrades } from "@openzeppelin/foundry-upgrades/Upgrades.sol";

contract LilNounsVaultScript is Script {
function setUp() public {}

function run() public {
// Start the broadcast, which allows writing transactions to the blockchain
vm.startBroadcast();

// Deploy the proxy using the Upgrades library
address proxy = Upgrades.deployUUPSProxy(
"LilNounsVault.sol",
abi.encodeCall(LilNounsVault.initialize, ())
);

// Stop the broadcast, ending the transaction
vm.stopBroadcast();

// Log the proxy address for reference
console.log("LilNounsVault Proxy deployed at:", proxy);
}
}

0 comments on commit caf8eac

Please sign in to comment.