-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Express Relay: directly submit Bids (#1747)
* SDKs now directly submitting to bid endpoint * bump versions * address comments * remove development configs * fix lint * Add mode + better error handling * Check chain ids before running simple searcher * Update constants and adjust a bit for mode --------- Co-authored-by: Amin Moghaddam <[email protected]>
- Loading branch information
Showing
11 changed files
with
463 additions
and
266 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
export const executeOpportunityAbi = { | ||
type: "function", | ||
name: "executeOpportunity", | ||
inputs: [ | ||
{ | ||
name: "params", | ||
type: "tuple", | ||
internalType: "struct ExecutionParams", | ||
components: [ | ||
{ | ||
name: "permit", | ||
type: "tuple", | ||
internalType: "struct ISignatureTransfer.PermitBatchTransferFrom", | ||
components: [ | ||
{ | ||
name: "permitted", | ||
type: "tuple[]", | ||
internalType: "struct ISignatureTransfer.TokenPermissions[]", | ||
components: [ | ||
{ | ||
name: "token", | ||
type: "address", | ||
internalType: "address", | ||
}, | ||
{ | ||
name: "amount", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "nonce", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
{ | ||
name: "deadline", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "witness", | ||
type: "tuple", | ||
internalType: "struct ExecutionWitness", | ||
components: [ | ||
{ | ||
name: "buyTokens", | ||
type: "tuple[]", | ||
internalType: "struct TokenAmount[]", | ||
components: [ | ||
{ | ||
name: "token", | ||
type: "address", | ||
internalType: "address", | ||
}, | ||
{ | ||
name: "amount", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "executor", | ||
type: "address", | ||
internalType: "address", | ||
}, | ||
{ | ||
name: "targetContract", | ||
type: "address", | ||
internalType: "address", | ||
}, | ||
{ | ||
name: "targetCalldata", | ||
type: "bytes", | ||
internalType: "bytes", | ||
}, | ||
{ | ||
name: "targetCallValue", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
{ | ||
name: "bidAmount", | ||
type: "uint256", | ||
internalType: "uint256", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "signature", | ||
type: "bytes", | ||
internalType: "bytes", | ||
}, | ||
], | ||
outputs: [], | ||
stateMutability: "payable", | ||
}; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { OpportunityAdapterConfig } from "./types"; | ||
|
||
export const OPPORTUNITY_ADAPTER_CONFIGS: Record< | ||
string, | ||
OpportunityAdapterConfig | ||
> = { | ||
op_sepolia: { | ||
chain_id: 11155420, | ||
opportunity_adapter_factory: "0xfA119693864b2F185742A409c66f04865c787754", | ||
opportunity_adapter_init_bytecode_hash: | ||
"0x3d71516d94b96a8fdca4e3a5825a6b41c9268a8e94610367e69a8462cc543533", | ||
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3", | ||
weth: "0x74A4A85C611679B73F402B36c0F84A7D2CcdFDa3", | ||
}, | ||
mode: { | ||
chain_id: 34443, | ||
opportunity_adapter_factory: "0x59F78DE21a0b05d96Ae00c547BA951a3B905602f", | ||
opportunity_adapter_init_bytecode_hash: | ||
"0xd53b8e32ab2ecba07c3e3a17c3c5e492c62e2f7051b89e5154f52e6bfeb0e38f", | ||
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3", | ||
weth: "0x4200000000000000000000000000000000000006", | ||
}, | ||
}; |
This file contains 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.