UNPKG

@towns-protocol/generated

Version:

## How to generate contract types

458 lines (450 loc) 17.6 kB
/* 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 { SimpleApp, SimpleAppInterface } from "../SimpleApp"; const _abi = [ { type: "function", name: "accessDuration", inputs: [], outputs: [ { name: "", type: "uint48", internalType: "uint48", }, ], stateMutability: "view", }, { type: "function", name: "cancelOwnershipHandover", inputs: [], outputs: [], stateMutability: "payable", }, { type: "function", name: "completeOwnershipHandover", inputs: [ { name: "pendingOwner", type: "address", internalType: "address", }, ], outputs: [], stateMutability: "payable", }, { type: "function", name: "executionManifest", inputs: [], outputs: [ { name: "", type: "tuple", internalType: "struct ExecutionManifest", components: [ { name: "executionFunctions", type: "tuple[]", internalType: "struct ManifestExecutionFunction[]", components: [ { name: "executionSelector", type: "bytes4", internalType: "bytes4", }, { name: "skipRuntimeValidation", type: "bool", internalType: "bool", }, { name: "allowGlobalValidation", type: "bool", internalType: "bool", }, ], }, { name: "executionHooks", type: "tuple[]", internalType: "struct ManifestExecutionHook[]", components: [ { name: "executionSelector", type: "bytes4", internalType: "bytes4", }, { name: "entityId", type: "uint32", internalType: "uint32", }, { name: "isPreHook", type: "bool", internalType: "bool", }, { name: "isPostHook", type: "bool", internalType: "bool", }, ], }, { name: "interfaceIds", type: "bytes4[]", internalType: "bytes4[]", }, ], }, ], stateMutability: "pure", }, { type: "function", name: "initialize", inputs: [ { name: "owner", type: "address", internalType: "address", }, { name: "appId", type: "string", internalType: "string", }, { name: "permissions", type: "bytes32[]", internalType: "bytes32[]", }, { name: "installPrice", type: "uint256", internalType: "uint256", }, { name: "accessDuration", type: "uint48", internalType: "uint48", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "installPrice", inputs: [], outputs: [ { name: "", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "moduleId", inputs: [], outputs: [ { name: "", type: "string", internalType: "string", }, ], stateMutability: "view", }, { type: "function", name: "moduleOwner", inputs: [], outputs: [ { name: "", type: "address", internalType: "address", }, ], stateMutability: "view", }, { type: "function", name: "onInstall", inputs: [ { name: "postInstallData", type: "bytes", internalType: "bytes", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "onUninstall", inputs: [ { name: "postUninstallData", type: "bytes", internalType: "bytes", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "owner", inputs: [], outputs: [ { name: "result", type: "address", internalType: "address", }, ], stateMutability: "view", }, { type: "function", name: "ownershipHandoverExpiresAt", inputs: [ { name: "pendingOwner", type: "address", internalType: "address", }, ], outputs: [ { name: "result", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "payable", }, { type: "function", name: "requestOwnershipHandover", inputs: [], outputs: [], stateMutability: "payable", }, { type: "function", name: "requiredPermissions", inputs: [], outputs: [ { name: "", type: "bytes32[]", internalType: "bytes32[]", }, ], stateMutability: "view", }, { type: "function", name: "supportsInterface", inputs: [ { name: "interfaceId", type: "bytes4", internalType: "bytes4", }, ], outputs: [ { name: "", type: "bool", internalType: "bool", }, ], stateMutability: "pure", }, { type: "function", name: "transferOwnership", inputs: [ { name: "newOwner", type: "address", internalType: "address", }, ], outputs: [], stateMutability: "payable", }, { type: "function", name: "updatePricing", inputs: [ { name: "installPrice", type: "uint256", internalType: "uint256", }, { name: "accessDuration", type: "uint48", internalType: "uint48", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "event", name: "Initialized", inputs: [ { name: "version", type: "uint64", indexed: false, internalType: "uint64", }, ], anonymous: false, }, { type: "event", name: "OwnershipHandoverCanceled", inputs: [ { name: "pendingOwner", type: "address", indexed: true, internalType: "address", }, ], anonymous: false, }, { type: "event", name: "OwnershipHandoverRequested", inputs: [ { name: "pendingOwner", type: "address", indexed: true, internalType: "address", }, ], anonymous: false, }, { type: "event", name: "OwnershipTransferred", inputs: [ { name: "oldOwner", type: "address", indexed: true, internalType: "address", }, { name: "newOwner", type: "address", indexed: true, internalType: "address", }, ], anonymous: false, }, { type: "error", name: "AlreadyInitialized", inputs: [], }, { type: "error", name: "InvalidInitialization", inputs: [], }, { type: "error", name: "NewOwnerIsZeroAddress", inputs: [], }, { type: "error", name: "NoHandoverRequest", inputs: [], }, { type: "error", name: "NotInitializing", inputs: [], }, { type: "error", name: "Unauthorized", inputs: [], }, ] as const; const _bytecode = "0x6080604052348015600e575f5ffd5b50610ff98061001c5f395ff3fe608060405260043610610123575f3560e01c8063715018a6116100a1578063a41c85be11610071578063f04e283e11610057578063f04e283e146102ed578063f2fde38b14610300578063fee81cf414610313575f5ffd5b8063a41c85be146102aa578063ae5628c6146102cc575f5ffd5b8063715018a61461024e5780638a91b0e3146102305780638da5cb5b14610256578063a1308f2714610289575f5ffd5b80632e7ad41f116100f6578063452c04b1116100dc578063452c04b1146101ef57806354d1f13d146102285780636d61fe7014610230575f5ffd5b80632e7ad41f146101af57806336edab1f146101d0575f5ffd5b806301ffc9a7146101275780630a88fcad1461015b5780632382f0461461018657806325692962146101a7575b5f5ffd5b348015610132575f5ffd5b5061014661014136600461098b565b610344565b60405190151581526020015b60405180910390f35b348015610166575f5ffd5b5061016f610428565b60405165ffffffffffff9091168152602001610152565b348015610191575f5ffd5b506101a56101a03660046109eb565b61045e565b005b6101a56104e2565b3480156101ba575f5ffd5b506101c361052f565b6040516101529190610a15565b3480156101db575f5ffd5b506101a56101ea366004610abf565b6105a7565b3480156101fa575f5ffd5b506102036106b8565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610152565b6101a56106c1565b34801561023b575f5ffd5b506101a561024a366004610b89565b5050565b6101a56106fa565b348015610261575f5ffd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754610203565b348015610294575f5ffd5b5061029d61070d565b6040516101529190610bc8565b3480156102b5575f5ffd5b506102be6107b8565b604051908152602001610152565b3480156102d7575f5ffd5b506102e06107e1565b6040516101529190610cf9565b6101a56102fb366004610e00565b610808565b6101a561030e366004610e00565b610845565b34801561031e575f5ffd5b506102be61032d366004610e00565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fae5628c60000000000000000000000000000000000000000000000000000000014806103d657507fffffffff0000000000000000000000000000000000000000000000000000000082167f46c0c1b400000000000000000000000000000000000000000000000000000000145b8061042257507fffffffff0000000000000000000000000000000000000000000000000000000082167fc5c2a9bd00000000000000000000000000000000000000000000000000000000145b92915050565b5f6104597f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be035465ffffffffffff1690565b905090565b61046661086b565b7f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be02919091557f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be0380547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001665ffffffffffff909216919091179055565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f5fa250565b60605f7f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be006001810180546040805160208084028201810190925282815293945083018282801561059c57602002820191905f5260205f20905b815481526020019060010190808311610588575b505050505091505090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156105f85760018160011c14303b106105ef5763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610602886108a0565b7f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be008061062f888a83610ee3565b5061063e60018201878761092e565b506002810184905560030180547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001665ffffffffffff841617905580156106ae576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b5050505050505050565b5f610459610905565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f5fa2565b61070261086b565b61070b5f6108a0565b565b7f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be00805460609190819061073f90610e46565b80601f016020809104026020016040519081016040528092919081815260200182805461076b90610e46565b801561059c5780601f1061078d5761010080835404028352916020019161059c565b820191905f5260205f20905b8154815290600101906020018083116107995750939695505050505050565b5f6104597f83d7ef17df984d8e84ee79017942cb0329f48e2d537ef8c418bc299c6878be025490565b61080560405180606001604052806060815260200160608152602001606081525090565b90565b61081061086b565b63389a75e1600c52805f526020600c20805442111561083657636f5e88185f526004601cfd5b5f9055610842816108a0565b50565b61084d61086b565b8060601b61086257637448fbae5f526004601cfd5b610842816108a0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754331461070b576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f6104597fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275490565b828054828255905f5260205f20908101928215610967579160200282015b8281111561096757823582559160200191906001019061094c565b50610973929150610977565b5090565b5b80821115610973575f8155600101610978565b5f6020828403121561099b575f5ffd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146109ca575f5ffd5b9392505050565b803565ffffffffffff811681146109e6575f5ffd5b919050565b5f5f604083850312156109fc575f5ffd5b82359150610a0c602084016109d1565b90509250929050565b602080825282518282018190525f918401906040840190835b81811015610a4c578351835260209384019390920191600101610a2e565b509095945050505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146109e6575f5ffd5b5f5f83601f840112610a8a575f5ffd5b50813567ffffffffffffffff811115610aa1575f5ffd5b602083019150836020828501011115610ab8575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215610ad5575f5ffd5b610ade88610a57565b9650602088013567ffffffffffffffff811115610af9575f5ffd5b610b058a828b01610a7a565b909750955050604088013567ffffffffffffffff811115610b24575f5ffd5b8801601f81018a13610b34575f5ffd5b803567ffffffffffffffff811115610b4a575f5ffd5b8a60208260051b8401011115610b5e575f5ffd5b6020919091019450925060608801359150610b7b608089016109d1565b905092959891949750929550565b5f5f60208385031215610b9a575f5ffd5b823567ffffffffffffffff811115610bb0575f5ffd5b610bbc85828601610a7a565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f8151808452602084019350602083015f5b82811015610c9d5781517fffffffff00000000000000000000000000000000000000000000000000000000815116875263ffffffff602082015116602088015260408101511515604088015260608101511515606088015250608086019550602082019150600181019050610c2d565b5093949350505050565b5f8151808452602084019350602083015f5b82811015610c9d5781517fffffffff0000000000000000000000000000000000000000000000000000000016865260209586019590910190600101610cb9565b602080825282516060838301528051608084018190525f929190910190829060a08501905b80831015610d7e5783517fffffffff00000000000000000000000000000000000000000000000000000000815116835260208101511515602084015260408101511515604084015250606082019150602084019350600183019250610d1e565b50602086015192507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0858203016040860152610dba8184610c1b565b9250505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016060850152610df78282610ca7565b95945050505050565b5f60208284031215610e10575f5ffd5b6109ca82610a57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c90821680610e5a57607f821691505b602082108103610e91577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f821115610ede57805f5260205f20601f840160051c81016020851015610ebc5750805b601f840160051c820191505b81811015610edb575f8155600101610ec8565b50505b505050565b67ffffffffffffffff831115610efb57610efb610e19565b610f0f83610f098354610e46565b83610e97565b5f601f841160018114610f5f575f8515610f295750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610edb565b5f838152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08716915b82811015610fac5786850135825560209485019460019092019101610f8c565b5086821015610fe7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b018355505050505056"; type SimpleAppConstructorParams = | [signer?: Signer] | ConstructorParameters<typeof ContractFactory>; const isSuperArgs = ( xs: SimpleAppConstructorParams ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1; export class SimpleApp__factory extends ContractFactory { constructor(...args: SimpleAppConstructorParams) { if (isSuperArgs(args)) { super(...args); } else { super(_abi, _bytecode, args[0]); } } override deploy( overrides?: Overrides & { from?: PromiseOrValue<string> } ): Promise<SimpleApp> { return super.deploy(overrides || {}) as Promise<SimpleApp>; } override getDeployTransaction( overrides?: Overrides & { from?: PromiseOrValue<string> } ): TransactionRequest { return super.getDeployTransaction(overrides || {}); } override attach(address: string): SimpleApp { return super.attach(address) as SimpleApp; } override connect(signer: Signer): SimpleApp__factory { return super.connect(signer) as SimpleApp__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): SimpleAppInterface { return new utils.Interface(_abi) as SimpleAppInterface; } static connect( address: string, signerOrProvider: Signer | Provider ): SimpleApp { return new Contract(address, _abi, signerOrProvider) as SimpleApp; } }