Skip to content

Reuse Eip712Doman during multichain action estimation #965

@mattsse

Description

@mattsse

this loop is quite heavy:

for _ in 0..3 {

we do

relay/src/rpc/relay.rs

Lines 1331 to 1335 in 77959c6

// Compute EIP-712 digest (settlement_id)
let (output_intent_digest, _) = output_quote
.intent
.compute_eip712_data(
output_quote.orchestrator,

per iteration which always needs to recompute the domain:

let domain = orchestrator.eip712_domain(self.is_multichain()).await?;

the domain should be the same because this is multichain

maybe we could either cache this with some timeout or at least reduce this call to once per request

pub async fn eip712_domain(&self, multichain: bool) -> TransportResult<Eip712Domain> {
let domain = self
.orchestrator
.eip712Domain()

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions