Last active
May 7, 2023 11:30
-
-
Save jelilat/d5bb63bf6ae69213a2617a72b448669c to your computer and use it in GitHub Desktop.
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
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