Browse Source

changes in signature formation

ani 1 year ago
parent
commit
1b10259592

+ 1 - 1
express_relay/sdk/js/src/examples/simpleSearcher.ts

@@ -102,7 +102,7 @@ const argv = yargs(hideBin(process.argv))
   .option("bid", {
     description: "Bid amount in wei",
     type: "string",
-    default: "20000000000000000",
+    default: "600000000000000000",
   })
   .option("private-key", {
     description:

+ 6 - 7
express_relay/sdk/js/src/index.ts

@@ -66,9 +66,8 @@ export const OPPORTUNITY_ADAPTER_CONFIGS: Record<
 > = {
   op_sepolia: {
     chain_id: 11155420,
-    opportunity_adapter_factory: "0xfA119693864b2F185742A409c66f04865c787754",
-    opportunity_adapter_init_bytecode_hash:
-      "0x3d71516d94b96a8fdca4e3a5825a6b41c9268a8e94610367e69a8462cc543533",
+    opportunity_adapter_factory: "TBD",
+    opportunity_adapter_init_bytecode_hash: "TBD",
     permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
     weth: "0x74A4A85C611679B73F402B36c0F84A7D2CcdFDa3",
   },
@@ -360,10 +359,10 @@ export class Client {
       ],
       OpportunityWitness: [
         { name: "buyTokens", type: "TokenAmount[]" },
-        { name: "executor", type: "address" },
-        { name: "targetContract", type: "address" },
         { name: "targetCalldata", type: "bytes" },
         { name: "targetCallValue", type: "uint256" },
+        { name: "targetContract", type: "address" },
+        { name: "executor", type: "address" },
         { name: "bidAmount", type: "uint256" },
       ],
       TokenAmount: [
@@ -408,10 +407,10 @@ export class Client {
         deadline: bidParams.deadline,
         witness: {
           buyTokens: opportunity.buyTokens,
-          executor: account.address,
-          targetContract: opportunity.targetContract,
           targetCalldata: opportunity.targetCalldata,
           targetCallValue: opportunity.targetCallValue,
+          targetContract: opportunity.targetContract,
+          executor: account.address,
           bidAmount: bidParams.amount,
         },
       },

+ 6 - 6
express_relay/sdk/python/express_relay/client.py

@@ -30,8 +30,8 @@ from express_relay.express_relay_types import (
 OPPORTUNITY_ADAPTER_CONFIGS = {
     "op_sepolia": OpportunityAdapterConfig(
         chain_id=11155420,
-        opportunity_adapter_factory="0xfA119693864b2F185742A409c66f04865c787754",
-        opportunity_adapter_init_bytecode_hash="0x3d71516d94b96a8fdca4e3a5825a6b41c9268a8e94610367e69a8462cc543533",
+        opportunity_adapter_factory="TBD",
+        opportunity_adapter_init_bytecode_hash="TBD",
         permit2="0x000000000022D473030F116dDEE9F6B43aC78BA3",
         weth="0x74A4A85C611679B73F402B36c0F84A7D2CcdFDa3",
     )
@@ -543,10 +543,10 @@ def sign_bid(
         ],
         "OpportunityWitness": [
             {"name": "buyTokens", "type": "TokenAmount[]"},
-            {"name": "executor", "type": "address"},
-            {"name": "targetContract", "type": "address"},
             {"name": "targetCalldata", "type": "bytes"},
             {"name": "targetCallValue", "type": "uint256"},
+            {"name": "targetContract", "type": "address"},
+            {"name": "executor", "type": "address"},
             {"name": "bidAmount", "type": "uint256"},
         ],
         "TokenAmount": [
@@ -582,12 +582,12 @@ def sign_bid(
                 }
                 for token in opportunity.buy_tokens
             ],
-            "executor": executor,
-            "targetContract": opportunity.target_contract,
             "targetCalldata": bytes.fromhex(
                 opportunity.target_calldata.replace("0x", "")
             ),
             "targetCallValue": opportunity.target_call_value,
+            "targetContract": opportunity.target_contract,
+            "executor": executor,
             "bidAmount": bid_params.amount,
         },
     }

+ 1 - 1
express_relay/sdk/python/express_relay/searcher/examples/simple_searcher.py

@@ -19,7 +19,7 @@ from express_relay.express_relay_types import (
 
 logger = logging.getLogger(__name__)
 
-NAIVE_BID = int(2e16)
+NAIVE_BID = int(6e17)
 # Set deadline (naively) to max uint256
 DEADLINE_MAX = 2**256 - 1