@towns-protocol/generated
Version:
## How to generate contract types
588 lines (580 loc) • 21 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 {
PlatformRequirementsFacet,
PlatformRequirementsFacetInterface,
} from "../PlatformRequirementsFacet";
const _abi = [
{
type: "function",
name: "__PlatformRequirements_init",
inputs: [
{
name: "feeRecipient",
type: "address",
internalType: "address",
},
{
name: "membershipBps",
type: "uint16",
internalType: "uint16",
},
{
name: "membershipFee",
type: "uint256",
internalType: "uint256",
},
{
name: "membershipMintLimit",
type: "uint256",
internalType: "uint256",
},
{
name: "membershipDuration",
type: "uint64",
internalType: "uint64",
},
{
name: "membershipMinPrice",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "getDenominator",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "pure",
},
{
type: "function",
name: "getFeeRecipient",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "address",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getMembershipBps",
inputs: [],
outputs: [
{
name: "",
type: "uint16",
internalType: "uint16",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getMembershipDuration",
inputs: [],
outputs: [
{
name: "",
type: "uint64",
internalType: "uint64",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getMembershipFee",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getMembershipMinPrice",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getMembershipMintLimit",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getSwapFees",
inputs: [],
outputs: [
{
name: "protocolBps",
type: "uint16",
internalType: "uint16",
},
{
name: "posterBps",
type: "uint16",
internalType: "uint16",
},
],
stateMutability: "view",
},
{
type: "function",
name: "isRouterWhitelisted",
inputs: [
{
name: "router",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "setFeeRecipient",
inputs: [
{
name: "recipient",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setMembershipBps",
inputs: [
{
name: "bps",
type: "uint16",
internalType: "uint16",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setMembershipDuration",
inputs: [
{
name: "duration",
type: "uint64",
internalType: "uint64",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setMembershipFee",
inputs: [
{
name: "fee",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setMembershipMinPrice",
inputs: [
{
name: "minPrice",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setMembershipMintLimit",
inputs: [
{
name: "limit",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setRouterWhitelisted",
inputs: [
{
name: "router",
type: "address",
internalType: "address",
},
{
name: "whitelisted",
type: "bool",
internalType: "bool",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setSwapFees",
inputs: [
{
name: "protocolBps",
type: "uint16",
internalType: "uint16",
},
{
name: "posterBps",
type: "uint16",
internalType: "uint16",
},
],
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: "OwnershipTransferred",
inputs: [
{
name: "previousOwner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "newOwner",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformFeeRecipientSet",
inputs: [
{
name: "recipient",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformMembershipBpsSet",
inputs: [
{
name: "bps",
type: "uint16",
indexed: false,
internalType: "uint16",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformMembershipDurationSet",
inputs: [
{
name: "duration",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformMembershipFeeSet",
inputs: [
{
name: "fee",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformMembershipMinPriceSet",
inputs: [
{
name: "minPrice",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformMembershipMintLimitSet",
inputs: [
{
name: "limit",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "PlatformSwapFeesSet",
inputs: [
{
name: "protocolBps",
type: "uint16",
indexed: false,
internalType: "uint16",
},
{
name: "posterBps",
type: "uint16",
indexed: false,
internalType: "uint16",
},
],
anonymous: false,
},
{
type: "event",
name: "RouterWhitelistUpdated",
inputs: [
{
name: "router",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "whitelisted",
type: "bool",
indexed: false,
internalType: "bool",
},
],
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: [],
},
{
type: "error",
name: "Platform__InvalidFeeRecipient",
inputs: [],
},
{
type: "error",
name: "Platform__InvalidMembershipBps",
inputs: [],
},
{
type: "error",
name: "Platform__InvalidMembershipDuration",
inputs: [],
},
{
type: "error",
name: "Platform__InvalidMembershipMinPrice",
inputs: [],
},
{
type: "error",
name: "Platform__InvalidMembershipMintLimit",
inputs: [],
},
{
type: "error",
name: "Platform__InvalidSwapFeeBps",
inputs: [],
},
] as const;
const _bytecode =
"0x6080604052348015600e575f5ffd5b5060156019565b60bd565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef520008054640100000000900460ff16156064576040516366008a2d60e01b815260040160405180910390fd5b805463ffffffff908116101560ba57805463ffffffff191663ffffffff90811782556040519081527fe9c9b456cb2994b80aeef036cf59d26e9617df80f816a6ee5a5b4166e07e2f5c9060200160405180910390a15b50565b6111e8806100ca5f395ff3fe608060405234801561000f575f5ffd5b506004361061012f575f3560e01c806383f3f0dc116100ad578063c91bbba51161007d578063e74b981b11610063578063e74b981b14610347578063edd436de1461035a578063f02579641461036d575f5ffd5b8063c91bbba514610311578063ce8221b614610334575f5ffd5b806383f3f0dc1461027f5780638d473c99146102925780639f6542aa146102a5578063c60b2f82146102fe575f5ffd5b80631b159e2e116101025780633feb0c3e116100e85780633feb0c3e146101e25780634ccb20c0146101f55780638120f0ba14610222575f5ffd5b80631b159e2e146101d25780632cbb9d13146101da575f5ffd5b806304777bca146101335780630aef023f146101485780630eac306d146101b4578063190eaaba146101ca575b5f5ffd5b6101466101413660046110b8565b610380565b005b61019f610156366004611115565b73ffffffffffffffffffffffffffffffffffffffff165f9081527fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d05602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6101bc61044a565b6040519081526020016101ab565b6127106101bc565b6101bc610478565b6101bc6104a1565b6101466101f0366004611135565b6104ca565b6101fd61054f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ab565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d025474010000000000000000000000000000000000000000900467ffffffffffffffff1660405167ffffffffffffffff90911681526020016101ab565b61014661028d36600461116e565b61058e565b6101466102a0366004611187565b61060c565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d02547c0100000000000000000000000000000000000000000000000000000000900461ffff1660405161ffff90911681526020016101ab565b61014661030c3660046111b8565b610688565b610319610703565b6040805161ffff9384168152929091166020830152016101ab565b6101466103423660046111cf565b610744565b610146610355366004611115565b6107bf565b6101466103683660046111b8565b61083a565b61014661037b3660046111b8565b6108b5565b7f59b501c3653afc186af7d48dda36cf6732bd21629a6295693664240a6ef5200054640100000000900460ff166103e3576040517f77a399b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61040c7f721aab4e00000000000000000000000000000000000000000000000000000000610930565b61041586610a85565b61041e85610b56565b61042784610c37565b61043083610c8a565b61043982610d0d565b61044281610de8565b505050505050565b5f6104737fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d005490565b905090565b5f6104737fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d035490565b5f6104737fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d015490565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff163314610541576040517f65f490650000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b61054b8282610e6c565b5050565b5f6104737fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d025473ffffffffffffffffffffffffffffffffffffffff1690565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff163314610600576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610d0d565b50565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff16331461067e576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61054b8282610f38565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff1633146106fa576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610c37565b5f5f61073c7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d045461ffff80821692620100009092041690565b915091509091565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff1633146107b6576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610b56565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff163314610831576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610a85565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff1633146108ac576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610de8565b7f4675fa8241f86f37157864d3d49b85ad4b164352c516da28e1678a90470ae3005473ffffffffffffffffffffffffffffffffffffffff163314610927576040517f65f49065000000000000000000000000000000000000000000000000000000008152336004820152602401610538565b61060981610c8a565b7fffffffff0000000000000000000000000000000000000000000000000000000081165f9081527f81088bbc801e045ea3e7620779ab349988f58afbdfba10dff983df3f33522b00602052604090205460ff16610a04577fffffffff0000000000000000000000000000000000000000000000000000000081165f9081527f81088bbc801e045ea3e7620779ab349988f58afbdfba10dff983df3f33522b006020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a36565b6040517ff2cfeefa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fffffffff000000000000000000000000000000000000000000000000000000008216907f78f84e5b1c5c05be2b5ad3800781dd404d6d6c6302bc755c0fe20f58a33a7f22905f90a250565b73ffffffffffffffffffffffffffffffffffffffff8116610ac957610ac97f83e3352100000000000000000000000000000000000000000000000000000000611060565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d0280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f3cc0ae1aeb9c9f264efea06a56cdd51909ff08984601a60572e90b520105f66b905f90a250565b6127108161ffff161115610b8d57610b8d7f365c949400000000000000000000000000000000000000000000000000000000611060565b807fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d0060020180547fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000061ffff9384160217905560405190821681527f3b56f95d00baee21935a9ae0b495b827b894967975bed5ad55f4cde35386492d906020015b60405180910390a150565b807fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d00556040518181527fd586b88b974ccf090a61851ce0b8c6ba390e3e97db43513cc42b0b6f155a440d90602001610c2c565b805f03610cb957610cb97e951ce300000000000000000000000000000000000000000000000000000000611060565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d018190556040518181527f333d71c9d6dfea817be074bc8d0cd09737726b9d29a6cfe42f2ff95f82a222b190602001610c2c565b8067ffffffffffffffff165f03610d4757610d477fe8decb2700000000000000000000000000000000000000000000000000000000611060565b807fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d0060020180547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff9384160217905560405190821681527f93f329d9b419a1dbbb08ec1d29d6fcc68e2926b743dc2a665f1b70b30eb542de90602001610c2c565b805f03610e1857610e187f3131934a00000000000000000000000000000000000000000000000000000000611060565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d038190556040518181527f82ea03a29fda4754fc4ebb678ee41f834ad7bfede7d8cd39094ad6de82cd17ad90602001610c2c565b73ffffffffffffffffffffffffffffffffffffffff82165f8181527fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d05602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d0092917f7dfa5a39e8d4ab2d330416cdd5102e73066069ba1c76ec335cc47727a07fe798910160405180910390a2505050565b6127108161ffff161180610f5157506127108261ffff16115b15610f7f57610f7f7f0e78011f00000000000000000000000000000000000000000000000000000000611060565b7fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d0480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000166201000061ffff8481169182027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169290921791851691821790925560408051918252602082019290925281517fb29a817dd0719f30ad87abc8dff26e6354077e5b46bf38f34d5ac48732860d00927fa98a8f5c643877cd397b07ce1aadbc752c5295059c5a44e5d5a13be235c0d507928290030190a1505050565b805f5260045ffd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461108b575f5ffd5b919050565b803561ffff8116811461108b575f5ffd5b803567ffffffffffffffff8116811461108b575f5ffd5b5f5f5f5f5f5f60c087890312156110cd575f5ffd5b6110d687611068565b95506110e460208801611090565b94506040870135935060608701359250611100608088016110a1565b9598949750929591949360a090920135925050565b5f60208284031215611125575f5ffd5b61112e82611068565b9392505050565b5f5f60408385031215611146575f5ffd5b61114f83611068565b915060208301358015158114611163575f5ffd5b809150509250929050565b5f6020828403121561117e575f5ffd5b61112e826110a1565b5f5f60408385031215611198575f5ffd5b6111a183611090565b91506111af60208401611090565b90509250929050565b5f602082840312156111c8575f5ffd5b5035919050565b5f602082840312156111df575f5ffd5b61112e8261109056";
type PlatformRequirementsFacetConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: PlatformRequirementsFacetConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class PlatformRequirementsFacet__factory extends ContractFactory {
constructor(...args: PlatformRequirementsFacetConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override deploy(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PlatformRequirementsFacet> {
return super.deploy(overrides || {}) as Promise<PlatformRequirementsFacet>;
}
override getDeployTransaction(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
override attach(address: string): PlatformRequirementsFacet {
return super.attach(address) as PlatformRequirementsFacet;
}
override connect(signer: Signer): PlatformRequirementsFacet__factory {
return super.connect(signer) as PlatformRequirementsFacet__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): PlatformRequirementsFacetInterface {
return new utils.Interface(_abi) as PlatformRequirementsFacetInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): PlatformRequirementsFacet {
return new Contract(
address,
_abi,
signerOrProvider
) as PlatformRequirementsFacet;
}
}