niftyswap
Version:
AMM exchange for ERC-1155 tokens, inspired by Uniswap
269 lines (262 loc) • 8.54 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Signer } from "ethers";
import { Provider, TransactionRequest } from "@ethersproject/providers";
import { Contract, ContractFactory, Overrides } from "@ethersproject/contracts";
import type { ERC20 } from "../ERC20";
export class ERC20__factory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(overrides?: Overrides): Promise<ERC20> {
return super.deploy(overrides || {}) as Promise<ERC20>;
}
getDeployTransaction(overrides?: Overrides): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
attach(address: string): ERC20 {
return super.attach(address) as ERC20;
}
connect(signer: Signer): ERC20__factory {
return super.connect(signer) as ERC20__factory;
}
static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {
return new Contract(address, _abi, signerOrProvider) as ERC20;
}
}
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "spender",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "to",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "Transfer",
type: "event",
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "address",
name: "spender",
type: "address",
},
],
name: "allowance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "approve",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "subtractedValue",
type: "uint256",
},
],
name: "decreaseAllowance",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "addedValue",
type: "uint256",
},
],
name: "increaseAllowance",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "from",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "transferFrom",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
];
const _bytecode =
"0x608060405234801561001057600080fd5b50610687806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610170578063a457c2d7146101a3578063a9059cbb146101dc578063dd62ed3e1461021557610088565b8063095ea7b31461008d57806318160ddd146100da57806323b872dd146100f45780633950935114610137575b600080fd5b6100c6600480360360408110156100a357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610250565b604080519115158252519081900360200190f35b6100e2610266565b60408051918252519081900360200190f35b6100c66004803603606081101561010a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561026c565b6100c66004803603604081101561014d57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356102ca565b6100e26004803603602081101561018657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661030d565b6100c6600480360360408110156101b957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610335565b6100c6600480360360408110156101f257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610378565b6100e26004803603604081101561022b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610385565b600061025d3384846103bd565b50600192915050565b60025490565b600061027984848461046c565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160209081526040808320338085529252909120546102c09186916102bb908661055f565b6103bd565b5060019392505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909161025d9185906102bb90866105d6565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152812054909161025d9185906102bb908661055f565b600061025d33848461046c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b73ffffffffffffffffffffffffffffffffffffffff82166103dd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166103fd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff821661048c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020546104bc908261055f565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526020819052604080822093909355908416815220546104f890826105d6565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105d057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f536166654d617468237375623a20554e444552464c4f57000000000000000000604482015290519081900360640190fd5b50900390565b60008282018381101561064a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f536166654d617468236164643a204f564552464c4f5700000000000000000000604482015290519081900360640190fd5b939250505056fea26469706673582212207fab43846d83b43dd72466e64bb3f5809ad78368014418c1bb8d2ea82544d59e64736f6c63430007040033";