import { getContractInterface } from '../../../src/contract-defs'
export const encodeXDomainCalldata = (
target: string,
sender: string,
message: string,
messageNonce: number
): string => {
return getContractInterface(
'OVM_L2CrossDomainMessenger'
).encodeFunctionData('relayMessage', [target, sender, message, messageNonce])
}
-
Elena Gesheva authored
* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger Fix typo * Remove sentMessages mapping from L1CrossDomainMessenger storage and use the nonce to check for existence of replayed transaction * Refactor out common library function for getting cross domain calldata * Post rebase fixes * Use the queueIndex to check the transaction was enqueued * Fix tests for L1CrossDomainMessenger.replayMessage Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock * Lint fixes * Optimise the resolve calls into the AddressManager lib * Rename the nonce parameter to be clear * Update test name Co-authored-by:
ben-chain <ben@pseudonym.party> * Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils Co-authored-by:
ben-chain <ben@pseudonym.party>
200a083e