Skip to content

Instantly share code, notes, and snippets.

@jelilat
Last active May 7, 2023 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jelilat/d5bb63bf6ae69213a2617a72b448669c to your computer and use it in GitHub Desktop.
Save jelilat/d5bb63bf6ae69213a2617a72b448669c to your computer and use it in GitHub Desktop.
const { ethers } = require('ethers');
require('dotenv').config()
const abi = require('./abi.json')
const contractAddress = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
const signer = new ethers.Wallet(
process.env.PRIVATE_KEY,
ethers.getDefaultProvider('mainnet')
);
const contract = new ethers.Contract(contractAddress, abi, signer);
const from = "0x66fe4806cD41BcD308c9d2f6815AEf6b2e38f9a3"
const to = "0xC41672E349C3F6dAdf8e4031b6D2d3d09De276f9"
const tokenId = 100
const transaction = async () => {
const a = await contract.transferFrom.staticCall(from, to, tokenId)
console.log(a)
}
transaction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment