Skip to content

Commit

Permalink
feat: EthRelayer execution fixes (#937)
Browse files Browse the repository at this point in the history
* fix: show message if max. end has not been reached

EthRelayer requires proposal max end to be reached.
https://github.com/snapshot-labs/sx-starknet/blob/af131eb27748671dae5700f6c13c08d622e58383/starknet/src/execution_strategies/eth_relayer.cairo#L35-L41

* fix: always format l1destination address
  • Loading branch information
Sekhmet authored Oct 28, 2024
1 parent b935c00 commit a161715
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ export async function handleExecutionStrategy(
const [l1Destination] = payload;
if (!l1Destination)
throw new Error('Invalid payload for EthRelayer execution strategy');
destinationAddress = l1Destination;
destinationAddress = formatAddress('Ethereum', l1Destination);

const SimpleQuorumExecutionStrategyContract = new EthContract(
l1Destination,
destinationAddress,
SimpleQuorumExecutionStrategyAbi,
ethProvider
);
Expand Down
5 changes: 5 additions & 0 deletions apps/ui/src/composables/useExecutionActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ export function useExecutionActions(
});

async function fetchEthRelayerExecutionDetails() {
if (currentTimestamp.value < proposal.max_end * 1000) {
message.value =
'This execution strategy requires max end time to be reached.';
}

if (!proposal.execution_tx) return;

const tx = await network.value.helpers.getTransaction(
Expand Down

0 comments on commit a161715

Please sign in to comment.