Skip to content

Commit

Permalink
Add method for getting TypeSchema for contract events from
Browse files Browse the repository at this point in the history
`ModuleSchema`
  • Loading branch information
soerenbf committed Sep 12, 2024
1 parent 81863e2 commit 2e1e995
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Concordium/Domain/Contract.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public extension ModuleSchema {
try getReceiveErrorSchema(schema: self, contractName: receiveName.contractName.value, functionName: receiveName.entrypointName.value)
}

/// Gets schema for events emitted by the contract
func eventSchema(contractName: ContractName) throws -> TypeSchema {
try getEventSchema(schema: self, contractName: contractName.value)
}

/// The base64 representation of the schema
var base64: String {
value.base64EncodedString()
Expand Down

0 comments on commit 2e1e995

Please sign in to comment.