-
Notifications
You must be signed in to change notification settings - Fork 96
[simplex,sdk]: support signing with MPC Vault #707
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
Open
royvardhan
wants to merge
12
commits into
main
Choose a base branch
from
roy/external-signing-services
base: main
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.
Open
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e9df70d
[simplex,sdk]: support signing with MPC Vault
royvardhan 465153b
use callback for signing bids
royvardhan 0ee4d87
add delegation support to mpc vault
royvardhan e857983
remove delegation submitter, abstract signing interface
royvardhan 525d83a
point to correct docs
royvardhan 392a411
encapsulate signer init and remove private key plumbing
royvardhan afcf076
rewire rebalancers to work with Account
royvardhan 24771cd
bid manager only accepts a callback, some more simplex changes
royvardhan ad6e7a4
validate signer config inside signer instantiator
royvardhan 8f77408
better abstraction everywhere
royvardhan d4bec0f
proper type alias for CI build issues
royvardhan cdd2172
fix mpc vault, add tests
royvardhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,204 +1,5 @@ | ||
| # Hyperbridge Intent FillerV2 | ||
| # Hyperbridge Simplex | ||
|
|
||
| A high-performance intent filler for the Hyperbridge IntentGatewayV2 protocol. This package provides both a library interface and a CLI binary for running an intent filler that monitors and fills cross-chain orders. | ||
| Canonical documentation for Simplex lives in the Hyperbridge docs: | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Binary | ||
|
|
||
| ```bash | ||
| npm install -g @hyperbridge/filler | ||
| # or | ||
| pnpm add -g @hyperbridge/filler | ||
| ``` | ||
|
|
||
| ### Library | ||
|
|
||
| ```bash | ||
| npm install @hyperbridge/filler | ||
| # or | ||
| pnpm add @hyperbridge/filler | ||
| ``` | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### 1. Create Configuration | ||
|
|
||
| Copy the example configuration file and customize it: | ||
|
|
||
| ```bash | ||
| cp filler-config-example.toml filler-config.toml | ||
| ``` | ||
|
|
||
| ### 2. Edit Configuration | ||
|
|
||
| Update `filler-config.toml` with: | ||
|
|
||
| - Your EVM private key | ||
| - RPC URLs for each chain you want to support | ||
| - Confirmation policies for each chain | ||
| - (Optional) Solver selection mode settings for Hyperbridge integration | ||
|
|
||
| ### 3. Run the FillerV2 | ||
|
|
||
| ```bash | ||
| filler run -c filler-config.toml | ||
| ``` | ||
|
|
||
| ## Docker Usage | ||
|
|
||
| We provide a simple script for Docker operations: | ||
|
|
||
| ```bash | ||
| # Build Docker image | ||
| ./scripts/docker.sh build | ||
|
|
||
| # Run as container | ||
| ./scripts/docker.sh run | ||
|
|
||
| # Use Docker Compose | ||
| ./scripts/docker.sh up | ||
| ./scripts/docker.sh down | ||
| ./scripts/docker.sh logs | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| The filler uses a TOML configuration file. See `filler-config-example.toml` for a complete example. | ||
|
|
||
| ### Basic Configuration | ||
|
|
||
| ```toml | ||
| [filler] | ||
| privateKey = "0xYourPrivateKey" | ||
| maxConcurrentOrders = 5 | ||
|
|
||
| # Logging configuration | ||
| [filler.logging] | ||
| level = "debug" # Options: trace, debug, info, warn, error | ||
|
|
||
| # Pending queue configuration | ||
| [filler.pendingQueue] | ||
| maxRechecks = 10 | ||
| recheckDelayMs = 30000 | ||
|
|
||
| # Strategy configuration | ||
| [[strategies]] | ||
| type = "basic" | ||
|
|
||
| # Chain configurations (only chainId and rpcUrl required - other data from SDK) | ||
| [[chains]] | ||
| chainId = 1 # Ethereum Mainnet | ||
| rpcUrl = "https://your-eth-rpc-url" | ||
|
|
||
| [[chains]] | ||
| chainId = 56 # BSC Mainnet | ||
| rpcUrl = "https://your-bsc-rpc-url" | ||
|
|
||
| [[chains]] | ||
| chainId = 42161 # Arbitrum Mainnet | ||
| rpcUrl = "https://your-arbitrum-rpc-url" | ||
|
|
||
| # Confirmation policies per chain | ||
| [confirmationPolicies."1"] # Ethereum Mainnet | ||
| minAmount = "5" # 5 USD | ||
| maxAmount = "5000" # 5000 USD | ||
| minConfirmations = 3 | ||
| maxConfirmations = 12 | ||
|
|
||
| [confirmationPolicies."56"] # BSC Mainnet | ||
| minAmount = "1" # 1 USD | ||
| maxAmount = "5000" # 5000 USD | ||
| minConfirmations = 3 | ||
| maxConfirmations = 15 | ||
| ``` | ||
|
|
||
| ### Watch-Only Mode | ||
|
|
||
| Monitor orders without executing fills. Useful for testing or observing market activity. | ||
|
|
||
| ```toml | ||
| # Option 1: Global watch-only (all chains) | ||
| [filler] | ||
| watchOnly = true | ||
|
|
||
| # Option 2: Per-chain watch-only | ||
| [filler.watchOnly] | ||
| "1" = true # Ethereum Mainnet - watch only | ||
| "56" = false # BSC Mainnet - normal execution | ||
| ``` | ||
|
|
||
| ### Solver Selection Mode | ||
|
|
||
| For participating in Hyperbridge's solver selection mechanism: | ||
|
|
||
| ```toml | ||
| [filler] | ||
| privateKey = "0xYourEVMPrivateKey" | ||
|
|
||
| # Substrate private key for signing Hyperbridge extrinsics | ||
| # Can be a hex seed (without 0x prefix) or mnemonic phrase | ||
| # Note: Requires BRIDGE tokens for transaction fees | ||
| substratePrivateKey = "your-substrate-seed-or-mnemonic" | ||
|
|
||
| # Hyperbridge WebSocket URL | ||
| hyperbridgeWsUrl = "wss://hyperbridge-rpc-url" | ||
|
|
||
| # ERC-4337 EntryPoint contract address | ||
| entryPointAddress = "0x..." | ||
|
|
||
| # SolverAccount.sol contract address for EIP-7702 delegation | ||
| solverAccountContractAddress = "0x..." | ||
|
|
||
| # Directory for persistent bid storage (enables fund recovery) | ||
| dataDir = "/path/to/data" | ||
| ``` | ||
|
|
||
| ## CLI Commands | ||
|
|
||
| ```bash | ||
| # Run the filler with configuration | ||
| filler run -c <config-file> | ||
| ``` | ||
|
|
||
| ## Strategies | ||
|
|
||
| ### Basic Filler | ||
|
|
||
| - Direct token transfers between chains | ||
| - No swapping capability | ||
| - Lower gas costs | ||
| - Recommended for standard cross-chain fills | ||
|
|
||
| ## Development | ||
|
|
||
| ```bash | ||
| # Install dependencies | ||
| pnpm install | ||
|
|
||
| # Build | ||
| pnpm build | ||
|
|
||
| # Run tests | ||
| pnpm test | ||
|
|
||
| # Run CLI in development | ||
| pnpm cli run -c filler-config.toml | ||
| ``` | ||
|
|
||
| ## Data Storage | ||
|
|
||
| The filler stores bid transaction hashes for fund recovery purposes. By default, data is stored in `.filler-data` in the current working directory. You can customize this with the `dataDir` configuration option. | ||
|
|
||
| ## Security | ||
|
|
||
| ⚠️ **Never commit private keys to version control!** | ||
|
|
||
| - Use environment variables or secure key management in production | ||
| - Run fillers in isolated environments | ||
| - Monitor for unusual activity | ||
| - Keep your Substrate account funded with BRIDGE tokens for solver selection mode | ||
|
|
||
| ## License | ||
|
|
||
| Part of the Hyperbridge SDK. | ||
| - [Simplex Docs](https://docs.hyperbridge.network/developers/intent-gateway/simplex/) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.