Created
April 18, 2025 20:32
-
-
Save sterlingcrispin/9ffd8b0a7493e3f7425892d0c88f19ea to your computer and use it in GitHub Desktop.
You can use this to edit Zora NFT's and write any data into it you want.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Wallet, JsonRpcProvider, Interface } from "ethers"; | |
const RPC = | |
"https://base-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"; | |
const PK = "PRIVATE_KEY"; // Your wallet address private key | |
const TOKEN = "THE_ADDRESS_OF_THE_TOKEN_YOU_WANT_TO_CHANGE"; | |
const URI = "ipfs://LOCATION_ON_IPFS_OF_NEW_CONTENT"; | |
const iface = new Interface(["function setContractURI(string)"]); | |
const data = iface.encodeFunctionData("setContractURI", [URI]); | |
const provider = new JsonRpcProvider(RPC, 8453); | |
const wallet = new Wallet(PK, provider); | |
(async () => { | |
const tx = await wallet.sendTransaction({ to: TOKEN, data }); | |
console.log("tx sent:", tx.hash); | |
await tx.wait(); | |
console.log("confirmed"); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment