Skip to main content
Version: Endpoint V1

Fix a StoredPayload

Manually fix a StoredPayload by sending a transaction on the destination chain.

A StoredPayload contains the data for a message that ran out of gas (most likely) In order to deliver this message, once its stored, you must call a transaction on the Endpoint.sol called retryPayload

Youll need 3 things:

  • source Chain ID of the chain the message was sent from
  • source UserApplication address
  • UA payload

If we refer back to here, we know how to get these 3 items. Or use a block explorer and find the destination trasaction, and look in the Logs tab.

alt text The Logs tab of most block explorers shows the StoredPayload event values. You will need the srcChainId, srcAddress, and payload

Now we simply need an instance of the Endpoint contract on the destination chain. And to call the transaction, to "unstick" the StoredPayload. Heres a code snippet:

// some ethers.js code to show how to deliver a StoredPayload
let endpoint = await ethers.getContract('Endpoint');

let srcChainId = 9;
// trustedRemote is the remote + local format
let trustedRemote = hre.ethers.utils.solidityPack(
['address', 'address'],
[remoteContract.address, localContract.address],
);
let payload = '0x000000...0000000000'; // copy and paste entire payload here
let tx = await endpoint.retryPayload(srcChainId, trustedRemote, payload);

Thats it! If your transaction succeeds, the StoredPayload should be cleared and messages will resume if you send another message across the pathway.

  • If you get an error about invalid payload, you may have copied it wrong.
  • Be sure to prefix the srcAddress and the payload with 0x so that ethers.js is happy.