Skip to content

Commit 70dd13d

Browse files
Merge pull request #16 from KanishkSogani/ui-update
Revamp Core TNT Pages UI
2 parents c547dc9 + 8000c25 commit 70dd13d

File tree

20 files changed

+1646
-700
lines changed

20 files changed

+1646
-700
lines changed

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
[submodule "contracts/lib/openzeppelin-contracts"]
55
path = contracts/lib/openzeppelin-contracts
66
url = https://github.com/OpenZeppelin/openzeppelin-contracts
7+

contracts/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Makefile for deploying TNT contracts
2+
3+
# Load environment variables from .env file
4+
include .env
5+
export
6+
7+
# Deploy to Scroll Sepolia
8+
deploy-scroll:
9+
@echo "Deploying Factory contract to Scroll Sepolia..."
10+
forge script script/DeployFactory.s.sol:DeployFactory --rpc-url scrollSepolia --private-key ${PRIVATE_KEY} --broadcast
11+
12+
# Install dependencies
13+
install:
14+
forge install foundry-rs/forge-std --no-commit
15+
forge install OpenZeppelin/openzeppelin-contracts@v5.0.1 --no-commit

contracts/broadcast/DeployFactory.s.sol/534351/run-1750754613.json

Lines changed: 47 additions & 0 deletions
Large diffs are not rendered by default.

contracts/broadcast/DeployFactory.s.sol/534351/run-latest.json

Lines changed: 47 additions & 0 deletions
Large diffs are not rendered by default.

contracts/foundry.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@ src = "src"
33
out = "out"
44
libs = ["lib"]
55
solc_version = "0.8.20"
6+
optimizer = true
7+
optimizer_runs = 200
8+
9+
[rpc_endpoints]
10+
scrollSepolia = "https://sepolia-rpc.scroll.io/"
11+
12+
# Etherscan verification settings are commented out to make them optional
13+
# Uncomment when you want to verify contracts
14+
# [etherscan]
15+
# scrollSepolia = { key = "${SCROLLSCAN_API_KEY}", url = "https://api-sepolia.scrollscan.com/api" }
616

717
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

contracts/lib/forge-std

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 77041d2ce690e692d6e03cc812b57d1ddaa4d505
Submodule openzeppelin-contracts added at e4f7021

contracts/remappings.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
2+
erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
3+
forge-std/=lib/forge-std/src/
4+
halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/
5+
openzeppelin-contracts/=lib/openzeppelin-contracts/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: AEL
2+
pragma solidity ^0.8.20;
3+
4+
import "forge-std/Script.sol";
5+
import "../src/Factory.sol";
6+
7+
contract DeployFactory is Script {
8+
function run() external {
9+
// Start broadcasting transactions
10+
vm.startBroadcast();
11+
12+
// Deploy the Factory contract
13+
Factory factory = new Factory();
14+
15+
// Log the address
16+
console.log("Factory deployed at:", address(factory));
17+
18+
// Stop broadcasting
19+
vm.stopBroadcast();
20+
21+
// Print deployment information for easy updating in the frontend
22+
console.log("Update your addresses.ts file with this new contract address:");
23+
console.log("");
24+
console.log("export const TNTVaultFactories = {");
25+
console.log(" 534351: \"", address(factory), "\",");
26+
console.log(" 61: \"0x3936A2281A4585E7Bee5710839D0F29fBAF3Fc77\",");
27+
console.log("} as {");
28+
console.log(" [key: number]: `0x${string}`;");
29+
console.log("};");
30+
}
31+
}

web/src/app/[tnt]/InteractionClient.tsx

Lines changed: 273 additions & 83 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)