LogoLogo
  • Introduction to the Muse DAO
  • Developer Vision
  • DAPPS
    • Fast Dapp
      • Tutorials
        • Getting started
          • Make an ERC20 transfer app
      • Components
        • Contract Read
        • Contract Write
        • APICall
        • Events
        • Address Display
        • Block Number
        • Ethereum Balance
        • PleaseConnect (Request user connection)
        • Token Balance (ERC20)
        • WatchEvents
        • AirStack
        • Sweep NFT floor
        • Token amount (ERC20)
        • Token name (ERC20)
        • Uniswap tradebox
        • Moment (display date/time)
      • Variables
        • userAddress
        • ABIs
        • connectedChain
        • Passing arbitrary data in query URL parameters
        • location
        • Toast
      • Templates
        • ERC20 Token transfer
        • Nouns Auction
        • AAVE V3
        • Lido Staking page
        • DAI Saving Rate
        • ERC6551
        • Popular NFT collections buy button
        • Non Fungible Message
        • No Shit Sherlock
      • Style
    • Launch
      • How to Launch a project
      • How to buy from a Launch
      • How to sell into a Launch
      • FAQ
    • NFT20
      • Use Cases
      • Liquidity Incentives
      • Guides
        • Adding a project
          • Create Pool
      • Contracts
        • NFT20Factory
          • Source
        • NFT20Pair
          • Source
      • API
      • Fees
    • ETHCMD
    • RolodETH
    • The Very Nifty Gallery
    • CUDL Game
      • Pets
      • $CUDL
      • MILK
      • Bazaar
      • Battles and weapons
    • Feather NFT
    • Dreams of EVM NFT
    • Sudoswap,js
    • The Quest (Sword & Shield)
    • Royal Game
    • Space Goo
    • NFT API
    • Pepesea NFT Marketplace
  • Tokenomics
    • $MUSE
    • Treasury
  • Other resources
    • Governance
    • Links
Powered by GitBook
On this page
  • Example​
  • Full example​
  1. DAPPS
  2. Fast Dapp
  3. Components

Events

PreviousAPICallNextAddress Display

Last updated 1 year ago

Retrieve events from a smart contract and display them.

Properties:

  • address

  • abi

  • eventName

  • args optional

  • fromBlock optional (default to 0)

  • toBlock optional (default to latest)

For convenience the properties are same as the .

Example

This example display Nouns previous auctions.

<Events
      address={NOUNS_AUCTION}
      abi={NOUNS_AUCTION_ABI}
      eventName="AuctionBid"
      args={{ nounId: res[0].toString() }}
      render={(logs) => (
        <div>
          {logs.reverse().map((log) => (
            <div key={log.transactionHash}>
              <AddressDisplay address={log.args.sender} /> made a bid of{" "}
              <strong>{parseInt(log.args["value"]) / 1e18} ETH</strong> at block{" "}
              {log.blockNumber.toString()}
            </div>
          ))}
        </div>
      )}
    />

Full example

viem/wagmi libraries
​
​
Nouns auction page