I am working on building a simple Twitter bot to tweet out sales that occur on an NFT's Smart Contract (https://etherscan.io/address/0xbd3531da5cf5857e7cfaa92426877b022e612cf8) by listening to the Transfer event and tweeting out the information from the event subscription.

After following a tutorial in the Ethers.js docs (https://docs.ethers.io/v5/single-page/#/v5/api/contract/example/-%23-example-erc-20-contract--connecting-to-a-contract), it looks like I am able to see Transfer events output, but I am not sure how to get the actual Ethereum value (price) from the transaction. It looks like the parameters are to, from, and the mint number of the NFT collection.

I will post the event listened code, as well as the response. Please let me know if anyone knows what I am missing, thanks!

Event Listener

const abi = await getContractAbi();
const provider = new ethers.providers.WebSocketProvider(WSS_PROVIDER);
const contract = new ethers.Contract(CONTRACT_ADDRESS, abi, provider);

contract.on("Transfer", (from, to, amount, value, event) => {


  "blockNumber": 13553616,
  "blockHash": "0xa49016edacc2cdde0f49510fec7af16be42fd7d72f688b0a83f9afcb6d6dae39",
  "transactionIndex": 214,
  "removed": false,
  "address": "0xBd3531dA5CF5857e7CfAA92426877b022e612cf8",
  "data": "0x",
  "topics": [
  "transactionHash": "0x49a1b9af049ff10cc8e61ad49499c3615b1455a33c9cda6cc0390142d0058281",
  "logIndex": 483,
  "event": "Transfer",
  "eventSignature": "Transfer(address,address,uint256)",
  "args": [
    { "type": "BigNumber", "hex": "0x018d" }

1 Answer 1


Rather listen for the ordersMatched event, which include a price param (see the 3d log event: https://etherscan.io/tx/0x49a1b9af049ff10cc8e61ad49499c3615b1455a33c9cda6cc0390142d0058281#eventlog or the actual event in wyvernEngine : https://etherscan.io/address/0x7be8076f4ea4a4ad08075c2508e481d6c946d12b#code line450).

  • It looks like I can't listen to that event? I get an error whenever I try, and when I output the contract, it looks like the only events are listed below: events: { 'Approval(address,address,uint256)': [EventFragment], 'ApprovalForAll(address,address,bool)': [EventFragment], 'CreatePenguin(uint256)': [EventFragment], 'OwnershipTransferred(address,address)': [EventFragment], 'Paused(address)': [EventFragment], 'Transfer(address,address,uint256)': [EventFragment], 'Unpaused(address)': [EventFragment] }, Nov 12, 2021 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.