diff --git a/projects/sdk/src/lib/tractor/OperatorPasteInstrs.ts b/projects/sdk/src/lib/tractor/OperatorPasteInstrs.ts deleted file mode 100644 index 3d3b0e974a..0000000000 --- a/projects/sdk/src/lib/tractor/OperatorPasteInstrs.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BeanstalkSDK } from "../BeanstalkSDK"; -import { uint80, Bytes32 } from "./types"; - -export class OperatorPasteInstrs { - static sdk: BeanstalkSDK; - - constructor(sdk: BeanstalkSDK) { - OperatorPasteInstrs.sdk = sdk; - } - - encode(copyByteIndex: uint80, pasteCallIndex: uint80, pasteByteIndex: uint80): Bytes32 { return ''; } - - decode(operatorPasteInstr: Bytes32): [uint80, uint80, uint80] { return ['', '', ''] } - - -} diff --git a/projects/sdk/src/lib/tractor/tractor.test.ts b/projects/sdk/src/lib/tractor/tractor.test.ts index 6f5e317b7f..be470a44db 100644 --- a/projects/sdk/src/lib/tractor/tractor.test.ts +++ b/projects/sdk/src/lib/tractor/tractor.test.ts @@ -19,6 +19,8 @@ describe("tractor mow", async () => { signature: await publisher.signMessage(blueprintHash) }; - await sdk.contracts.beanstalk.runBlueprint(requisition).then((txn) => txn.wait()); + const operatorData: ethers.Bytes = ethers.utils.arrayify(""); + + await sdk.contracts.beanstalk.tractor(requisition, operatorData).then((txn) => txn.wait()); }); }); diff --git a/projects/sdk/src/lib/tractor/tractor.ts b/projects/sdk/src/lib/tractor/tractor.ts index 5fe5be2948..4f3cd0e5af 100644 --- a/projects/sdk/src/lib/tractor/tractor.ts +++ b/projects/sdk/src/lib/tractor/tractor.ts @@ -17,7 +17,7 @@ export class Tractor { } static async getBlueprintHash(blueprint: Blueprint): Promise { - return Tractor.sdk.contracts.beanstalk.interface.getBlueprintHash(blueprint); + return Tractor.sdk.contracts.beanstalk.getBlueprintHash(blueprint); } // async signRequisition(requisition: Requisition, signer: ethers.Signer) { @@ -37,7 +37,10 @@ export class Tractor { // async encodeOperatorData() {} - async tractor(requisition: Requisition, operatorData: Bytes): Promise { + async tractor( + requisition: Requisition, + operatorData: ethers.Bytes + ): Promise { return Tractor.sdk.contracts.beanstalk.tractor(requisition, operatorData); } } diff --git a/projects/sdk/src/lib/tractor/types.ts b/projects/sdk/src/lib/tractor/types.ts index 263c3c0e00..48feb35186 100644 --- a/projects/sdk/src/lib/tractor/types.ts +++ b/projects/sdk/src/lib/tractor/types.ts @@ -5,7 +5,7 @@ export type uint80 = ethers.BigNumber; export type Blueprint = { publisher: string; data: ethers.Bytes; - operatorPasteInstrs: ethers.Bytes; + operatorPasteInstrs: ethers.Bytes[]; maxNonce: ethers.BigNumber; startTime: ethers.BigNumber; endTime: ethers.BigNumber; @@ -27,7 +27,7 @@ export type DraftAction = { }; export type AdvancedFarmCall = { - callData: ethers.Bytes; + callData: string; clipboard: string; };