declareEvent

Function
Declares an event for SmartContract notifications. Must be explicitly typed and contain string literals for the event name and argument names. See the Events and Logs chapter of the main guide for more information.
export function declareEvent<A0, A1, A2, A3, A4, A5>( 
  name: string, 
  arg0Name: string, 
  arg1Name: string, 
  arg2Name: string, 
  arg3Name: string, 
  arg4Name: string, 
  arg5Name: string, 
): void; 

Parameters

name
string
Event name
arg0Name
string
arg1Name
string
arg2Name
string
arg3Name
string
arg4Name
string
arg5Name
string

Example

declareEvent<Address, Address, Fixed<8>>('transfer', 'from', 'to', 'amount'); 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE