ufomarketplace-sdk-new
Version:
SDK to interact with set ufo marketplace contracts
346 lines (338 loc) • 11.4 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 {
ERC20Upgradeable,
ERC20UpgradeableInterface,
} from "../ERC20Upgradeable";
const _abi = [
{
type: "function",
name: "allowance",
inputs: [
{
name: "owner",
type: "address",
internalType: "address",
},
{
name: "spender",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "approve",
inputs: [
{
name: "spender",
type: "address",
internalType: "address",
},
{
name: "amount",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "balanceOf",
inputs: [
{
name: "account",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "decimals",
inputs: [],
outputs: [
{
name: "",
type: "uint8",
internalType: "uint8",
},
],
stateMutability: "view",
},
{
type: "function",
name: "decreaseAllowance",
inputs: [
{
name: "spender",
type: "address",
internalType: "address",
},
{
name: "subtractedValue",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "increaseAllowance",
inputs: [
{
name: "spender",
type: "address",
internalType: "address",
},
{
name: "addedValue",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "name",
inputs: [],
outputs: [
{
name: "",
type: "string",
internalType: "string",
},
],
stateMutability: "view",
},
{
type: "function",
name: "symbol",
inputs: [],
outputs: [
{
name: "",
type: "string",
internalType: "string",
},
],
stateMutability: "view",
},
{
type: "function",
name: "totalSupply",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "transfer",
inputs: [
{
name: "to",
type: "address",
internalType: "address",
},
{
name: "amount",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "transferFrom",
inputs: [
{
name: "from",
type: "address",
internalType: "address",
},
{
name: "to",
type: "address",
internalType: "address",
},
{
name: "amount",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "nonpayable",
},
{
type: "event",
name: "Approval",
inputs: [
{
name: "owner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "spender",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "value",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "Initialized",
inputs: [
{
name: "version",
type: "uint8",
indexed: false,
internalType: "uint8",
},
],
anonymous: false,
},
{
type: "event",
name: "Transfer",
inputs: [
{
name: "from",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "to",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "value",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
] as const;
const _bytecode =
"0x608060405234801561001057600080fd5b5061083b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c39190610778565b60405180910390f35b6100df6100da36600461074e565b610232565b60405190151581526020016100c3565b6035545b6040519081526020016100c3565b6100df61010f366004610712565b61024a565b604051601281526020016100c3565b6100df61013136600461074e565b61026e565b6100f36101443660046106bd565b6001600160a01b031660009081526033602052604090205490565b6100b6610290565b6100df61017536600461074e565b61029f565b6100df61018836600461074e565b61031f565b6100f361019b3660046106df565b61032d565b6060603680546101af906107f3565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107f3565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b91906107cd565b610358565b6060603780546101af906107f3565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260336020526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106949086815260200190565b60405180910390a36104f0565b80356001600160a01b03811681146106b857600080fd5b919050565b6000602082840312156106cf57600080fd5b6106d8826106a1565b9392505050565b600080604083850312156106f257600080fd5b6106fb836106a1565b9150610709602084016106a1565b90509250929050565b60008060006060848603121561072757600080fd5b610730846106a1565b925061073e602085016106a1565b9150604084013590509250925092565b6000806040838503121561076157600080fd5b61076a836106a1565b946020939093013593505050565b600060208083528351808285015260005b818110156107a557858101830151858201604001528201610789565b818111156107b7576000604083870101525b50601f01601f1916929092016040019392505050565b600082198211156107ee57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061080757607f821691505b6020821081141561082857634e487b7160e01b600052602260045260246000fd5b5091905056fea164736f6c6343000807000a";
type ERC20UpgradeableConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: ERC20UpgradeableConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class ERC20Upgradeable__factory extends ContractFactory {
constructor(...args: ERC20UpgradeableConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override deploy(
overrides?: Overrides & { from?: string }
): Promise<ERC20Upgradeable> {
return super.deploy(overrides || {}) as Promise<ERC20Upgradeable>;
}
override getDeployTransaction(
overrides?: Overrides & { from?: string }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
override attach(address: string): ERC20Upgradeable {
return super.attach(address) as ERC20Upgradeable;
}
override connect(signer: Signer): ERC20Upgradeable__factory {
return super.connect(signer) as ERC20Upgradeable__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): ERC20UpgradeableInterface {
return new utils.Interface(_abi) as ERC20UpgradeableInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): ERC20Upgradeable {
return new Contract(address, _abi, signerOrProvider) as ERC20Upgradeable;
}
}