Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • Guides
MoveVM
  • Overview
  • Getting Started
    • Install Supra CLI with Docker
    • Create a Supra Account
    • Create a Move Package
      • Initialize a Package
      • Write a Module
      • Compile and Publish
      • Interact with a Package
    • Create a dApp with StarKey
  • Network Information
  • Token Standards
  • Learn Move 101
    • Getting Started with Move
    • Unsigned Integers in Move
    • Math Operations in Move
    • Using Vectors in Move
    • Reading Resource Data with borrow_global
    • Passing Data in Move: Value vs. Reference
    • Adding Elements with vector::push_back
    • Emitting Events with event::emit
  • Move Book
    • Getting Started
      • Modules and Scripts
      • Move Tutorial
    • Primitive Types
      • Integers
      • Bool
      • Address
      • Vector
      • Signer
      • References
      • Tuples and Unit
    • Basic Concepts
      • Local Variables and Scope
      • Equality
      • Abort and Assert
      • Conditionals
      • While, For, and Loop
      • Functions
      • Structs and Resources
      • Constants
      • Generics
      • Type Abilities
      • Uses and Aliases
      • Friends
      • Packages
      • Package Upgrades
      • Unit Tests
    • Global Storage
      • Structure
      • Operators
    • Reference
      • Standard Library
      • Coding Conventions
  • TypeScript SDK
    • Guides
      • Create Supra Accounts
      • Publish a Package
    • Documentation
    • Repository
  • Rest API
    • Mainnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Consensus
      • Events
      • Tables
    • Testnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Events
      • Tables
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Links
    • Supra DevHub
    • SupraScan Block Explorer
    • StarKey Wallet
    • Live Data Feeds
    • Whitepapers
    • Security Audits
    • Supra's Official GitHub
Powered by GitBook
On this page
  1. Rest API
  2. Testnet

Events

PreviousViewNextTables

Events Api

Get events by type v1

get

Get events by type.

Path parameters
event_typestringRequired

Canonical string representation of event type. E.g. 0000000000000000000000000000000a::module_name::type_name

Query parameters
startinteger · u-int64Required

Starting block height (inclusive).

endinteger · u-int64Required

Ending block height (exclusive). The max range is 10 blocks, a.k.a. end - start <= 10.

Responses
200
List of Events contained in blocks
application/json
get
GET /rpc/v1/events/{event_type} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of Events contained in blocks

{
  "data": [
    {
      "guid": "text",
      "sequence_number": 1,
      "type": "text",
      "data": null
    }
  ]
}

Get events by type v3

get

Get events by type.

Path parameters
event_typestringRequired

The fully qualified name of the event struct, i.e.: contract_address::module_name::event_struct_name. E.g. 0x1::coin::CoinDeposit

Query parameters
start_heightinteger · u-int64Optional

Starting block height (inclusive). Optional.

end_heightinteger · u-int64Optional

Ending block height (exclusive). Optional.

limitintegerOptional

Maximum number of events to return. Defaults to 20, max 100.

startstringOptional

The cursor to start the query from. Optional.

During a paginated query, the cursor returned in the X_SUPRA_CURSOR response header should be specified as the start parameter of the request for the next page.

Responses
200
List of Events contained in blocks
application/json
get
GET /rpc/v3/events/{event_type} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of Events contained in blocks

{
  "data": [
    {
      "event": {
        "guid": "text",
        "sequence_number": 1,
        "type": "text",
        "data": null
      },
      "block_height": 1,
      "transaction_hash": "text"
    }
  ]
}
  • GETGet events by type v1
  • GETGet events by type v3