ufomarketplace-sdk-new
Version:
SDK to interact with set ufo marketplace contracts
173 lines (169 loc) • 3.62 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import type { Provider } from "@ethersproject/providers";
import type { IWeapon, IWeaponInterface } from "../IWeapon";
const _abi = [
{
type: "function",
name: "getWeaponInfo",
inputs: [
{
name: "weaponId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "level",
type: "uint256",
internalType: "uint256",
},
{
name: "rarity",
type: "uint256",
internalType: "uint256",
},
{
name: "weaponType",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "initialize",
inputs: [
{
name: "_admin",
type: "address",
internalType: "address",
},
{
name: "_factory",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "openLootBox",
inputs: [
{
name: "_owner",
type: "address",
internalType: "address",
},
{
name: "_rarity",
type: "uint256",
internalType: "uint256",
},
{
name: "_weaponType",
type: "uint256",
internalType: "uint256",
},
{
name: "_tokenId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "purchaseLootBox",
inputs: [
{
name: "_quantity",
type: "uint256",
internalType: "uint256",
},
{
name: "_user",
type: "address",
internalType: "address",
},
{
name: "_totalPrice",
type: "uint256",
internalType: "uint256",
},
{
name: "_tokenType",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "purchaseLootBoxAndSendGift",
inputs: [
{
name: "_quantity",
type: "uint256",
internalType: "uint256",
},
{
name: "_sender",
type: "address",
internalType: "address",
},
{
name: "_receiver",
type: "address",
internalType: "address",
},
{
name: "_totalPrice",
type: "uint256",
internalType: "uint256",
},
{
name: "_tokenType",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "updateWeaponLevel",
inputs: [
{
name: "weaponId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
] as const;
export class IWeapon__factory {
static readonly abi = _abi;
static createInterface(): IWeaponInterface {
return new utils.Interface(_abi) as IWeaponInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): IWeapon {
return new Contract(address, _abi, signerOrProvider) as IWeapon;
}
}