Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate submit clearer responces #62

Merged
merged 6 commits into from
Aug 15, 2023
Merged

Conversation

0xjimmy
Copy link
Contributor

@0xjimmy 0xjimmy commented Aug 9, 2023

  • Fixed issue with blocks resetting to 0

Resolves #44

  • Made simulation results clearer
  • Fix display of pending and mined bundle submissions. Show tx hashes of txes in bundle with link to explorers if on known network (Mainnet/Goerli)

@0xjimmy 0xjimmy marked this pull request as ready for review August 9, 2023 09:04
@0xjimmy 0xjimmy requested review from KillariDev and MicahZoltu and removed request for KillariDev August 9, 2023 10:06
Comment on lines +22 to +23
error?: Error,
success?: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here the type should be either error or success

	{ error: Error } | { success: { .. } }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda annoying to refactor that out, so I'll add it as low priority issue

</div>
<div class='flex gap-2 items-center'>
<span class='w-16 text-right'>Gas Used</span>
<span class='rounded bg-background px-2 py-1 font-mono font-medium'>{state.value.value.firstRevert.gasUsed} gas</span>
<span class='bg-black px-2 py-1 font-mono font-medium'>{state.value.value.firstRevert.gasUsed} ETH</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this unit correct?

<span class='rounded bg-background px-2 py-1 font-mono font-medium'>
{'error' in state.value.value.firstRevert ? String(state.value.value.firstRevert.error) : 'Unknown'}
</span>
<span class='bg-black px-2 py-1 font-mono font-medium'>{'error' in state.value.value.firstRevert ? String(state.value.value.firstRevert.error) : 'Unknown'}</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get rid of casting to String?

</div>)
if (outstandingBundles.value.error) return <SingleNotice variant='error' title='Error Sending Bundle' description={<p class='font-medium w-full break-all'>{outstandingBundles.value.error.message}</p>} />

const chainIdString = provider.value ? provider.value.chainId.toString(10) : '-1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we assuming -1 as the string if we don't know? Shouldn't this be undefined, or "1" if we want to assume mainnet

export const BLOCK_EXPLORERS: { [chainId: string]: string } = {
'1': 'https://etherscan.io/',
'5': 'https://goerli.etherscan.io/'
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also have Sepolia support?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we have a flashbots proxy for Sepolia.

app/ts/library/provider.ts Show resolved Hide resolved
app/ts/library/provider.ts Outdated Show resolved Hide resolved
@0xjimmy 0xjimmy merged commit 11f0516 into style Aug 15, 2023
@0xjimmy 0xjimmy deleted the simulate-submit-clearer-responces branch August 15, 2023 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants