lisk-sdk icon indicating copy to clipboard operation
lisk-sdk copied to clipboard

Update `createTerminatedOutboxAccount` of BaseInteroperabilityStore

Open ishantiw opened this issue 2 years ago • 0 comments

Description

The createTerminatedOutboxAccount function creates an entry in the terminated outbox substore.

def createTerminatedOutboxAccount(
    chainID: ChainID,
    outboxRoot: MerkleRoot,
    outboxSize: uint64,
    partnerChainInboxSize: uint64,
) -> None:
    terminatedOutbox = {
        "outboxRoot": outboxRoot,
        "outboxSize": outboxSize,
        "partnerChainInboxSize": partnerChainInboxSize,
    }
    create an entry in the terminated outbox substore with
        storeKey = chainID
        storeValue = encode(terminatedOutboxAccountSchema, terminatedOutbox)

    emitEvent(
        module = MODULE_NAME_INTEROPERABILITY,
        name = EVENT_NAME_TERMINATED_OUTBOX_CREATED,
        data = terminatedOutbox,
        topics = [chainID]
    )

Acceptance Criteria

  • Should pass its unit test

Additional Information

  • Related https://github.com/LiskHQ/lips/pull/148

ishantiw avatar Sep 22 '22 22:09 ishantiw