Nezha
  • 🏠Introduction to Nezha
  • How nezha works
    • Stake to Win
    • Nezha Epochs
    • Yield Farmer
  • Tickets
    • Stake per Ticket
    • Tickets
    • Bonus Tickets
    • Ticket Generation
  • The Draw
    • The Draw
    • Winning Sequence
    • No Draw Scenario
  • Prizes
    • Prize Tiers
    • Prizes
  • Fees
    • Staking
    • Unstaking
    • Claiming Prizes
  • Risks & Mitigations
    • Smart Contracts
    • Low Yield Returns
    • Negative Yield Returns
    • Tickets Outside Solana
    • Insurance Costs
  • Architecture
    • Overview
    • Game Contract
      • Epoch States
      • Token Accounts
      • State Accounts
      • Initialisation Instructions
      • State Transition Instructions
      • Other Instructions
      • Roles & Capabilities
      • Derived Account Roles
    • Draw Contract
      • State Accounts
      • Instructions
      • Roles & Capabilities
      • Derived Accounts
Powered by GitBook
On this page
  • [SuperAdmin, Admin] Init
  • [Admin] RequestVRF
  • ConsumeVRF
  • [Admin] RotateKey { key_type, value }
  1. Architecture
  2. Draw Contract

Instructions

[Role] Instruction

[SuperAdmin, Admin] Init

Initialises the VRF account in Switchboard

Note, both roles are required to sign the instruction because Admin holds the account funds to pay for invoking Switchboard.

[Admin] RequestVRF

Calls Switchboard and registers a callback.

ConsumeVRF

Consumes the response from Switchboard. Note, the VRF address is hardcoded so it can only be read from the agreed account.

[Admin] RotateKey { key_type, value }

  • Change the authorized key of any of SuperAdmin, Admin.

  • This is updated as NezhaVRFProgramState.pubkeys.<key_type> = value

PreviousState AccountsNextRoles & Capabilities

Last updated 1 year ago