Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions scripts/eth-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@ forge soldeer update

forge build
sleep 0.2
out=$(forge script DevDeployScript \
--rpc-url http://localhost:8545 \
--broadcast \
--mnemonics "$MNEMONIC" \
--sender "$SENDER")
result=$?


function deploy {
rpc=$1
cast rpc anvil_reset --rpc-url $rpc
forge script DevDeployScript \
--rpc-url $rpc \
--broadcast \
--mnemonics "$MNEMONIC" \
--sender "$SENDER"
}

# deploy to local anvil
local=$(deploy "http://localhost:8545")
local_result=$?

# deploy to remote stack
stack=$(deploy "https://hello-world.stacks.ethui.dev/FonXHADNhx3vSzQECV6uz4vNxndkdk36c")
stack_result=$?

yarn run wagmi generate

if [ $result -eq 0 ]; then
if [ $result -eq 0 ] && [ $stack_result -eq 0 ]; then
clear
fi

echo "$out" | grep -A 5 "Logs"
echo "Local:\n$local\n\nStack:\n$stack" | grep -A 5 "Logs"
2 changes: 1 addition & 1 deletion soldeer.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ name = "openzeppelin-foundry-upgrades"
version = "0.4.0"
url = "https://soldeer-revisions.s3.amazonaws.com/openzeppelin-foundry-upgrades/0_4_0_27-01-2025_18:32:41_openzeppelin-foundry-upgrades.zip"
checksum = "d38121a53a68c9a3e10032d37c712b28604a673c77b7186332f65c423e53cc45"
integrity = "7453d9ee76f1bbf72424354de766dd2a4af61ec33968b4e0da111e6d734943e2"
integrity = "bf3d412a10be1f30e652dc39a8a707acc133c8b32d847f744e8a5c39404e2780"
22 changes: 21 additions & 1 deletion src/components/ethereum.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getDefaultConfig, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { defineChain } from "viem";
import { anvil, mainnet, sepolia } from "viem/chains";
import { WagmiProvider } from "wagmi";

Expand All @@ -11,10 +12,29 @@ const WALLETCONNECT_PROJECT_ID =
? "eacdee41b7fa8ba5ea1e037b1f9f4366"
: "";

const ethuiStack = defineChain({
...anvil,
name: "local-stacks",
id: 15597603,
rpcUrls: {
default: {
http: [
"https://hello-world.stacks.ethui.dev/FonXHADNhx3vSzQECV6uz4vNxndkdk36c",
],
},
},
blockExplorers: {
default: {
name: "ethui explorer",
url: "https://explorer.ethui.dev/rpc/d3NzOi8vaGVsbG8td29ybGQuc3RhY2tzLmV0aHVpLmRldi9Gb25YSEFETmh4M3ZTelFFQ1Y2dXo0dk54bmRrZGszNmM=",
},
},
});

export const config: ReturnType<typeof getDefaultConfig> = getDefaultConfig({
appName: "ethui demo",
projectId: WALLETCONNECT_PROJECT_ID,
chains: [anvil, mainnet, sepolia],
chains: [anvil, ethuiStack, mainnet, sepolia],
ssr: true,
});

Expand Down
6 changes: 3 additions & 3 deletions src/wagmi.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,7 @@ export const nftAbi = [
*/
export const nftAddress = {
31337: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
31338: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
15597603: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
} as const

/**
Expand Down Expand Up @@ -2615,7 +2615,7 @@ export const testCallsAbi = [
*/
export const testCallsAddress = {
31337: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0',
31338: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0',
15597603: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0',
} as const

/**
Expand Down Expand Up @@ -3919,7 +3919,7 @@ export const tokenAbi = [
*/
export const tokenAddress = {
31337: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512',
31338: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512',
15597603: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512',
} as const

/**
Expand Down
6 changes: 3 additions & 3 deletions wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ const config: ReturnType<typeof defineConfig> = defineConfig({
deployments: {
NFT: {
31337: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
31338: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
15597603: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
},
Token: {
31337: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
31338: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
15597603: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
},
TestCalls: {
31337: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
31338: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
15597603: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
},
},
}),
Expand Down
Loading