-
Notifications
You must be signed in to change notification settings - Fork 4
PoC Optimism TX auction #71
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
Draft
poszu
wants to merge
23
commits into
bump-alloy-1.0
Choose a base branch
from
optimism-tx-auction
base: bump-alloy-1.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new optimism-tx-auction
example demonstrating on-chain auction bids via a Solidity contract and Rust client.
- Introduces
Auction.sol
withsubmitBid
andBidSubmitted
event. - Implements
AuctionClient
in Rust for submitting and retrieving bids. - Provides workspace configuration, Foundry settings, and a helper script for transaction submission.
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
examples/optimism-tx-auction/submit_txs.sh | Bash script to loop through private keys and submit transactions |
examples/optimism-tx-auction/src/lib.rs | Declares bindings and client modules |
examples/optimism-tx-auction/src/client.rs | Implements AuctionClient with log filtering and decoding |
examples/optimism-tx-auction/src/bindings.rs | Generates Rust bindings for the Solidity contract via alloy |
examples/optimism-tx-auction/contract/src/Auction.sol | Defines the Auction contract and submitBid logic |
examples/optimism-tx-auction/contract/lib/forge-std | Adds forge-std submodule reference |
examples/optimism-tx-auction/contract/foundry.toml | Configures Foundry for compilation and formatting |
examples/optimism-tx-auction/contract/.gitignore | Sets gitignore rules for contract build artifacts |
examples/optimism-tx-auction/Cargo.toml | Defines the Rust package and dependencies |
Cargo.toml | Registers the new example in workspace members |
.gitmodules | Adds forge-std submodule for the Solidity project |
Comments suppressed due to low confidence (1)
examples/optimism-tx-auction/src/client.rs:51
- The variable name 'comittee' is misspelled. Rename it to 'committee' for clarity and consistency.
let comittee = provider.get_committee().await?;
additionally, use Provider batch cals for parallel queries
505ac71
to
3c30b7b
Compare
3c30b7b
to
c0a730a
Compare
9c6b33b
to
e912a7b
Compare
5ab3fe1
to
96dee91
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new example project,
optimism-tx-auction
, which includes Solidity contracts, Rust client code, and supporting configurations. The changes add functionality for submitting bids to an auction and retrieving bid data using a Rust client. Key additions include the Solidity contract, Rust bindings and client, and a script for submitting transactions.New Example Project:
optimism-tx-auction
Submodule and Project Setup:
.gitmodules
: Added a new submodule forforge-std
under theoptimism-tx-auction
project.Cargo.toml
: Includedexamples/optimism-tx-auction
in the list of project members.examples/optimism-tx-auction/Cargo.toml
: Defined the Rust package foroptimism-tx-auction
with dependencies such aspod-sdk
,alloy
, andtokio
.Solidity Contract:
examples/optimism-tx-auction/contract/src/Auction.sol
: Added a Solidity contract for the auction, including asubmitBid
function and an eventBidSubmitted
.Rust Client for Auction:
examples/optimism-tx-auction/src/client.rs
: Implemented anAuctionClient
in Rust for interacting with the auction contract, including a method to retrieve bids (bids
) based on a deadline.examples/optimism-tx-auction/src/bindings.rs
: Added Rust bindings for the Solidity contract using thealloy::sol!
macro.examples/optimism-tx-auction/src/lib.rs
: Defined modules for bindings and client functionality.Supporting Files and Scripts:
examples/optimism-tx-auction/contract/.gitignore
: Added.gitignore
rules for development and build artifacts in the Solidity contract directory.examples/optimism-tx-auction/contract/foundry.toml
: Configured Foundry settings for Solidity compilation and development.examples/optimism-tx-auction/submit_txs.sh
: Added a Bash script for submitting transactions to the auction using predefined private keys.