repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Mirrored from https://github.com/ProjectOpenSea/opensea-skill
stars
latest
clone command
git clone gitlawb://did:key:z6MkqRzA...RfoM/ProjectOpenSea-...git clone gitlawb://did:key:z6MkqRzA.../ProjectOpenSea-...fef93001Release v2.14.012h ago| #1 | #!/usr/bin/env bash |
| #2 | set -euo pipefail |
| #3 | |
| #4 | if [ "$#" -lt 6 ]; then |
| #5 | echo "Usage: opensea-drop-deploy.sh <chain> <contract_name> <contract_symbol> <drop_type> <token_type> <sender>" >&2 |
| #6 | echo "Returns ready-to-sign transaction data for deploying a new drop contract" >&2 |
| #7 | echo "Example: opensea-drop-deploy.sh ethereum 'My NFT Collection' MNFT seadrop_v1_erc721 erc721_standard 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" >&2 |
| #8 | exit 1 |
| #9 | fi |
| #10 | |
| #11 | chain="$1" |
| #12 | name="$2" |
| #13 | symbol="$3" |
| #14 | drop_type="$4" |
| #15 | token_type="$5" |
| #16 | sender="$6" |
| #17 | |
| #18 | # Validate Ethereum address |
| #19 | if [[ ! "$sender" =~ ^0x[0-9a-fA-F]{40}$ ]]; then |
| #20 | echo "opensea-drop-deploy.sh: sender must be a valid Ethereum address" >&2 |
| #21 | exit 1 |
| #22 | fi |
| #23 | |
| #24 | body=$(cat <<EOF |
| #25 | { |
| #26 | "chain": "$chain", |
| #27 | "contract_name": "$name", |
| #28 | "contract_symbol": "$symbol", |
| #29 | "drop_type": "$drop_type", |
| #30 | "token_type": "$token_type", |
| #31 | "sender": "$sender" |
| #32 | } |
| #33 | EOF |
| #34 | ) |
| #35 | |
| #36 | "$(dirname "$0")/../opensea-post.sh" "/api/v2/drops/deploy" "$body" |
| #37 |