diff --git a/cli/client/create-escrow.ts b/cli/client/create-escrow.ts index 300374e..a99510e 100644 --- a/cli/client/create-escrow.ts +++ b/cli/client/create-escrow.ts @@ -34,6 +34,9 @@ Options: --private-key Your private key (required) --deployment Path to deployment file (default: ./cli/deployments/localhost.json) --rpc-url RPC URL (default: from deployment file) + --arbitration-provider Arbitration provider (default: OpenAI) + --arbitration-model Arbitration model (default: gpt-4o-mini) + --arbitration-prompt Custom arbitration prompt (optional) --help, -h Display this help message Environment Variables (alternative to CLI options): @@ -67,6 +70,9 @@ function parseCliArgs() { "private-key": { type: "string" }, "deployment": { type: "string" }, "rpc-url": { type: "string" }, + "arbitration-provider": { type: "string" }, + "arbitration-model": { type: "string" }, + "arbitration-prompt": { type: "string" }, "help": { type: "boolean", short: "h" }, }, strict: true, @@ -92,6 +98,16 @@ async function main() { const oracleAddress = args.oracle; const privateKey = args["private-key"] || process.env.PRIVATE_KEY; const deploymentPath = args.deployment || "./cli/deployments/localhost.json"; + + // Arbitration configuration with defaults + const arbitrationProvider = args["arbitration-provider"] || "OpenAI"; + const arbitrationModel = args["arbitration-model"] || "gpt-4o-mini"; + const arbitrationPrompt = args["arbitration-prompt"] || + `Evaluate the fulfillment against the demand and decide whether the demand was validly fulfilled + +Demand: {{demand}} + +Fulfillment: {{obligation}}`; // Validate required parameters if (!demand) { @@ -194,13 +210,9 @@ async function main() { const encodedDemand = client.arbiters.general.trustedOracle.encode({ oracle: oracleAddress as `0x${string}`, data: llmClient.llm.encodeDemand({ - arbitrationProvider: "OpenAI", - arbitrationModel: "gpt-4.1", - arbitrationPrompt: `Evaluate the fulfillment against the demand and decide whether the demand was validly fulfilled - -Demand: {{demand}} - -Fulfillment: {{obligation}}`, + arbitrationProvider, + arbitrationModel, + arbitrationPrompt, demand: demand }) }); diff --git a/cli/deployments/localhost.json b/cli/deployments/localhost.json index be515f7..b71648e 100644 --- a/cli/deployments/localhost.json +++ b/cli/deployments/localhost.json @@ -2,7 +2,7 @@ "network": "localhost", "chainId": 31337, "rpcUrl": "http://localhost:8545", - "deployedAt": "2026-01-02T05:54:03.735Z", + "deployedAt": "2026-01-02T06:06:32.864Z", "deployer": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "addresses": { "easSchemaRegistry": "0x5fbdb2315678afecb367f032d93f642f64180aa3", diff --git a/cli/index.ts b/cli/index.ts index ad6d548..3fb3c4d 100755 --- a/cli/index.ts +++ b/cli/index.ts @@ -36,6 +36,9 @@ Options (vary by command): --private-key Private key (all commands) --rpc-url RPC URL (default: http://localhost:8545) --deployment Load addresses from deployment file + --arbitration-provider Arbitration provider (create, default: OpenAI) + --arbitration-model Arbitration model (create, default: gpt-4o-mini) + --arbitration-prompt Custom arbitration prompt (create, optional) Environment Variables: PRIVATE_KEY Private key for transactions @@ -107,6 +110,9 @@ function parseCliArgs() { "private-key": { type: "string" }, "rpc-url": { type: "string" }, "deployment": { type: "string" }, + "arbitration-provider": { type: "string" }, + "arbitration-model": { type: "string" }, + "arbitration-prompt": { type: "string" }, }, strict: true, }); diff --git a/cli/server/deploy.ts b/cli/server/deploy.ts index 40f3db7..9e99c5d 100644 --- a/cli/server/deploy.ts +++ b/cli/server/deploy.ts @@ -371,7 +371,9 @@ async function main() { console.log(` --demand "The sky is blue" \\`); console.log(` --amount 10 \\`); console.log(` --token ${addresses.mockERC20A} \\`); - console.log(` --oracle 0x70997970C51812dc3A010C7d01b50e0d17dc79C8`); + console.log(` --oracle 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \\`); + console.log(` --arbitration-provider "OpenAI" \\`); + console.log(` --arbitration-model "gpt-4o-mini"`); } catch (error) { console.error("❌ Deployment failed:", error);