Skip to content

Instantly share code, notes, and snippets.

@airled
Created April 11, 2024 12:55
Show Gist options
  • Save airled/e37404e969751a74dcf06a70ea845614 to your computer and use it in GitHub Desktop.
Save airled/e37404e969751a74dcf06a70ea845614 to your computer and use it in GitHub Desktop.
ETH contract call
const { ethers } = require("ethers");
const rpcUrl = ''
const contractAddress = ''
const abi = []
async function main() {
const provider = new ethers.JsonRpcProvider(rpcUrl);
const signer = new ethers.Wallet("", provider)
const contract = new ethers.Contract(contractAddress, abi, signer);
contract.mint().then(console.log)
// contract.tokenURI(0).then(console.log)
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment