Skip to content

JackalBridge: Optimize Relayer Check to Reduce Gas Cost #37

@fintechup

Description

@fintechup

Description:
Currently, every message settlement verifies whether msg.sender is the owner or a relayer by looping through the relays array. This increases gas costs, especially when there are many relayers.

To optimize this, introduce a mapping(address => bool) isRelayer and use it for checks instead. This will eliminate the need for iteration and reduce gas consumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions