@towns-protocol/generated
Version:
## How to generate contract types
255 lines (247 loc) • 10.2 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
import type { Provider, TransactionRequest } from "@ethersproject/providers";
import type { PromiseOrValue } from "../common";
import type {
OperatorRegistry,
OperatorRegistryInterface,
} from "../OperatorRegistry";
const _abi = [
{
type: "function",
name: "__OperatorRegistry_init",
inputs: [
{
name: "initialOperators",
type: "address[]",
internalType: "address[]",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "approveOperator",
inputs: [
{
name: "operator",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "getAllOperators",
inputs: [],
outputs: [
{
name: "",
type: "address[]",
internalType: "address[]",
},
],
stateMutability: "view",
},
{
type: "function",
name: "isOperator",
inputs: [
{
name: "operator",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "removeOperator",
inputs: [
{
name: "operator",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "event",
name: "Initialized",
inputs: [
{
name: "version",
type: "uint32",
indexed: false,
internalType: "uint32",
},
],
anonymous: false,
},
{
type: "event",
name: "InterfaceAdded",
inputs: [
{
name: "interfaceId",
type: "bytes4",
indexed: true,
internalType: "bytes4",
},
],
anonymous: false,
},
{
type: "event",
name: "InterfaceRemoved",
inputs: [
{
name: "interfaceId",
type: "bytes4",
indexed: true,
internalType: "bytes4",
},
],
anonymous: false,
},
{
type: "event",
name: "OperatorAdded",
inputs: [
{
name: "operatorAddress",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "OperatorRemoved",
inputs: [
{
name: "operatorAddress",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "OwnershipTransferred",
inputs: [
{
name: "previousOwner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "newOwner",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "error",
name: "Initializable_InInitializingState",
inputs: [],
},
{
type: "error",
name: "Initializable_NotInInitializingState",
inputs: [],
},
{
type: "error",
name: "Introspection_AlreadySupported",
inputs: [],
},
{
type: "error",
name: "Introspection_NotSupported",
inputs: [],
},
{
type: "error",
name: "Ownable__NotOwner",
inputs: [
{
name: "account",
type: "address",
internalType: "address",
},
],
},
{
type: "error",
name: "Ownable__ZeroAddress",
inputs: [],
},
] as const;
const _bytecode =
"0x6080604052348015600e575f5ffd5b5060156019565b60bd565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef520008054640100000000900460ff16156064576040516366008a2d60e01b815260040160405180910390fd5b805463ffffffff908116101560ba57805463ffffffff191663ffffffff90811782556040519081527fe9c9b456cb2994b80aeef036cf59d26e9617df80f816a6ee5a5b4166e07e2f5c9060200160405180910390a15b50565b6108d6806100ca5f395ff3fe608060405234801561000f575f5ffd5b5060043610610064575f3560e01c8063ac8a584a1161004d578063ac8a584a146100a5578063ba428b1a146100b8578063d911c632146100cb575f5ffd5b8063242cae9f146100685780636d70f7ae1461007d575b5f5ffd5b61007b610076366004610748565b6100e0565b005b61009061008b366004610748565b610163565b60405190151581526020015b60405180910390f35b61007b6100b3366004610748565b610175565b61007b6100c636600461077b565b610336565b6100d36103df565b60405161009c91906107ec565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff163314610157576040517f65f490650000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b610160816103f0565b50565b5f61016f6008836104e4565b92915050565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff1633146101e7576040517f65f4906500000000000000000000000000000000000000000000000000000000815233600482015260240161014e565b6101f081610163565b610232576102326040518060400160405280601281526020017f4f50455241544f525f4e4f545f464f554e440000000000000000000000000000815250610515565b5f61023d6005610538565b90505f5b818110156102e55773ffffffffffffffffffffffffffffffffffffffff831660075f61026e600585610541565b73ffffffffffffffffffffffffffffffffffffffff908116825260208201929092526040015f206003015416036102dd576102dd6040518060400160405280600d81526020017f4f55545f4f465f424f554e445300000000000000000000000000000000000000815250610515565b600101610241565b506102f160088361054c565b5060405173ffffffffffffffffffffffffffffffffffffffff8316907f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d905f90a25050565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef5200054640100000000900460ff16610399576040517f77a399b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b818110156103da576103d28383838181106103b8576103b8610844565b90506020020160208101906103cd9190610748565b6103f0565b60010161039b565b505050565b60606103eb600861056d565b905090565b73ffffffffffffffffffffffffffffffffffffffff8116610449576104496040518060400160405280600781526020017f4241445f41524700000000000000000000000000000000000000000000000000815250610515565b61045281610163565b15610495576104956040518060400160405280600e81526020017f414c52454144595f455849535453000000000000000000000000000000000000815250610515565b6104a0600882610579565b5060405173ffffffffffffffffffffffffffffffffffffffff8216907fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d905f90a250565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260018301602052604081205415155b9392505050565b6308c379a06040820352602080820352601f19601f825101166044810160248303fd5b5f61016f825490565b5f61050e838361059a565b5f61050e8373ffffffffffffffffffffffffffffffffffffffff84166105c0565b60605f61050e836106a3565b5f61050e8373ffffffffffffffffffffffffffffffffffffffff84166106fc565b5f825f0182815481106105af576105af610844565b905f5260205f200154905092915050565b5f818152600183016020526040812054801561069a575f6105e2600183610871565b85549091505f906105f590600190610871565b9050808214610654575f865f01828154811061061357610613610844565b905f5260205f200154905080875f01848154811061063357610633610844565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080610665576106656108a9565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061016f565b5f91505061016f565b6060815f018054806020026020016040519081016040528092919081815260200182805480156106f057602002820191905f5260205f20905b8154815260200190600101908083116106dc575b50505050509050919050565b5f81815260018301602052604081205461074157508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561016f565b505f61016f565b5f60208284031215610758575f5ffd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461050e575f5ffd5b5f5f6020838503121561078c575f5ffd5b823567ffffffffffffffff8111156107a2575f5ffd5b8301601f810185136107b2575f5ffd5b803567ffffffffffffffff8111156107c8575f5ffd5b8560208260051b84010111156107dc575f5ffd5b6020919091019590945092505050565b602080825282518282018190525f918401906040840190835b8181101561083957835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101610805565b509095945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561016f577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd";
type OperatorRegistryConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: OperatorRegistryConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class OperatorRegistry__factory extends ContractFactory {
constructor(...args: OperatorRegistryConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override deploy(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<OperatorRegistry> {
return super.deploy(overrides || {}) as Promise<OperatorRegistry>;
}
override getDeployTransaction(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
override attach(address: string): OperatorRegistry {
return super.attach(address) as OperatorRegistry;
}
override connect(signer: Signer): OperatorRegistry__factory {
return super.connect(signer) as OperatorRegistry__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): OperatorRegistryInterface {
return new utils.Interface(_abi) as OperatorRegistryInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): OperatorRegistry {
return new Contract(address, _abi, signerOrProvider) as OperatorRegistry;
}
}