From 374e0061265ef7ba83d7697c7d7409c359ab1c0d Mon Sep 17 00:00:00 2001 From: "brandon.cs" Date: Fri, 17 Mar 2023 18:29:54 +0800 Subject: [PATCH] chore: Automate renaming (#38) * chore: rename files * chore: rename abi & types * chore: rename vars * chore: rename package & readme * chore: task api axios instance * chore: update task api endpoint * chore: remove old contract types * chore: bump version number --------- Co-authored-by: Sylvain Goumy --- README.md | 40 +++++------ package.json | 8 +-- src/constants/index.ts | 33 +++++---- .../abis/{Ops.json => Automate.json} | 0 ...Factory.json => AutomateProxyFactory.json} | 0 src/contracts/types/{Ops.ts => Automate.ts} | 6 +- ...roxyFactory.ts => AutomateProxyFactory.ts} | 6 +- ...ry.ts => AutomateProxyFactory__factory.ts} | 38 +++++----- .../{Ops__factory.ts => Automate__factory.ts} | 33 +++++---- src/contracts/types/factories/index.ts | 4 +- src/contracts/types/index.ts | 8 +-- src/index.test.ts | 6 +- .../{GelatoOpsModule.ts => AutomateModule.ts} | 2 +- src/lib/{GelatoOpsSDK.ts => AutomateSDK.ts} | 72 +++++++++++-------- src/lib/index.ts | 4 +- src/types/GelatoAddressBook.interface.ts | 2 +- src/utils/index.ts | 2 +- 17 files changed, 142 insertions(+), 122 deletions(-) rename src/contracts/abis/{Ops.json => Automate.json} (100%) rename src/contracts/abis/{OpsProxyFactory.json => AutomateProxyFactory.json} (100%) rename src/contracts/types/{Ops.ts => Automate.ts} (99%) rename src/contracts/types/{OpsProxyFactory.ts => AutomateProxyFactory.ts} (98%) rename src/contracts/types/factories/{OpsProxyFactory__factory.ts => AutomateProxyFactory__factory.ts} (96%) rename src/contracts/types/factories/{Ops__factory.ts => Automate__factory.ts} (98%) rename src/lib/{GelatoOpsModule.ts => AutomateModule.ts} (99%) rename src/lib/{GelatoOpsSDK.ts => AutomateSDK.ts} (81%) diff --git a/README.md b/README.md index 3aba9e1..763e4d7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Gelato Ops SDK +# Gelato Automate SDK -Automate your smart contracts using Gelato Ops SDK +Automate your smart contracts using Automate SDK - [Installation](#installation) - [How to use?](#how-to-use) @@ -9,36 +9,36 @@ Automate your smart contracts using Gelato Ops SDK ## Installation ```bash -yarn add @gelatonetwork/ops-sdk +yarn add @gelatonetwork/automate-sdk ``` or ```bash -npm install @gelatonetwork/ops-sdk +npm install @gelatonetwork/automate-sdk ``` ## How to use? -1. Import the Gelato Ops SDK into your project: +1. Import the Automate SDK into your project: ```typescript -import { GelatoOpsSDK } from "@gelatonetwork/ops-sdk"; +import { AutomateSDK } from "@gelatonetwork/automate-sdk"; ``` -2. Check if Gelato Ops is deployed on your network: +2. Check if Automate is deployed on your network: ```typescript - import { isGelatoOpsSupported } from "@gelatonetwork/ops-sdk"; + import { isAutomateSupported } from "@gelatonetwork/automate-sdk"; - if (!isGelatoOpsSupported(chainId)) { - console.log(`Gelato Ops network not supported (${chainId})`); + if (!isAutomateSupported(chainId)) { + console.log(`Automate network not supported (${chainId})`); return; } ``` -3. Instantiate Gelato Ops using your signer: +3. Instantiate Automate using your signer: ```typescript -const gelatoOps = new GelatoOpsSDK(chainId, signer); +const automate = new AutomateSDK(chainId, signer); ``` 4. Create an automation task: @@ -75,7 +75,7 @@ interface CreateTaskOptions { } const params: CreateTaskOptions = { name, execAddress, execSelector, interval, dedicatedMsgSender }; -const { taskId, tx }: TaskTransaction = await gelatoOps.createTask(params); +const { taskId, tx }: TaskTransaction = await automate.createTask(params); await tx.wait(); // Optionally wait for tx confirmation console.log(`Task created, taskId: ${taskId} (tx hash: ${tx.hash})`); ``` @@ -83,7 +83,7 @@ console.log(`Task created, taskId: ${taskId} (tx hash: ${tx.hash})`); 5. Retrieve all your tasks: ```typescript - const activeTasks = await gelatoOps.getActiveTasks(); + const activeTasks = await automate.getActiveTasks(); activeTasks.forEach((task: Task) => { console.log(`- ${task.name} (${task.taskId})`); }); @@ -92,13 +92,13 @@ console.log(`Task created, taskId: ${taskId} (tx hash: ${tx.hash})`); 6. Rename a task: ```typescript -await gelatoOps.renameTask(taskId, "Another Gelato name"); +await automate.renameTask(taskId, "Another Gelato name"); ``` 7. Cancel a task: ```typescript -const { taskId, tx }: TaskTransaction = await gelatoOps.cancelTask(taskId); +const { taskId, tx }: TaskTransaction = await automate.cancelTask(taskId); await tx.wait(); // Optionally wait for tx confirmation console.log(`Task canceled, taskId: ${taskId} (tx hash: ${tx.hash})`); ``` @@ -110,23 +110,23 @@ If you need to override gas settings, you can pass an additional `Overrides` obj ```typescript const params: CreateTaskOptions = { name, execAddress, execSelector, interval, dedicatedMsgSender }; const overrides: Overrides = { gasLimit: 2000000 }; -const tx: TaskTransaction = await gelatoOps.createTask(params, overrides); +const tx: TaskTransaction = await automate.createTask(params, overrides); ``` 9. Whitelisting msg.sender of function: If you enabled `dedicatedMsgSender`, your task will be called via a dedicated `msg.sender` which you can whitelist on your smart contract for extra security. -If `dedicatedMsgSender` is set to false, `msg.sender` of the task will be the Ops contract. +If `dedicatedMsgSender` is set to false, `msg.sender` of the task will be the Automate contract. To fetch your dedicated `msg.sender`: ```typescript -const { address } = await gelatoOps.getDedicatedMsgSender(); +const { address } = await automate.getDedicatedMsgSender(); console.log("Dedicated msg.sender: ", address); ``` ## Examples -Check out our tutorial repository [ops-sdk-hello-world](https://github.com/gelatodigital/ops-sdk-hello-world) for more in-depth examples. +Check out our tutorial repository [automate-sdk-hello-world](https://github.com/gelatodigital/automate-sdk-hello-world) for more in-depth examples. diff --git a/package.json b/package.json index bbde7e5..0c2f219 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "@gelatonetwork/ops-sdk", - "version": "2.0.7", - "description": "SDK to create Gelato Ops tasks", - "url": "https://github.com/gelatodigital/ops-sdk", + "name": "@gelatonetwork/automate-sdk", + "version": "2.1.0", + "description": "SDK to create Automate tasks", + "url": "https://github.com/gelatodigital/automate-sdk", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ diff --git a/src/constants/index.ts b/src/constants/index.ts index 088dd24..2efc66b 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,8 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { GelatoAddressBook } from "../types"; -export const OPS_TASKS_API = - "https://ops-task.fra.gelato.digital/1514007e8336fa99e6fe/api"; +export const AUTOMATE_TASKS_API = "https://api.gelato.digital/automate/tasks"; export const ETH = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; export const ZERO_ADD = "0x0000000000000000000000000000000000000000"; @@ -27,48 +26,48 @@ export const CHAIN_ID = { export const GELATO_ADDRESSES: GelatoAddressBook = { [CHAIN_ID.MAINNET]: { - ops: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", + automate: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", }, [CHAIN_ID.GOERLI]: { - ops: "0xc1C6805B857Bef1f412519C4A842522431aFed39", + automate: "0xc1C6805B857Bef1f412519C4A842522431aFed39", }, [CHAIN_ID.OPTIMISTIC_GOERLI]: { - ops: "0x255F82563b5973264e89526345EcEa766DB3baB2", + automate: "0x255F82563b5973264e89526345EcEa766DB3baB2", }, [CHAIN_ID.ARBITRUM_GOERLI]: { - ops: "0xa5f9b728ecEB9A1F6FCC89dcc2eFd810bA4Dec41", + automate: "0xa5f9b728ecEB9A1F6FCC89dcc2eFd810bA4Dec41", }, [CHAIN_ID.MATIC]: { - ops: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", + automate: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", }, [CHAIN_ID.MUMBAI]: { - ops: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", + automate: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", }, [CHAIN_ID.FANTOM]: { - ops: "0x6EDe1597c05A0ca77031cBA43Ab887ccf24cd7e8", + automate: "0x6EDe1597c05A0ca77031cBA43Ab887ccf24cd7e8", }, [CHAIN_ID.ARBITRUM]: { - ops: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", + automate: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", }, [CHAIN_ID.AVALANCHE]: { - ops: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", + automate: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", }, [CHAIN_ID.BSC]: { - ops: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", + automate: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", }, [CHAIN_ID.GNOSIS]: { - ops: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", + automate: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", }, [CHAIN_ID.OPTIMISM]: { - ops: "0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c", + automate: "0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c", }, [CHAIN_ID.MOONBEAM]: { - ops: "0x6c3224f9b3feE000A444681d5D45e4532D5BA531", + automate: "0x6c3224f9b3feE000A444681d5D45e4532D5BA531", }, [CHAIN_ID.MOONRIVER]: { - ops: "0x86B7e611194978F556007ac1F52D09d114D8f160", + automate: "0x86B7e611194978F556007ac1F52D09d114D8f160", }, [CHAIN_ID.CRONOS]: { - ops: "0x86B7e611194978F556007ac1F52D09d114D8f160", + automate: "0x86B7e611194978F556007ac1F52D09d114D8f160", }, }; diff --git a/src/contracts/abis/Ops.json b/src/contracts/abis/Automate.json similarity index 100% rename from src/contracts/abis/Ops.json rename to src/contracts/abis/Automate.json diff --git a/src/contracts/abis/OpsProxyFactory.json b/src/contracts/abis/AutomateProxyFactory.json similarity index 100% rename from src/contracts/abis/OpsProxyFactory.json rename to src/contracts/abis/AutomateProxyFactory.json diff --git a/src/contracts/types/Ops.ts b/src/contracts/types/Automate.ts similarity index 99% rename from src/contracts/types/Ops.ts rename to src/contracts/types/Automate.ts index 5ca9357..919aea1 100644 --- a/src/contracts/types/Ops.ts +++ b/src/contracts/types/Automate.ts @@ -31,7 +31,7 @@ export declare namespace LibDataTypes { }; } -export interface OpsInterface extends utils.Interface { +export interface AutomateInterface extends utils.Interface { functions: { "cancelTask(bytes32)": FunctionFragment; "createTask(address,bytes,(uint8[],bytes[]),address)": FunctionFragment; @@ -164,12 +164,12 @@ export interface OpsInterface extends utils.Interface { events: {}; } -export interface Ops extends BaseContract { +export interface Automate extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: OpsInterface; + interface: AutomateInterface; queryFilter( event: TypedEventFilter, diff --git a/src/contracts/types/OpsProxyFactory.ts b/src/contracts/types/AutomateProxyFactory.ts similarity index 98% rename from src/contracts/types/OpsProxyFactory.ts rename to src/contracts/types/AutomateProxyFactory.ts index 55311ee..056aa23 100644 --- a/src/contracts/types/OpsProxyFactory.ts +++ b/src/contracts/types/AutomateProxyFactory.ts @@ -25,7 +25,7 @@ import type { OnEvent, } from "./common"; -export interface OpsProxyFactoryInterface extends utils.Interface { +export interface AutomateProxyFactoryInterface extends utils.Interface { functions: { "deploy()": FunctionFragment; "deployFor(address)": FunctionFragment; @@ -111,12 +111,12 @@ export type DeployProxyEvent = TypedEvent< export type DeployProxyEventFilter = TypedEventFilter; -export interface OpsProxyFactory extends BaseContract { +export interface AutomateProxyFactory extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: OpsProxyFactoryInterface; + interface: AutomateProxyFactoryInterface; queryFilter( event: TypedEventFilter, diff --git a/src/contracts/types/factories/OpsProxyFactory__factory.ts b/src/contracts/types/factories/AutomateProxyFactory__factory.ts similarity index 96% rename from src/contracts/types/factories/OpsProxyFactory__factory.ts rename to src/contracts/types/factories/AutomateProxyFactory__factory.ts index 1c4ed70..dd02cc3 100644 --- a/src/contracts/types/factories/OpsProxyFactory__factory.ts +++ b/src/contracts/types/factories/AutomateProxyFactory__factory.ts @@ -4,9 +4,9 @@ import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; import type { Provider, TransactionRequest } from "@ethersproject/providers"; import type { - OpsProxyFactory, - OpsProxyFactoryInterface, -} from "../OpsProxyFactory"; + AutomateProxyFactory, + AutomateProxyFactoryInterface, +} from "../AutomateProxyFactory"; const _abi = [ { @@ -238,16 +238,16 @@ const _abi = [ const _bytecode = "0x60c06040523480156200001157600080fd5b506040516200213738038062002137833981810160405281019062000037919062000111565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050505062000158565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000d982620000ac565b9050919050565b620000eb81620000cc565b8114620000f757600080fd5b50565b6000815190506200010b81620000e0565b92915050565b600080604083850312156200012b576200012a620000a7565b5b60006200013b85828601620000fa565b92505060206200014e85828601620000fa565b9150509250929050565b60805160a051611fb262000185600039600081816103230152610a0d0152600061094b0152611fb26000f3fe60806040523480156200001157600080fd5b5060043610620000ac5760003560e01c806374912cd2116200006f57806374912cd21462000197578063775c300c14620001cd578063bd4972c314620001ef578063ded89a7c1462000225578063e70abe92146200025c57620000ac565b80632971038814620000b157806337a6be1614620000e757806354fd4d50146200011d5780635c60da1b146200013f578063606aa7151462000161575b600080fd5b620000cf6004803603810190620000c9919062000b1a565b6200027e565b604051620000de919062000b69565b60405180910390f35b620001056004803603810190620000ff919062000b1a565b620002d4565b60405162000114919062000ba1565b60405180910390f35b620001276200031c565b60405162000136919062000bd9565b60405180910390f35b6200014962000321565b60405162000158919062000c07565b60405180910390f35b6200017f600480360381019062000179919062000b1a565b62000345565b6040516200018e919062000c07565b60405180910390f35b620001b56004803603810190620001af919062000b1a565b62000456565b604051620001c4919062000c49565b60405180910390f35b620001d7620007bc565b604051620001e6919062000c49565b60405180910390f35b6200020d600480360381019062000207919062000b1a565b620007ce565b6040516200021c919062000c07565b60405180910390f35b6200024360048036038101906200023d919062000b1a565b62000884565b6040516200025392919062000c66565b60405180910390f35b6200026662000949565b60405162000275919062000c07565b60405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600181565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620003e9578091505062000451565b6000620003f6846200096d565b91505060006200040685620009e3565b9050600060ff60f81b308484805190602001206040516020016200042e949392919062000d59565b6040516020818303038152906040528051906020012090508060001c9450505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146200052a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005219062000e10565b60405180910390fd5b8262000536816200027e565b1562000579576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005709062000e82565b60405180910390fd5b60008062000587866200096d565b9150915060006200059887620009e3565b9050620005a6828262000a89565b955060018060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555085600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555086600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018360001c0160001b6000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f1bd7b67c90068c779f5700cbfefe89aea540a111a3eea6c228fd9d2b5d74a92a85858a604051620007aa9392919062000ea4565b60405180910390a35050505050919050565b6000620007c93362000456565b905090565b6000620007db826200027e565b6200081d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008149062000f31565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146200092e57806001925092505062000944565b620009398462000345565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491508282604051602001620009c692919062000f53565b604051602081830303815290604052805190602001209050915091565b606060405180602001620009f79062000aa2565b6020820181038252601f19601f820116604052507f0000000000000000000000000000000000000000000000000000000000000000836040518060200160405280600081525060405160200162000a519392919062001024565b60405160208183030381529060405260405160200162000a73929190620010aa565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b610eaa80620010d383390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ae28262000ab5565b9050919050565b62000af48162000ad5565b811462000b0057600080fd5b50565b60008135905062000b148162000ae9565b92915050565b60006020828403121562000b335762000b3262000ab0565b5b600062000b438482850162000b03565b91505092915050565b60008115159050919050565b62000b638162000b4c565b82525050565b600060208201905062000b80600083018462000b58565b92915050565b6000819050919050565b62000b9b8162000b86565b82525050565b600060208201905062000bb8600083018462000b90565b92915050565b6000819050919050565b62000bd38162000bbe565b82525050565b600060208201905062000bf0600083018462000bc8565b92915050565b62000c018162000ad5565b82525050565b600060208201905062000c1e600083018462000bf6565b92915050565b600062000c318262000ab5565b9050919050565b62000c438162000c24565b82525050565b600060208201905062000c60600083018462000c38565b92915050565b600060408201905062000c7d600083018562000bf6565b62000c8c602083018462000b58565b9392505050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b62000cde62000cd88262000c93565b62000cbf565b82525050565b60008160601b9050919050565b600062000cfe8262000ce4565b9050919050565b600062000d128262000cf1565b9050919050565b62000d2e62000d288262000ad5565b62000d05565b82525050565b6000819050919050565b62000d5362000d4d8262000b86565b62000d34565b82525050565b600062000d67828762000cc9565b60018201915062000d79828662000d19565b60148201915062000d8b828562000d3e565b60208201915062000d9d828462000d3e565b60208201915081905095945050505050565b600082825260208201905092915050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b600062000df8601a8362000daf565b915062000e058262000dc0565b602082019050919050565b6000602082019050818103600083015262000e2b8162000de9565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b600062000e6a60198362000daf565b915062000e778262000e32565b602082019050919050565b6000602082019050818103600083015262000e9d8162000e5b565b9050919050565b600060608201905062000ebb600083018662000b90565b62000eca602083018562000b90565b62000ed9604083018462000bf6565b949350505050565b7f4f707350726f7879466163746f72793a204e6f742070726f7879000000000000600082015250565b600062000f19601a8362000daf565b915062000f268262000ee1565b602082019050919050565b6000602082019050818103600083015262000f4c8162000f0a565b9050919050565b600060408201905062000f6a600083018562000bf6565b62000f79602083018462000b90565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101562000fbc57808201518184015260208101905062000f9f565b8381111562000fcc576000848401525b50505050565b6000601f19601f8301169050919050565b600062000ff08262000f80565b62000ffc818562000f8b565b93506200100e81856020860162000f9c565b620010198162000fd2565b840191505092915050565b60006060820190506200103b600083018662000bf6565b6200104a602083018562000bf6565b81810360408301526200105e818462000fe3565b9050949350505050565b600081905092915050565b6000620010808262000f80565b6200108c818562001068565b93506200109e81856020860162000f9c565b80840191505092915050565b6000620010b8828562001073565b9150620010c6828462001073565b9150819050939250505056fe608060405260405162000eaa38038062000eaa833981810160405281019062000029919062000450565b8282826200003e83826200005b60201b60201c565b6200004f826200019060201b60201c565b50505050505062000531565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a36000825111156200018b5760008373ffffffffffffffffffffffffffffffffffffffff168360405162000132919062000518565b600060405180830381855af49150503d80600081146200016f576040519150601f19603f3d011682016040523d82523d6000602084013e62000174565b606091505b505090508062000189573d806000803e806000fd5b505b505050565b6000620001a26200022560201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200028f8262000262565b9050919050565b620002a18162000282565b8114620002ad57600080fd5b50565b600081519050620002c18162000296565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200031c82620002d1565b810181811067ffffffffffffffff821117156200033e576200033d620002e2565b5b80604052505050565b6000620003536200024e565b905062000361828262000311565b919050565b600067ffffffffffffffff821115620003845762000383620002e2565b5b6200038f82620002d1565b9050602081019050919050565b60005b83811015620003bc5780820151818401526020810190506200039f565b83811115620003cc576000848401525b50505050565b6000620003e9620003e38462000366565b62000347565b905082815260208101848484011115620004085762000407620002cc565b5b620004158482856200039c565b509392505050565b600082601f830112620004355762000434620002c7565b5b815162000447848260208601620003d2565b91505092915050565b6000806000606084860312156200046c576200046b62000258565b5b60006200047c86828701620002b0565b93505060206200048f86828701620002b0565b925050604084015167ffffffffffffffff811115620004b357620004b26200025d565b5b620004c1868287016200041d565b9150509250925092565b600081519050919050565b600081905092915050565b6000620004ee82620004cb565b620004fa8185620004d6565b93506200050c8185602086016200039c565b80840191505092915050565b6000620005268284620004e1565b915081905092915050565b61096980620005416000396000f3fe6080604052600436106100435760003560e01c806301ffc9a71461005c5780633659cfe6146100995780633e47158c146100c25780634f1ef286146100ed57610052565b3661005257610050610109565b005b61005a610109565b005b34801561006857600080fd5b50610083600480360381019061007e91906105c5565b610152565b604051610090919061060d565b60405180910390f35b3480156100a557600080fd5b506100c060048036038101906100bb9190610686565b6102a3565b005b3480156100ce57600080fd5b506100d7610334565b6040516100e491906106c2565b60405180910390f35b61010760048036038101906101029190610742565b610343565b005b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461014d57816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101ad5750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101bb576001905061029e565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036101f1576000905061029e565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b815260040161025091906107b1565b602060405180830381865afa92505050801561028a57506040513d601f19601f8201168201806040525081019061028791906107f8565b60015b61029857600091505061029e565b80925050505b919050565b6102ab61040b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030f90610882565b60405180910390fd5b6103318160405180602001604052806000815250610434565b50565b600061033e61040b565b905090565b61034b61040b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103af90610882565b60405180910390fd5b6104068383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610434565b505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561055e5760008373ffffffffffffffffffffffffffffffffffffffff1683604051610508919061091c565b600060405180830381855af49150503d8060008114610543576040519150601f19603f3d011682016040523d82523d6000602084013e610548565b606091505b505090508061055c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6105a28161056d565b81146105ad57600080fd5b50565b6000813590506105bf81610599565b92915050565b6000602082840312156105db576105da610563565b5b60006105e9848285016105b0565b91505092915050565b60008115159050919050565b610607816105f2565b82525050565b600060208201905061062260008301846105fe565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061065382610628565b9050919050565b61066381610648565b811461066e57600080fd5b50565b6000813590506106808161065a565b92915050565b60006020828403121561069c5761069b610563565b5b60006106aa84828501610671565b91505092915050565b6106bc81610648565b82525050565b60006020820190506106d760008301846106b3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610702576107016106dd565b5b8235905067ffffffffffffffff81111561071f5761071e6106e2565b5b60208301915083600182028301111561073b5761073a6106e7565b5b9250929050565b60008060006040848603121561075b5761075a610563565b5b600061076986828701610671565b935050602084013567ffffffffffffffff81111561078a57610789610568565b5b610796868287016106ec565b92509250509250925092565b6107ab8161056d565b82525050565b60006020820190506107c660008301846107a2565b92915050565b6107d5816105f2565b81146107e057600080fd5b50565b6000815190506107f2816107cc565b92915050565b60006020828403121561080e5761080d610563565b5b600061081c848285016107e3565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b600061086c600e83610825565b915061087782610836565b602082019050919050565b6000602082019050818103600083015261089b8161085f565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156108d65780820151818401526020810190506108bb565b838111156108e5576000848401525b50505050565b60006108f6826108a2565b61090081856108ad565b93506109108185602086016108b8565b80840191505092915050565b600061092882846108eb565b91508190509291505056fea26469706673582212206e91ee918eaf2d72006259ead94f89e030de6bc632993a508e2fef49a677f85c64736f6c634300080e0033a2646970667358221220a86b6d2e1229f333577eec3bcf9d70648b3925768ef88eae26abce869aba87f964736f6c634300080e0033"; -type OpsProxyFactoryConstructorParams = +type AutomateProxyFactoryConstructorParams = | [signer?: Signer] | ConstructorParameters; const isSuperArgs = ( - xs: OpsProxyFactoryConstructorParams + xs: AutomateProxyFactoryConstructorParams ): xs is ConstructorParameters => xs.length > 1; -export class OpsProxyFactory__factory extends ContractFactory { - constructor(...args: OpsProxyFactoryConstructorParams) { +export class AutomateProxyFactory__factory extends ContractFactory { + constructor(...args: AutomateProxyFactoryConstructorParams) { if (isSuperArgs(args)) { super(...args); } else { @@ -259,12 +259,12 @@ export class OpsProxyFactory__factory extends ContractFactory { _ops: string, _implementation: string, overrides?: Overrides & { from?: string | Promise } - ): Promise { + ): Promise { return super.deploy( _ops, _implementation, overrides || {} - ) as Promise; + ) as Promise; } override getDeployTransaction( _ops: string, @@ -273,22 +273,26 @@ export class OpsProxyFactory__factory extends ContractFactory { ): TransactionRequest { return super.getDeployTransaction(_ops, _implementation, overrides || {}); } - override attach(address: string): OpsProxyFactory { - return super.attach(address) as OpsProxyFactory; + override attach(address: string): AutomateProxyFactory { + return super.attach(address) as AutomateProxyFactory; } - override connect(signer: Signer): OpsProxyFactory__factory { - return super.connect(signer) as OpsProxyFactory__factory; + override connect(signer: Signer): AutomateProxyFactory__factory { + return super.connect(signer) as AutomateProxyFactory__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; - static createInterface(): OpsProxyFactoryInterface { - return new utils.Interface(_abi) as OpsProxyFactoryInterface; + static createInterface(): AutomateProxyFactoryInterface { + return new utils.Interface(_abi) as AutomateProxyFactoryInterface; } static connect( address: string, signerOrProvider: Signer | Provider - ): OpsProxyFactory { - return new Contract(address, _abi, signerOrProvider) as OpsProxyFactory; + ): AutomateProxyFactory { + return new Contract( + address, + _abi, + signerOrProvider + ) as AutomateProxyFactory; } } diff --git a/src/contracts/types/factories/Ops__factory.ts b/src/contracts/types/factories/Automate__factory.ts similarity index 98% rename from src/contracts/types/factories/Ops__factory.ts rename to src/contracts/types/factories/Automate__factory.ts index 083beef..7f7cc8b 100644 --- a/src/contracts/types/factories/Ops__factory.ts +++ b/src/contracts/types/factories/Automate__factory.ts @@ -3,7 +3,7 @@ /* eslint-disable */ import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { Ops, OpsInterface } from "../Ops"; +import type { Automate, AutomateInterface } from "../Automate"; const _abi = [ { @@ -351,16 +351,16 @@ const _abi = [ const _bytecode = "0x60c06040523480156200001157600080fd5b5060405162004c9338038062004c9383398181016040528101906200003791906200016c565b818073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250505050620001b3565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000db82620000ae565b9050919050565b620000ed81620000ce565b8114620000f957600080fd5b50565b6000815190506200010d81620000e2565b92915050565b60006200012082620000ae565b9050919050565b6000620001348262000113565b9050919050565b620001468162000127565b81146200015257600080fd5b50565b60008151905062000166816200013b565b92915050565b60008060408385031215620001865762000185620000a9565b5b60006200019685828601620000fc565b9250506020620001a98582860162000155565b9150509250929050565b60805160a051614aac620001e7600039600081816108bb01526112f10152600081816104e901526106cd0152614aac6000f3fe608060405234801561001057600080fd5b50600436106100f95760003560e01c8063813785e611610097578063cd3d4fb911610066578063cd3d4fb9146102b8578063ddca3f43146102e8578063e60a321314610306578063ee8ca3b514610324576100fa565b8063813785e614610230578063ad558ab91461024c578063b810c63614610268578063b81cd86614610287576100fa565b806354fd4d50116100d357806354fd4d50146101a6578063573ea575146101c4578063647846a5146101e25780636d2dd29f14610200576100fa565b80630407145c146101165780632e6e0bd0146101465780633323b46714610176576100fa565b5b60003660606101098383610340565b9050915050805190602001f35b610130600480360381019061012b9190612d2f565b6103a8565b60405161013d9190612e24565b60405180910390f35b610160600480360381019061015b9190612e72565b6103fe565b60405161016d9190612eae565b60405180910390f35b610190600480360381019061018b9190612f52565b610431565b60405161019d9190613005565b60405180910390f35b6101ae6104ae565b6040516101bb91906130b9565b60405180910390f35b6101cc6104e7565b6040516101d991906130fc565b60405180910390f35b6101ea61050b565b6040516101f79190612eae565b60405180910390f35b61021a60048036038101906102159190612e72565b610531565b6040516102279190612eae565b60405180910390f35b61024a600480360381019061024591906131c3565b610564565b005b610266600480360381019061026191906133e2565b6106cb565b005b6102706107f3565b60405161027e9291906134df565b60405180910390f35b6102a1600480360381019061029c9190612e72565b610824565b6040516102af929190613533565b60405180910390f35b6102d260048036038101906102cd9190613581565b610880565b6040516102df9190612eae565b60405180910390f35b6102f06108b3565b6040516102fd91906135ae565b60405180910390f35b61030e6108b9565b60405161031b9190613628565b60405180910390f35b61033e60048036038101906103399190612e72565b6108dd565b005b6060600061034e84846108fb565b9050600080600080610361858989610a71565b935093509350935060006103783386868686610c39565b90508060405160200161038b9190613664565b604051602081830303815290604052965050505050505092915050565b606060006103f3600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020610db7565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008061044033886006610dcc565b80985081925050506104a2818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508761049c906138b5565b87610c39565b91505095945050505050565b6040518060400160405280600181526020017f350000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61056c610f95565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d090613914565b60405180910390fd5b600084849050905060005b818110156106c3578383828181106105ff576105fe613934565b5b90506020020160208101906106149190612d2f565b6006600088888581811061062b5761062a613934565b5b90506020020160208101906106409190613581565b600481111561065257610651613963565b5b600481111561066457610663613963565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806106bb906139c1565b9150506105e4565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075090613a55565b60405180910390fd5b600061078689896107698a610fbe565b89610773906138b5565b8761077e5788610781565b60005b611137565b90506107e8818a8a8a8a806000019061079f9190613a84565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508a8a8a8a6111f7565b505050505050505050565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006108eb82336006611425565b90506108f781836115e2565b5050565b600060188383600381811061091357610912613934565b5b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108484600281811061097657610975613934565b5b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008858560018181106109d9576109d8613934565b5b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c85856000818110610a3a57610a39613934565b5b9050013560f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916171717905092915050565b60006060610a7d612ca3565b6000638b92696a60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610afb57610ae686866004908092610ae193929190613af1565b611701565b80945081955082965083975050505050610c30565b63b9f45adb60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610b7757610b6286866004908092610b5d93929190613af1565b6118a8565b80945081955082965083975050505050610c2f565b63a873882560e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191603610bf357610bde86866004908092610bd993929190613af1565b611a4f565b80945081955082965083975050505050610c2e565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2590613b9e565b60405180910390fd5b5b5b93509350935093565b6000610c508686610c4987610fbe565b8686611137565b9050610ca381600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c1390919063ffffffff16565b15610ce3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cda90613c0a565b60405180910390fd5b610cf281878787876006611c2a565b610d4381600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611dfc90919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d878787604051610da693929190613ec6565b60405180910390a495945050505050565b6060610dc582600001611e13565b9050919050565b6000806000600480811115610de457610de3613963565b5b905060005b818111610f85576000816004811115610e0557610e04613963565b5b9050610e22816004811115610e1d57610e1c613963565b5b611e6f565b610e2c5750610f72565b6000866000836004811115610e4457610e43613963565b5b6004811115610e5657610e55613963565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610e9081611eb0565b60006376474e6a60e01b8a8a604051602401610ead929190613f0b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000610f4e83836040518060400160405280601381526020017f4f70732e7072654372656174655461736b3a2000000000000000000000000000815250611f22565b91505080806020019051810190610f659190613f60565b809b50819c505050505050505b8080610f7d906139c1565b915050610de9565b5085859250925050935093915050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000601882600381518110610fd657610fd5613934565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061103a57611039613934565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60088460018151811061109e5761109d613934565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c84600081518110611100576110ff613934565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60006111468360000151611fac565b156111bc576000611175846020015160008151811061116857611167613934565b5b60200260200101516120bd565b90506111b4878787600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161487866120ce565b9150506111ee565b85858585856040516020016111d5959493929190613fdb565b6040516020818303038152906040528051906020012090505b95945050505050565b61124889600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c1390919063ffffffff16565b611287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127e90614081565b60405180910390fd5b816112d5578360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b60006112e78a8a8a8a8a87600661210d565b90508215611383577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a3f1233e8a86886040518463ffffffff1660e01b815260040161134c939291906140a1565b600060405180830381600087803b15801561136657600080fd5b505af115801561137a573d6000803e3d6000fd5b505050506113af565b600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b8773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a8e86604051611411939291906140e7565b60405180910390a450505050505050505050565b60008060048081111561143b5761143a613963565b5b905060005b8181116115d657600081600481111561145c5761145b613963565b5b905061147981600481111561147457611473613963565b5b6121b5565b61148357506115c3565b600085600083600481111561149b5761149a613963565b5b60048111156114ad576114ac613963565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506114e781611eb0565b60006314ae992660e01b8989604051602401611504929190614125565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006115a583836040518060400160405280601381526020017f4f70732e70726543616e63656c5461736b3a2000000000000000000000000000815250611f22565b915050808060200190518101906115bc919061414e565b9850505050505b80806115ce906139c1565b915050611440565b50839150509392505050565b61163381600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c1390919063ffffffff16565b611672576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611669906141c7565b60405180910390fd5b6116c381600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061222690919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0981836040516116f5929190614125565b60405180910390a15050565b6000606061170d612ca3565b6000806000606088888101906117239190614228565b809450819550829650839a50505050506000600167ffffffffffffffff8111156117505761174f613249565b5b60405190808252806020026020018201604052801561177e5781602001602082028036833780820191505090505b50905060008160008151811061179757611796613934565b5b602002602001019060048111156117b1576117b0613963565b5b908160048111156117c5576117c4613963565b5b815250506000600167ffffffffffffffff8111156117e6576117e5613249565b5b60405190808252806020026020018201604052801561181957816020015b60608152602001906001900390816118045790505b509050838360405160200161182f9291906142ab565b6040516020818303038152906040528160008151811061185257611851613934565b5b602002602001018190525060405180604001604052808381526020018281525096508460405160200161188591906142fc565b604051602081830303815290604052975060009550505050505092959194509250565b600060606118b4612ca3565b6000806000606088888101906118ca9190614317565b809850819550829650839750849b5050505050506000600167ffffffffffffffff8111156118fb576118fa613249565b5b6040519080825280602002602001820160405280156119295781602001602082028036833780820191505090505b50905060008160008151811061194257611941613934565b5b6020026020010190600481111561195c5761195b613963565b5b908160048111156119705761196f613963565b5b815250506000600167ffffffffffffffff81111561199157611990613249565b5b6040519080825280602002602001820160405280156119c457816020015b60608152602001906001900390816119af5790505b50905083836040516020016119da9291906142ab565b604051602081830303815290604052816000815181106119fd576119fc613934565b5b6020026020010181905250604051806040016040528083815260200182815250965084604051602001611a3091906142fc565b6040516020818303038152906040529750505050505092959194509250565b60006060611a5b612ca3565b6000606080611a6a888861223d565b809550819650829750839950849a5050505050506000600267ffffffffffffffff811115611a9b57611a9a613249565b5b604051908082528060200260200182016040528015611ac95781602001602082028036833780820191505090505b509050600081600081518110611ae257611ae1613934565b5b60200260200101906004811115611afc57611afb613963565b5b90816004811115611b1057611b0f613963565b5b81525050600181600181518110611b2a57611b29613934565b5b60200260200101906004811115611b4457611b43613963565b5b90816004811115611b5857611b57613963565b5b815250506000600267ffffffffffffffff811115611b7957611b78613249565b5b604051908082528060200260200182016040528015611bac57816020015b6060815260200190600190039081611b975790505b5090508381600081518110611bc457611bc3613934565b5b60200260200101819052508281600181518110611be457611be3613934565b5b602002602001018190525060405180604001604052808381526020018281525095505050505092959194509250565b6000611c228360000183612303565b905092915050565b60008260000151519050611c42818460000151612326565b60005b81811015611df257600084600001518281518110611c6657611c65613934565b5b60200260200101519050611c8b816004811115611c8657611c85613963565b5b612405565b611c955750611ddf565b6000846000836004811115611cad57611cac613963565b5b6004811115611cbf57611cbe613963565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611cf981611eb0565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611d1e57611d1d613934565b5b6020026020010151604051602401611d3a9594939291906143ae565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611dd982826040518060400160405280601281526020017f4f70732e6f6e4372656174655461736b3a200000000000000000000000000000815250611f22565b50505050505b8080611dea906139c1565b915050611c45565b5050505050505050565b6000611e0b8360000183612476565b905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611e6357602002820191906000526020600020905b815481526020019060010190808311611e4f575b50505050509050919050565b600060026004811115611e8557611e84613963565b5b826004811115611e9857611e97613963565b5b03611ea65760019050611eab565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f169061445b565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611f4b91906144b7565b600060405180830381855af49150503d8060008114611f86576040519150601f19603f3d011682016040523d82523d6000602084013e611f8b565b606091505b50809250819350505081611fa457611fa381846124e6565b5b935093915050565b60008082519050600181148015612002575060006004811115611fd257611fd1613963565b5b83600081518110611fe657611fe5613934565b5b6020026020010151600481111561200057611fff613963565b5b145b806120a3575060028114801561205757506000600481111561202757612026613963565b5b8360008151811061203b5761203a613934565b5b6020026020010151600481111561205557612054613963565b5b145b80156120a257506001600481111561207257612071613963565b5b8360018151811061208657612085613934565b5b602002602001015160048111156120a05761209f613963565b5b145b5b156120b25760019150506120b8565b60009150505b919050565b600081805190602001209050919050565b60008686868686866040516020016120eb969594939291906144ce565b6040516020818303038152906040528051906020012090509695505050505050565b60008061211a858461264d565b905061212a89898989898661278a565b809750819850505061219687878a604051602001612149929190614577565b6040516020818303038152906040526000876040518060400160405280600a81526020017f4f70732e657865633a20000000000000000000000000000000000000000000008152506128fd565b50809250506121a9898989898986612997565b50979650505050505050565b6000600160048111156121cb576121ca613963565b5b8260048111156121de576121dd613963565b5b148061220e5750600260048111156121f9576121f8613963565b5b82600481111561220c5761220b613963565b5b145b1561221c5760019050612221565b600090505b919050565b60006122358360000183612add565b905092915050565b6000606060006060806000806000806000806000808e8e81019061226191906145cb565b97509750975097509750975097509750858560405160200161228391906142fc565b6040516020818303038152906040528261229d57836122a0565b60005b93508386866040516020016122b69291906142ab565b6040516020818303038152906040528b8b6040516020016122d8929190613533565b6040516020818303038152906040529c509c509c509c509c5050505050505050509295509295909350565b600080836001016000848152602001908152602001600020541415905092915050565b60018211156124015760005b60018361233f919061469d565b8110156123ff5781818151811061235957612358613934565b5b6020026020010151600481111561237357612372613963565b5b8260018361238191906146d1565b8151811061239257612391613934565b5b602002602001015160048111156123ac576123ab613963565b5b116123ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e390614773565b60405180910390fd5b80806123f7906139c1565b915050612332565b505b5050565b60006001600481111561241b5761241a613963565b5b82600481111561242e5761242d613963565b5b148061245e57506002600481111561244957612448613963565b5b82600481111561245c5761245b613963565b5b145b1561246c5760019050612471565b600090505b919050565b60006124828383612303565b6124db5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506124e0565b600090505b92915050565b6004602083516124f691906147c2565b036125f1576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361259557604483019250818360405160200161254a92919061482f565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258c91906130b9565b60405180910390fd5b816040516020016125a6919061489f565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e891906130b9565b60405180910390fd5b80604051602001612602919061490d565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264491906130b9565b60405180910390fd5b606060008351905060008167ffffffffffffffff81111561267157612670613249565b5b60405190808252806020026020018201604052801561269f5781602001602082028036833780820191505090505b50905060005b8281101561277e578460008783815181106126c3576126c2613934565b5b602002602001015160048111156126dd576126dc613963565b5b60048111156126ef576126ee613963565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061273157612730613934565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080612776906139c1565b9150506126a5565b50809250505092915050565b6000606060008451905060005b818110156128ea576127d48682815181106127b5576127b4613934565b5b602002602001015160048111156127cf576127ce613963565b5b612bf1565b156128d757600063c10304f760e01b8b8b8b8b6040516024016127fa949392919061492f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006128b587848151811061287157612870613934565b5b6020026020010151836040518060400160405280601181526020017f4f70732e7072654578656343616c6c3a20000000000000000000000000000000815250611f22565b915050808060200190518101906128cc91906149eb565b809a50819b50505050505b80806128e2906139c1565b915050612797565b5086869250925050965096945050505050565b600060608673ffffffffffffffffffffffffffffffffffffffff16858760405161292791906144b7565b60006040518083038185875af1925050503d8060008114612964576040519150601f19603f3d011682016040523d82523d6000602084013e612969565b606091505b5080925081935050508115801561297d5750835b1561298d5761298c81846124e6565b5b9550959350505050565b60008151905060005b81811015612ad3576129dd8482815181106129be576129bd613934565b5b602002602001015160048111156129d8576129d7613963565b5b612c62565b15612ac057600063b2db0b4160e01b89898989604051602401612a03949392919061492f565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050612abc848381518110612a7857612a77613934565b5b6020026020010151826040518060400160405280601281526020017f4f70732e706f73744578656343616c6c3a200000000000000000000000000000815250611f22565b5050505b8080612acb906139c1565b9150506129a0565b5050505050505050565b60008083600101600084815260200190815260200160002054905060008114612be5576000600182612b0f919061469d565b9050600060018660000180549050612b27919061469d565b9050818114612b96576000866000018281548110612b4857612b47613934565b5b9060005260206000200154905080876000018481548110612b6c57612b6b613934565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612baa57612ba9614a47565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612beb565b60009150505b92915050565b600060016004811115612c0757612c06613963565b5b826004811115612c1a57612c19613963565b5b1480612c4a575060026004811115612c3557612c34613963565b5b826004811115612c4857612c47613963565b5b145b15612c585760019050612c5d565b600090505b919050565b600060036004811115612c7857612c77613963565b5b826004811115612c8b57612c8a613963565b5b03612c995760019050612c9e565b600090505b919050565b604051806040016040528060608152602001606081525090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612cfc82612cd1565b9050919050565b612d0c81612cf1565b8114612d1757600080fd5b50565b600081359050612d2981612d03565b92915050565b600060208284031215612d4557612d44612cc7565b5b6000612d5384828501612d1a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612d9b81612d88565b82525050565b6000612dad8383612d92565b60208301905092915050565b6000602082019050919050565b6000612dd182612d5c565b612ddb8185612d67565b9350612de683612d78565b8060005b83811015612e17578151612dfe8882612da1565b9750612e0983612db9565b925050600181019050612dea565b5085935050505092915050565b60006020820190508181036000830152612e3e8184612dc6565b905092915050565b612e4f81612d88565b8114612e5a57600080fd5b50565b600081359050612e6c81612e46565b92915050565b600060208284031215612e8857612e87612cc7565b5b6000612e9684828501612e5d565b91505092915050565b612ea881612cf1565b82525050565b6000602082019050612ec36000830184612e9f565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112612eee57612eed612ec9565b5b8235905067ffffffffffffffff811115612f0b57612f0a612ece565b5b602083019150836001820283011115612f2757612f26612ed3565b5b9250929050565b600080fd5b600060408284031215612f4957612f48612f2e565b5b81905092915050565b600080600080600060808688031215612f6e57612f6d612cc7565b5b6000612f7c88828901612d1a565b955050602086013567ffffffffffffffff811115612f9d57612f9c612ccc565b5b612fa988828901612ed8565b9450945050604086013567ffffffffffffffff811115612fcc57612fcb612ccc565b5b612fd888828901612f33565b9250506060612fe988828901612d1a565b9150509295509295909350565b612fff81612d88565b82525050565b600060208201905061301a6000830184612ff6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561305a57808201518184015260208101905061303f565b83811115613069576000848401525b50505050565b6000601f19601f8301169050919050565b600061308b82613020565b613095818561302b565b93506130a581856020860161303c565b6130ae8161306f565b840191505092915050565b600060208201905081810360008301526130d38184613080565b905092915050565b60006130e682612cd1565b9050919050565b6130f6816130db565b82525050565b600060208201905061311160008301846130ed565b92915050565b60008083601f84011261312d5761312c612ec9565b5b8235905067ffffffffffffffff81111561314a57613149612ece565b5b60208301915083602082028301111561316657613165612ed3565b5b9250929050565b60008083601f84011261318357613182612ec9565b5b8235905067ffffffffffffffff8111156131a05761319f612ece565b5b6020830191508360208202830111156131bc576131bb612ed3565b5b9250929050565b600080600080604085870312156131dd576131dc612cc7565b5b600085013567ffffffffffffffff8111156131fb576131fa612ccc565b5b61320787828801613117565b9450945050602085013567ffffffffffffffff81111561322a57613229612ccc565b5b6132368782880161316d565b925092505092959194509250565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6132818261306f565b810181811067ffffffffffffffff821117156132a05761329f613249565b5b80604052505050565b60006132b3612cbd565b90506132bf8282613278565b919050565b600067ffffffffffffffff8211156132df576132de613249565b5b6132e88261306f565b9050602081019050919050565b82818337600083830152505050565b6000613317613312846132c4565b6132a9565b90508281526020810184848401111561333357613332613244565b5b61333e8482856132f5565b509392505050565b600082601f83011261335b5761335a612ec9565b5b813561336b848260208601613304565b91505092915050565b6000819050919050565b61338781613374565b811461339257600080fd5b50565b6000813590506133a48161337e565b92915050565b60008115159050919050565b6133bf816133aa565b81146133ca57600080fd5b50565b6000813590506133dc816133b6565b92915050565b600080600080600080600080610100898b03121561340357613402612cc7565b5b60006134118b828c01612d1a565b98505060206134228b828c01612d1a565b975050604089013567ffffffffffffffff81111561344357613442612ccc565b5b61344f8b828c01613346565b965050606089013567ffffffffffffffff8111156134705761346f612ccc565b5b61347c8b828c01612f33565b955050608061348d8b828c01613395565b94505060a061349e8b828c01612d1a565b93505060c06134af8b828c016133cd565b92505060e06134c08b828c016133cd565b9150509295985092959890939650565b6134d981613374565b82525050565b60006040820190506134f460008301856134d0565b6135016020830184612e9f565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61352d81613508565b82525050565b60006040820190506135486000830185613524565b6135556020830184613524565b9392505050565b6005811061356957600080fd5b50565b60008135905061357b8161355c565b92915050565b60006020828403121561359757613596612cc7565b5b60006135a58482850161356c565b91505092915050565b60006020820190506135c360008301846134d0565b92915050565b6000819050919050565b60006135ee6135e96135e484612cd1565b6135c9565b612cd1565b9050919050565b6000613600826135d3565b9050919050565b6000613612826135f5565b9050919050565b61362281613607565b82525050565b600060208201905061363d6000830184613619565b92915050565b6000819050919050565b61365e61365982612d88565b613643565b82525050565b6000613670828461364d565b60208201915081905092915050565b600080fd5b600080fd5b600067ffffffffffffffff8211156136a4576136a3613249565b5b602082029050602081019050919050565b60006136c86136c384613689565b6132a9565b905080838252602082019050602084028301858111156136eb576136ea612ed3565b5b835b818110156137145780613700888261356c565b8452602084019350506020810190506136ed565b5050509392505050565b600082601f83011261373357613732612ec9565b5b81356137438482602086016136b5565b91505092915050565b600067ffffffffffffffff82111561376757613766613249565b5b602082029050602081019050919050565b600061378b6137868461374c565b6132a9565b905080838252602082019050602084028301858111156137ae576137ad612ed3565b5b835b818110156137f557803567ffffffffffffffff8111156137d3576137d2612ec9565b5b8086016137e08982613346565b855260208501945050506020810190506137b0565b5050509392505050565b600082601f83011261381457613813612ec9565b5b8135613824848260208601613778565b91505092915050565b6000604082840312156138435761384261367f565b5b61384d60406132a9565b9050600082013567ffffffffffffffff81111561386d5761386c613684565b5b6138798482850161371e565b600083015250602082013567ffffffffffffffff81111561389d5761389c613684565b5b6138a9848285016137ff565b60208301525092915050565b60006138c1368361382d565b9050919050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b60006138fe600e8361302b565b9150613909826138c8565b602082019050919050565b6000602082019050818103600083015261392d816138f1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006139cc82613374565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036139fe576139fd613992565b5b600182019050919050565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b6000613a3f60178361302b565b9150613a4a82613a09565b602082019050919050565b60006020820190508181036000830152613a6e81613a32565b9050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613aa157613aa0613a75565b5b80840192508235915067ffffffffffffffff821115613ac357613ac2613a7a565b5b602083019250602082023603831315613adf57613ade613a7f565b5b509250929050565b600080fd5b600080fd5b60008085851115613b0557613b04613ae7565b5b83861115613b1657613b15613aec565b5b6001850283019150848603905094509492505050565b7f4f70732e6372656174655461736b3a2046756e6374696f6e206e6f7420666f7560008201527f6e64000000000000000000000000000000000000000000000000000000000000602082015250565b6000613b8860228361302b565b9150613b9382613b2c565b604082019050919050565b60006020820190508181036000830152613bb781613b7b565b9050919050565b7f4f70732e6372656174655461736b3a204475706c6963617465207461736b0000600082015250565b6000613bf4601e8361302b565b9150613bff82613bbe565b602082019050919050565b60006020820190508181036000830152613c2381613be7565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613c5182613c2a565b613c5b8185613c35565b9350613c6b81856020860161303c565b613c748161306f565b840191505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60058110613cbc57613cbb613963565b5b50565b6000819050613ccd82613cab565b919050565b6000613cdd82613cbf565b9050919050565b613ced81613cd2565b82525050565b6000613cff8383613ce4565b60208301905092915050565b6000602082019050919050565b6000613d2382613c7f565b613d2d8185613c8a565b9350613d3883613c9b565b8060005b83811015613d69578151613d508882613cf3565b9750613d5b83613d0b565b925050600181019050613d3c565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613dbe82613c2a565b613dc88185613da2565b9350613dd881856020860161303c565b613de18161306f565b840191505092915050565b6000613df88383613db3565b905092915050565b6000602082019050919050565b6000613e1882613d76565b613e228185613d81565b935083602082028501613e3485613d92565b8060005b85811015613e705784840389528151613e518582613dec565b9450613e5c83613e00565b925060208a01995050600181019050613e38565b50829750879550505050505092915050565b60006040830160008301518482036000860152613e9f8282613d18565b91505060208301518482036020860152613eb98282613e0d565b9150508091505092915050565b60006060820190508181036000830152613ee08186613c46565b90508181036020830152613ef48185613e82565b9050613f036040830184612e9f565b949350505050565b6000604082019050613f206000830185612e9f565b613f2d6020830184612e9f565b9392505050565b613f3d816130db565b8114613f4857600080fd5b50565b600081519050613f5a81613f34565b92915050565b60008060408385031215613f7757613f76612cc7565b5b6000613f8585828601613f4b565b9250506020613f9685828601613f4b565b9150509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613fd581613fa0565b82525050565b600060a082019050613ff06000830188612e9f565b613ffd6020830187612e9f565b61400a6040830186613fcc565b818103606083015261401c8185613e82565b905061402b6080830184612e9f565b9695505050505050565b7f4f70732e657865633a205461736b206e6f7420666f756e640000000000000000600082015250565b600061406b60188361302b565b915061407682614035565b602082019050919050565b6000602082019050818103600083015261409a8161405e565b9050919050565b60006060820190506140b66000830186612e9f565b6140c36020830185612e9f565b6140d060408301846134d0565b949350505050565b6140e1816133aa565b82525050565b600060608201905081810360008301526141018186613c46565b90506141106020830185612ff6565b61411d60408301846140d8565b949350505050565b600060408201905061413a6000830185612ff6565b6141476020830184612e9f565b9392505050565b60006020828403121561416457614163612cc7565b5b600061417284828501613f4b565b91505092915050565b7f4f70732e63616e63656c5461736b3a205461736b206e6f7420666f756e640000600082015250565b60006141b1601e8361302b565b91506141bc8261417b565b602082019050919050565b600060208201905081810360008301526141e0816141a4565b9050919050565b6000813590506141f681613f34565b92915050565b61420581613fa0565b811461421057600080fd5b50565b600081359050614222816141fc565b92915050565b6000806000806080858703121561424257614241612cc7565b5b6000614250878288016141e7565b945050602061426187828801614213565b9350506040614272878288016141e7565b925050606085013567ffffffffffffffff81111561429357614292612ccc565b5b61429f87828801613346565b91505092959194509250565b60006040820190506142c06000830185612e9f565b81810360208301526142d28184613c46565b90509392505050565b6000819050919050565b6142f66142f182613fa0565b6142db565b82525050565b600061430882846142e5565b60048201915081905092915050565b600080600080600060a0868803121561433357614332612cc7565b5b6000614341888289016141e7565b955050602061435288828901614213565b9450506040614363888289016141e7565b935050606086013567ffffffffffffffff81111561438457614383612ccc565b5b61439088828901613346565b92505060806143a1888289016141e7565b9150509295509295909350565b600060a0820190506143c36000830188612ff6565b6143d06020830187612e9f565b6143dd6040830186612e9f565b81810360608301526143ef8185613c46565b905081810360808301526144038184613c46565b90509695505050505050565b7f4f70732e5f6d6f64756c65496e697469616c697365643a204e6f7420696e6974600082015250565b600061444560208361302b565b91506144508261440f565b602082019050919050565b6000602082019050818103600083015261447481614438565b9050919050565b600081905092915050565b600061449182613c2a565b61449b818561447b565b93506144ab81856020860161303c565b80840191505092915050565b60006144c38284614486565b915081905092915050565b600060c0820190506144e36000830189612e9f565b6144f06020830188612e9f565b6144fd6040830187613fcc565b61450a60608301866140d8565b6145176080830185612e9f565b61452460a0830184612ff6565b979650505050505050565b60008160601b9050919050565b60006145478261452f565b9050919050565b60006145598261453c565b9050919050565b61457161456c82612cf1565b61454e565b82525050565b60006145838285614486565b915061458f8284614560565b6014820191508190509392505050565b6145a881613508565b81146145b357600080fd5b50565b6000813590506145c58161459f565b92915050565b600080600080600080600080610100898b0312156145ec576145eb612cc7565b5b60006145fa8b828c016145b6565b985050602061460b8b828c016145b6565b975050604061461c8b828c016141e7565b965050606061462d8b828c01614213565b955050608061463e8b828c016141e7565b94505060a089013567ffffffffffffffff81111561465f5761465e612ccc565b5b61466b8b828c01613346565b93505060c061467c8b828c016141e7565b92505060e061468d8b828c016133cd565b9150509295985092959890939650565b60006146a882613374565b91506146b383613374565b9250828210156146c6576146c5613992565b5b828203905092915050565b60006146dc82613374565b91506146e783613374565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561471c5761471b613992565b5b828201905092915050565b7f4f70732e5f76616c69644d6f64756c65733a20417363206f6e6c790000000000600082015250565b600061475d601b8361302b565b915061476882614727565b602082019050919050565b6000602082019050818103600083015261478c81614750565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147cd82613374565b91506147d883613374565b9250826147e8576147e7614793565b5b828206905092915050565b600081905092915050565b600061480982613020565b61481381856147f3565b935061482381856020860161303c565b80840191505092915050565b600061483b82856147fe565b915061484782846147fe565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000614889600f836147f3565b915061489482614853565b600f82019050919050565b60006148ab82846147fe565b91506148b68261487c565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b60006148f76014836147f3565b9150614902826148c1565b601482019050919050565b600061491982846147fe565b9150614924826148ea565b915081905092915050565b60006080820190506149446000830187612ff6565b6149516020830186612e9f565b61495e6040830185612e9f565b81810360608301526149708184613c46565b905095945050505050565b600061498e614989846132c4565b6132a9565b9050828152602081018484840111156149aa576149a9613244565b5b6149b584828561303c565b509392505050565b600082601f8301126149d2576149d1612ec9565b5b81516149e284826020860161497b565b91505092915050565b60008060408385031215614a0257614a01612cc7565b5b6000614a1085828601613f4b565b925050602083015167ffffffffffffffff811115614a3157614a30612ccc565b5b614a3d858286016149bd565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220ea893b16becfac1f61e01881f488d565c4c42ff9d21be0a103e43507fa4f87e864736f6c634300080e0033"; -type OpsConstructorParams = +type AutomateConstructorParams = | [signer?: Signer] | ConstructorParameters; const isSuperArgs = ( - xs: OpsConstructorParams + xs: AutomateConstructorParams ): xs is ConstructorParameters => xs.length > 1; -export class Ops__factory extends ContractFactory { - constructor(...args: OpsConstructorParams) { +export class Automate__factory extends ContractFactory { + constructor(...args: AutomateConstructorParams) { if (isSuperArgs(args)) { super(...args); } else { @@ -372,12 +372,12 @@ export class Ops__factory extends ContractFactory { _gelato: string, _taskTreasury: string, overrides?: Overrides & { from?: string | Promise } - ): Promise { + ): Promise { return super.deploy( _gelato, _taskTreasury, overrides || {} - ) as Promise; + ) as Promise; } override getDeployTransaction( _gelato: string, @@ -386,19 +386,22 @@ export class Ops__factory extends ContractFactory { ): TransactionRequest { return super.getDeployTransaction(_gelato, _taskTreasury, overrides || {}); } - override attach(address: string): Ops { - return super.attach(address) as Ops; + override attach(address: string): Automate { + return super.attach(address) as Automate; } - override connect(signer: Signer): Ops__factory { - return super.connect(signer) as Ops__factory; + override connect(signer: Signer): Automate__factory { + return super.connect(signer) as Automate__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; - static createInterface(): OpsInterface { - return new utils.Interface(_abi) as OpsInterface; + static createInterface(): AutomateInterface { + return new utils.Interface(_abi) as AutomateInterface; } - static connect(address: string, signerOrProvider: Signer | Provider): Ops { - return new Contract(address, _abi, signerOrProvider) as Ops; + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Automate { + return new Contract(address, _abi, signerOrProvider) as Automate; } } diff --git a/src/contracts/types/factories/index.ts b/src/contracts/types/factories/index.ts index ce95c66..973f8d5 100644 --- a/src/contracts/types/factories/index.ts +++ b/src/contracts/types/factories/index.ts @@ -1,7 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export { Automate__factory } from "./Automate__factory"; +export { AutomateProxyFactory__factory } from "./AutomateProxyFactory__factory"; export { Forwarder__factory } from "./Forwarder__factory"; -export { Ops__factory } from "./Ops__factory"; -export { OpsProxyFactory__factory } from "./OpsProxyFactory__factory"; export { ProxyModule__factory } from "./ProxyModule__factory"; diff --git a/src/contracts/types/index.ts b/src/contracts/types/index.ts index 3e57cc7..4a1bad0 100644 --- a/src/contracts/types/index.ts +++ b/src/contracts/types/index.ts @@ -1,12 +1,12 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export type { Automate } from "./Automate"; +export type { AutomateProxyFactory } from "./AutomateProxyFactory"; export type { Forwarder } from "./Forwarder"; -export type { Ops } from "./Ops"; -export type { OpsProxyFactory } from "./OpsProxyFactory"; export type { ProxyModule } from "./ProxyModule"; export * as factories from "./factories"; +export { Automate__factory } from "./factories/Automate__factory"; +export { AutomateProxyFactory__factory } from "./factories/AutomateProxyFactory__factory"; export { Forwarder__factory } from "./factories/Forwarder__factory"; -export { Ops__factory } from "./factories/Ops__factory"; -export { OpsProxyFactory__factory } from "./factories/OpsProxyFactory__factory"; export { ProxyModule__factory } from "./factories/ProxyModule__factory"; diff --git a/src/index.test.ts b/src/index.test.ts index 88571e7..695edea 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,6 +1,6 @@ import dotenv from "dotenv"; import { ethers } from "ethers"; -import { GelatoOpsSDK } from "./lib"; +import { AutomateSDK } from "./lib"; dotenv.config(); if (!process.env.PK) throw new Error("Missing env PK"); @@ -17,10 +17,10 @@ const main = async () => { const provider = new ethers.providers.JsonRpcProvider(providerUrl); const wallet = new ethers.Wallet(pk as string, provider); - const sdk = new GelatoOpsSDK(chainId, wallet); + const sdk = new AutomateSDK(chainId, wallet); const taskId = await sdk.createTask({ - name: "OpsSdkTest", + name: "AutomateSdkTest", execAddress: iceCreamAddress, execSelector: iceCreamInterface.getSighash("lick"), execData: iceCreamInterface.encodeFunctionData("lick", [1]), diff --git a/src/lib/GelatoOpsModule.ts b/src/lib/AutomateModule.ts similarity index 99% rename from src/lib/GelatoOpsModule.ts rename to src/lib/AutomateModule.ts index 516eba1..4d57417 100644 --- a/src/lib/GelatoOpsModule.ts +++ b/src/lib/AutomateModule.ts @@ -9,7 +9,7 @@ import { TimeParams, } from "../types/Module.interface"; -export class GelatoOpsModule { +export class AutomateModule { public encodeModuleArgs = ( moduleArgsParams: Partial ): ModuleData => { diff --git a/src/lib/GelatoOpsSDK.ts b/src/lib/AutomateSDK.ts similarity index 81% rename from src/lib/GelatoOpsSDK.ts rename to src/lib/AutomateSDK.ts index 6c6017b..cc5997b 100644 --- a/src/lib/GelatoOpsSDK.ts +++ b/src/lib/AutomateSDK.ts @@ -2,11 +2,16 @@ import "ethers"; import { Signer } from "@ethersproject/abstract-signer"; -import { GELATO_ADDRESSES, OPS_TASKS_API, ETH, ZERO_ADD } from "../constants"; import { - Ops, - OpsProxyFactory__factory, - Ops__factory, + GELATO_ADDRESSES, + AUTOMATE_TASKS_API, + ETH, + ZERO_ADD, +} from "../constants"; +import { + Automate, + AutomateProxyFactory__factory, + Automate__factory, ProxyModule__factory, } from "../contracts/types"; import { ContractTransaction, ethers, Overrides, providers } from "ethers"; @@ -17,42 +22,44 @@ import { TaskApiParams, TokenData, } from "../types"; -import axios from "axios"; -import { isGelatoOpsSupported } from "../utils"; +import axios, { Axios } from "axios"; +import { isAutomateSupported } from "../utils"; import { TaskTransaction } from "../types"; import { Module, ModuleData } from "../types/Module.interface"; -import { GelatoOpsModule } from "./GelatoOpsModule"; +import { AutomateModule } from "./AutomateModule"; -export class GelatoOpsSDK { - private _opsModule: GelatoOpsModule; +export class AutomateSDK { + private _automateModule: AutomateModule; private readonly _chainId: number; private readonly _signer: Signer; - private _ops: Ops; + private _automate: Automate; private _token!: string; + private readonly _taskApi: Axios; private readonly _signatureMessage: string; constructor(chainId: number, signer: Signer, signatureMessage?: string) { - if (!isGelatoOpsSupported(chainId)) { - throw new Error(`Gelato Ops is not available on chainId:${chainId}`); + if (!isAutomateSupported(chainId)) { + throw new Error(`Automate is not available on chainId:${chainId}`); } if (!Signer.isSigner(signer)) { - throw new Error(`Invalid Gelato Ops signer`); + throw new Error(`Invalid Automate signer`); } - this._opsModule = new GelatoOpsModule(); - this._signatureMessage = signatureMessage ?? "Gelato Ops Task"; + this._automateModule = new AutomateModule(); + this._signatureMessage = signatureMessage ?? "Automate Task"; this._chainId = chainId; this._signer = signer; - this._ops = Ops__factory.connect( - GELATO_ADDRESSES[this._chainId].ops, + this._automate = Automate__factory.connect( + GELATO_ADDRESSES[this._chainId].automate, this._signer ); + this._taskApi = axios.create({ baseURL: AUTOMATE_TASKS_API }); } public async getActiveTasks(): Promise { // Retrieve user task ids const address = await this._signer.getAddress(); - const taskIds = await this._ops.getTaskIdsByUser(address); + const taskIds = await this._automate.getTaskIdsByUser(address); return this.getTaskNames(taskIds); } @@ -87,22 +94,24 @@ export class GelatoOpsSDK { address: string; isDeployed: boolean; }> { - const proxyModuleAddress = await this._ops.taskModuleAddresses( + const proxyModuleAddress = await this._automate.taskModuleAddresses( Module.PROXY ); - const opsProxyFactoryAddress = await ProxyModule__factory.connect( + const automateProxyFactoryAddress = await ProxyModule__factory.connect( proxyModuleAddress, this._signer ).opsProxyFactory(); - const opsProxyFactory = OpsProxyFactory__factory.connect( - opsProxyFactoryAddress, + const automateProxyFactory = AutomateProxyFactory__factory.connect( + automateProxyFactoryAddress, this._signer ); const userAddress = await this._signer.getAddress(); - const [address, isDeployed] = await opsProxyFactory.getProxyOf(userAddress); + const [address, isDeployed] = await automateProxyFactory.getProxyOf( + userAddress + ); return { address, isDeployed }; } @@ -185,7 +194,7 @@ export class GelatoOpsSDK { // Ask for signature if (!this._token) await this._requestAndStoreSignature(); - const tx: ContractTransaction = await this._ops.createTask( + const tx: ContractTransaction = await this._automate.createTask( args.execAddress, args.execData ?? args.execSelector, args.moduleData, @@ -203,7 +212,7 @@ export class GelatoOpsSDK { ): CreateTaskOptionsWithModules { args.startTime = args.startTime ?? 0; - const moduleData: ModuleData = this._opsModule.encodeModuleArgs({ + const moduleData: ModuleData = this._automateModule.encodeModuleArgs({ resolverAddress: args.resolverAddress, resolverData: args.resolverData, startTime: args.startTime, @@ -238,7 +247,7 @@ export class GelatoOpsSDK { taskId: string, overrides: Overrides = {} ): Promise { - const tx = await this._ops.cancelTask(taskId, overrides); + const tx = await this._automate.cancelTask(taskId, overrides); return { taskId, tx }; } @@ -270,7 +279,9 @@ export class GelatoOpsSDK { this._token = Buffer.from(JSON.stringify(tokenData)).toString("base64"); // Set Axios headers - axios.defaults.headers.common["Authorization"] = `Bearer ${this._token}`; + this._taskApi.defaults.headers.common[ + "Authorization" + ] = `Bearer ${this._token}`; } private async _setTaskName(taskId: string, name: string): Promise { @@ -312,7 +323,10 @@ export class GelatoOpsSDK { await this._requestAndStoreSignature(); } try { - const response = await axios.post(`${OPS_TASKS_API}${path}`, data); + const response = await this._taskApi.post( + `${AUTOMATE_TASKS_API}${path}`, + data + ); return response.data as Response; } catch (error) { this._logTaskApiError(error); @@ -322,7 +336,7 @@ export class GelatoOpsSDK { private _logTaskApiError(error: Error) { // Task API error are logged but not thrown as they are non blocking - let message = `GelatoOpsSDK - Error naming task: ${error.message} `; + let message = `AutomateSDK - Error naming task: ${error.message} `; if (axios.isAxiosError(error)) { message += error.response?.data?.message; } diff --git a/src/lib/index.ts b/src/lib/index.ts index b2c5dd1..707fa07 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,2 +1,2 @@ -export * from "./GelatoOpsSDK"; -export * from "./GelatoOpsModule"; +export * from "./AutomateSDK"; +export * from "./AutomateModule"; diff --git a/src/types/GelatoAddressBook.interface.ts b/src/types/GelatoAddressBook.interface.ts index 3d7164b..0a25d40 100644 --- a/src/types/GelatoAddressBook.interface.ts +++ b/src/types/GelatoAddressBook.interface.ts @@ -1,3 +1,3 @@ export interface GelatoAddressBook { - [key: number]: { ops: string }; + [key: number]: { automate: string }; } diff --git a/src/utils/index.ts b/src/utils/index.ts index c196250..dd90869 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,5 @@ import { GELATO_ADDRESSES } from "../constants"; -export function isGelatoOpsSupported(chainId: number): boolean { +export function isAutomateSupported(chainId: number): boolean { return Boolean(GELATO_ADDRESSES[chainId]); }