@towns-protocol/generated
Version:
## How to generate contract types
407 lines (399 loc) • 12.8 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 { Architect, ArchitectInterface } from "../Architect";
const _abi = [
{
type: "function",
name: "__Architect_init",
inputs: [
{
name: "ownerImplementation",
type: "address",
internalType: "contract ISpaceOwner",
},
{
name: "userEntitlementImplementation",
type: "address",
internalType: "contract IUserEntitlement",
},
{
name: "ruleEntitlementImplementation",
type: "address",
internalType: "contract IRuleEntitlementV2",
},
{
name: "legacyRuleEntitlement",
type: "address",
internalType: "contract IRuleEntitlement",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "getProxyInitializer",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "contract ISpaceProxyInitializer",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getSpaceArchitectImplementations",
inputs: [],
outputs: [
{
name: "spaceToken",
type: "address",
internalType: "contract ISpaceOwner",
},
{
name: "userEntitlementImplementation",
type: "address",
internalType: "contract IUserEntitlement",
},
{
name: "ruleEntitlementImplementation",
type: "address",
internalType: "contract IRuleEntitlementV2",
},
{
name: "legacyRuleEntitlement",
type: "address",
internalType: "contract IRuleEntitlement",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getSpaceByTokenId",
inputs: [
{
name: "tokenId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "address",
internalType: "address",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getTokenIdBySpace",
inputs: [
{
name: "space",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "setProxyInitializer",
inputs: [
{
name: "proxyInitializer",
type: "address",
internalType: "contract ISpaceProxyInitializer",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setSpaceArchitectImplementations",
inputs: [
{
name: "spaceToken",
type: "address",
internalType: "contract ISpaceOwner",
},
{
name: "userEntitlementImplementation",
type: "address",
internalType: "contract IUserEntitlement",
},
{
name: "ruleEntitlementImplementation",
type: "address",
internalType: "contract IRuleEntitlementV2",
},
{
name: "legacyRuleEntitlement",
type: "address",
internalType: "contract IRuleEntitlement",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "event",
name: "Architect__ProxyInitializerSet",
inputs: [
{
name: "proxyInitializer",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
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: "OwnershipTransferred",
inputs: [
{
name: "previousOwner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "newOwner",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "Paused",
inputs: [
{
name: "account",
type: "address",
indexed: false,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "SpaceCreated",
inputs: [
{
name: "owner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "tokenId",
type: "uint256",
indexed: true,
internalType: "uint256",
},
{
name: "space",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "Unpaused",
inputs: [
{
name: "account",
type: "address",
indexed: false,
internalType: "address",
},
],
anonymous: false,
},
{
type: "error",
name: "Architect__InvalidAddress",
inputs: [],
},
{
type: "error",
name: "Architect__InvalidNetworkId",
inputs: [],
},
{
type: "error",
name: "Architect__InvalidPricingModule",
inputs: [],
},
{
type: "error",
name: "Architect__InvalidStringLength",
inputs: [],
},
{
type: "error",
name: "Architect__NotContract",
inputs: [],
},
{
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: [],
},
{
type: "error",
name: "Pausable__NotPaused",
inputs: [],
},
{
type: "error",
name: "Pausable__Paused",
inputs: [],
},
{
type: "error",
name: "Reentrancy",
inputs: [],
},
] as const;
const _bytecode =
"0x6080604052348015600e575f5ffd5b5060156019565b60bd565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef520008054640100000000900460ff16156064576040516366008a2d60e01b815260040160405180910390fd5b805463ffffffff908116101560ba57805463ffffffff191663ffffffff90811782556040519081527fe9c9b456cb2994b80aeef036cf59d26e9617df80f816a6ee5a5b4166e07e2f5c9060200160405180910390a15b50565b6107b0806100ca5f395ff3fe608060405234801561000f575f5ffd5b506004361061007a575f3560e01c80636bd837f4116100585780636bd837f414610118578063c0bc679614610120578063cd7242b814610141578063e6907c9d14610154575f5ffd5b80631a424b661461007e578063545efb2d14610093578063673f0dd5146100e0575b5f5ffd5b61009161008c36600461071e565b610167565b005b61009b6101dc565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815293851660208501529184169183019190915290911660608201526080015b60405180910390f35b6100f36100ee366004610777565b61029f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d7565b6100f36102e9565b61013361012e36600461078e565b61032d565b6040519081526020016100d7565b61009161014f36600461071e565b610376565b61009161016236600461078e565b6103ed565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef5200054640100000000900460ff166101ca576040517f77a399b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d68484848461046b565b50505050565b5f5f5f5f6102917f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d00547f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d01547f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d02547f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d055473ffffffffffffffffffffffffffffffffffffffff938416949284169391821692911690565b935093509350935090919293565b5f8181527f06bd04a817647c31ee485c8a0baab96facd62dbfd4b475796bb17ca2c12f0002602052604081205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b5f6103287f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d065473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f06bd04a817647c31ee485c8a0baab96facd62dbfd4b475796bb17ca2c12f000160205260408120546102e3565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff1633146101ca576040517f65f490650000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff16331461045f576040517f65f490650000000000000000000000000000000000000000000000000000000081523360048201526024016103e4565b6104688161064c565b50565b8373ffffffffffffffffffffffffffffffffffffffff163b5f036104bb576040517f02f3d00b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff163b5f0361050b576040517f02f3d00b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff163b5f0361055b576040517f02f3d00b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff968716179091557f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0180548216948616949094179093557f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0280548416928516929092179091557f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0580549092169216919091179055565b7f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f9e34afa7b4d27d347d25d9d9dab4f1a106fa081382e6c4243e834d093e787d0091907f50d234a64b07fd5931eedf717c2eca7f76ef13920a1330cc774176dbf9c66b3e905f90a25050565b73ffffffffffffffffffffffffffffffffffffffff81168114610468575f5ffd5b5f5f5f5f60808587031215610731575f5ffd5b843561073c816106fd565b9350602085013561074c816106fd565b9250604085013561075c816106fd565b9150606085013561076c816106fd565b939692955090935050565b5f60208284031215610787575f5ffd5b5035919050565b5f6020828403121561079e575f5ffd5b81356107a9816106fd565b939250505056";
type ArchitectConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: ArchitectConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class Architect__factory extends ContractFactory {
constructor(...args: ArchitectConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override deploy(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<Architect> {
return super.deploy(overrides || {}) as Promise<Architect>;
}
override getDeployTransaction(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
override attach(address: string): Architect {
return super.attach(address) as Architect;
}
override connect(signer: Signer): Architect__factory {
return super.connect(signer) as Architect__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): ArchitectInterface {
return new utils.Interface(_abi) as ArchitectInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): Architect {
return new Contract(address, _abi, signerOrProvider) as Architect;
}
}