createEventNotifier

Function
Creates an event notifier 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 createEventNotifier<A0, A1, A2, A3, A4, A5, A6, A7, A8>( 
  name: string, 
  arg0Name: string, 
  arg1Name: string, 
  arg2Name: string, 
  arg3Name: string, 
  arg4Name: string, 
  arg5Name: string, 
  arg6Name: string, 
  arg7Name: string, 
  arg8Name: string, 
): (arg0: A0, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => void; 

Parameters

name
string
Event name
arg0Name
string
arg1Name
string
arg2Name
string
arg3Name
string
arg4Name
string
arg5Name
string
arg6Name
string
arg7Name
string
arg8Name
string

Example

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