Skip to content

Commit

Permalink
Merge pull request #78 from loreum-org/chore/deploy-main
Browse files Browse the repository at this point in the history
Adds broadcast and script updates for mainnet deployment
  • Loading branch information
xhad authored Oct 5, 2024
2 parents 1a12700 + e23a7fb commit 977748d
Show file tree
Hide file tree
Showing 10 changed files with 1,004 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@


# Ignores development broadcast logs
!/broadcast
/broadcast/*

/broadcast/*/31337/

.env
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deploy-anvil :; forge script script/${contract}.s.sol:Deploy${contract} \
deploy :; forge script script/${contract}.s.sol:Deploy${contract} \
--chain-id ${chain} \
--rpc-url ${rpc} \
--private-key ${private} \
--account ${account} \
--broadcast \
--verify

Expand Down
111 changes: 111 additions & 0 deletions broadcast/Loreum.s.sol/1/run-1727780138.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/Loreum.s.sol/1/run-1727780251.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/Loreum.s.sol/1/run-1727780568.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions broadcast/Loreum.s.sol/1/run-1727782849.json

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions broadcast/Loreum.s.sol/1/run-1727793609.json

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions broadcast/Loreum.s.sol/1/run-latest.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions script/LoreumProxy.s.sol → script/Loreum.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ import { Chamber } from "src/Chamber.sol";
import { LoreumBeacon } from "src/proxy/LoreumBeacon.sol";
import { LoreumProxy } from "src/proxy/LoreumProxy.sol";
import { console2 } from "lib/forge-std/src/console2.sol";
import { TransparentUpgradeableProxy } from "src/Common.sol";

contract DeployLoreumProxy is Script {
contract DeployLoreum is Script {

function run() external {

vm.startBroadcast();
Chamber chamberImpl = new Chamber();
LoreumBeacon chamberBeacon = new LoreumBeacon(address(chamberImpl),msg.sender);
vm.stopBroadcast();
address chamberImpl = 0x0634d2d9d60fB527681821bbB224Dd0EaF8b69Fd;
address teamMultiSig = 0x5d45A213B2B6259F0b3c116a8907B56AB5E22095;

LoreumBeacon chamberBeacon = new LoreumBeacon(chamberImpl, teamMultiSig);

console2.log("Chamber Implementation address: ", address(chamberImpl));
console2.log("Chamber LoreumBeacon address: ", address(chamberBeacon));

vm.startBroadcast();
Registry registryImpl = new Registry();
LoreumBeacon registryBeacon = new LoreumBeacon(address(registryImpl),msg.sender);
bytes memory data = abi.encodeWithSelector(Registry.initialize.selector, address(chamberBeacon), msg.sender);
LoreumProxy registry = new LoreumProxy(address(registryBeacon), data, msg.sender);
address registryImpl = 0xc2CBefB9593eA19d636C04b2B91fc78369eB3C26;

bytes memory data = abi.encodeWithSelector(Registry.initialize.selector, address(chamberBeacon), teamMultiSig);
TransparentUpgradeableProxy registry = new TransparentUpgradeableProxy(registryImpl, teamMultiSig, data);
vm.stopBroadcast();

console2.log("Registry Implementation address: ", address(registryImpl));
console2.log("Registry Beacon address: ", address(registryBeacon));
console2.log("Registry Proxy address: ", address(registry));
}
}
1 change: 1 addition & 0 deletions src/Common.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { IERC721 } from "lib/openzeppelin-contracts/contracts/interfaces/IERC721
import { Initializable } from "lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol";
import { ReentrancyGuard } from "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import { SafeERC20 } from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import { TransparentUpgradeableProxy } from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

abstract contract Common is Initializable, ReentrancyGuard, Context, ERC721Holder, ERC1155Holder, GuardManager {
using ECDSA for bytes32;
Expand Down

0 comments on commit 977748d

Please sign in to comment.