Skip to content
Open
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
3 changes: 3 additions & 0 deletions .env.testnet.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
RPC_URL=
CHAIN_ID=

# Optional explorer source verification. GIWA Sepolia uses Blockscout.
BLOCKSCOUT_API_URL=https://sepolia-explorer.giwa.io/api

# Foundry sender address. Import its key with:
# cast wallet import corner-store-testnet --interactive
CORNER_STORE_TESTNET_DEPLOYER=
Expand Down
19 changes: 17 additions & 2 deletions docs/testnet-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,23 @@ scripts/deploy-testnet-rfq.sh \
--verify
```

Custom explorers may require a verifier URL or Sourcify instead. Use the
network's official instructions; never commit explorer credentials.
GIWA Sepolia uses Blockscout and requires its official verifier endpoint:

```sh
export BLOCKSCOUT_API_URL=https://sepolia-explorer.giwa.io/api

scripts/deploy-testnet-rfq.sh \
--rpc-url "$RPC_URL" \
--chain-id "$CHAIN_ID" \
--account corner-store-giwa \
--broadcast \
--verify \
--verifier blockscout \
--verifier-url "$BLOCKSCOUT_API_URL"
```

Other custom explorers may require a different verifier URL or Sourcify. Use
the network's official instructions; never commit explorer credentials.

## Deployment Outputs for a Hackathon Submission

Expand Down
10 changes: 8 additions & 2 deletions howtodeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ ls -la .env.testnet.example scripts/deploy-testnet-rfq.sh
```dotenv
RPC_URL=https://sepolia-rpc.giwa.io
CHAIN_ID=91342
BLOCKSCOUT_API_URL=https://sepolia-explorer.giwa.io/api

# cast wallet address --account corner-store-giwa 결과
CORNER_STORE_TESTNET_DEPLOYER=0x...
Expand Down Expand Up @@ -259,10 +260,15 @@ scripts/deploy-testnet-rfq.sh \
--rpc-url "$RPC_URL" \
--chain-id "$CHAIN_ID" \
--account corner-store-giwa \
--broadcast
--broadcast \
--verify \
--verifier blockscout \
--verifier-url "$BLOCKSCOUT_API_URL"
```

Foundry가 keystore 비밀번호를 요청하면 3번 단계에서 설정한 비밀번호를 입력한다.
GIWA 공식 Foundry 가이드의 Blockscout API endpoint를 사용해 배포와 source
verification을 함께 수행한다. Foundry가 keystore 비밀번호를 요청하면 3번
단계에서 설정한 비밀번호를 입력한다.
스크립트는 다음을 자동으로 수행한다.

1. GIWA Chain ID 재확인
Expand Down
12 changes: 11 additions & 1 deletion scripts/deploy-testnet-rfq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PASSWORD_FILE=""
USE_LEDGER=0
BROADCAST=0
VERIFY=0
VERIFIER=""
VERIFIER_URL=""
ARTIFACT="${CORNER_STORE_ARTIFACT:-}"
FINAL_ARTIFACT=""

Expand All @@ -20,7 +22,7 @@ usage() {
Usage:
scripts/deploy-testnet-rfq.sh --rpc-url URL --chain-id ID \
(--account NAME | --keystore FILE [--password-file FILE] | --ledger) \
[--broadcast] [--verify]
[--broadcast] [--verify [--verifier NAME] [--verifier-url URL]]

Required environment:
CORNER_STORE_TESTNET_DEPLOYER
Expand Down Expand Up @@ -59,6 +61,8 @@ while [[ $# -gt 0 ]]; do
--ledger) USE_LEDGER=1; shift ;;
--broadcast) BROADCAST=1; shift ;;
--verify) VERIFY=1; shift ;;
--verifier) require_value "$1" "${2-}"; VERIFIER="$2"; shift 2 ;;
--verifier-url) require_value "$1" "${2-}"; VERIFIER_URL="$2"; shift 2 ;;
-h|--help) usage; exit 0 ;;
*) echo "ERROR: unknown argument: $1" >&2; usage >&2; exit 2 ;;
esac
Expand All @@ -78,6 +82,10 @@ if [[ -n "$PASSWORD_FILE" && -z "$KEYSTORE" ]]; then
echo "ERROR: --password-file requires --keystore" >&2
exit 2
fi
if [[ ( -n "$VERIFIER" || -n "$VERIFIER_URL" ) && "$VERIFY" -ne 1 ]]; then
echo "ERROR: --verifier and --verifier-url require --verify" >&2
exit 2
fi

for name in \
CORNER_STORE_TESTNET_DEPLOYER \
Expand Down Expand Up @@ -144,6 +152,8 @@ else
fi
if [[ "$VERIFY" -eq 1 ]]; then
MUTATION_ARGS+=(--verify)
[[ -n "$VERIFIER" ]] && MUTATION_ARGS+=(--verifier "$VERIFIER")
[[ -n "$VERIFIER_URL" ]] && MUTATION_ARGS+=(--verifier-url "$VERIFIER_URL")
fi

forge script script/DeployTestnetRFQ.s.sol:DeployTestnetRFQ \
Expand Down
Loading