@augmentedfinance/protocol-v1
Version:
Augmented Protocol smart contracts
1,792 lines • 91.8 kB
JavaScript
"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.DepositTokenFactory = void 0;
const contracts_1 = require("@ethersproject/contracts");
class DepositTokenFactory extends contracts_1.ContractFactory {
constructor(signer) {
super(_abi, _bytecode, signer);
}
deploy(overrides) {
return super.deploy(overrides || {});
}
getDeployTransaction(overrides) {
return super.getDeployTransaction(overrides || {});
}
attach(address) {
return super.attach(address);
}
connect(signer) {
return super.connect(signer);
}
static connect(address, signerOrProvider) {
return new contracts_1.Contract(address, _abi, signerOrProvider);
}
}
exports.DepositTokenFactory = DepositTokenFactory;
const _abi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor",
},
{
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",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "BalanceTransfer",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint16",
name: "",
type: "uint16",
},
],
name: "BaselinePercentageUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "target",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "Burn",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "by",
type: "address",
},
{
indexed: false,
internalType: "bool",
name: "paused",
type: "bool",
},
],
name: "EmergencyPaused",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "underlyingAsset",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "pool",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "treasury",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "tokenName",
type: "string",
},
{
indexed: false,
internalType: "string",
name: "tokenSymbol",
type: "string",
},
{
indexed: false,
internalType: "uint8",
name: "tokenDecimals",
type: "uint8",
},
{
indexed: false,
internalType: "bytes",
name: "params",
type: "bytes",
},
],
name: "Initialized",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "Mint",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "account",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "OverdraftApplied",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "recipient",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "overdraft",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "OverdraftCovered",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "token",
type: "address",
},
],
name: "ProviderAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "provider",
type: "address",
},
],
name: "ProviderRemoved",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "rate",
type: "uint256",
},
],
name: "RateUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "SubBalanceLocked",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "recipient",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "SubBalanceProvided",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "recipient",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "SubBalanceReturned",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "provider",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "SubBalanceUnlocked",
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: [],
name: "DOMAIN_SEPARATOR",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "EIP712_REVISION",
outputs: [
{
internalType: "bytes",
name: "",
type: "bytes",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "PERMIT_TYPEHASH",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "POOL",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "REVISION",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "UNDERLYING_ASSET_ADDRESS",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "_nonces",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
{
internalType: "address",
name: "",
type: "address",
},
],
name: "addRewardProvider",
outputs: [],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "addStakeOperator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "addSubBalanceOperator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
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: "amount",
type: "uint256",
},
],
name: "approve",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "attachedToRewardController",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
{
internalType: "address",
name: "receiverOfUnderlying",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
{
internalType: "uint32",
name: "at",
type: "uint32",
},
],
name: "calcRewardFor",
outputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "",
type: "uint256",
},
{
internalType: "uint32",
name: "since",
type: "uint32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
],
name: "claimRewardFor",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
{
internalType: "uint32",
name: "",
type: "uint32",
},
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
{
internalType: "uint256",
name: "baseAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "limit",
type: "uint256",
},
{
internalType: "uint16",
name: "minPct",
type: "uint16",
},
],
name: "claimRewardWithLimitFor",
outputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint32",
name: "since",
type: "uint32",
},
{
internalType: "bool",
name: "keepPull",
type: "bool",
},
{
internalType: "uint256",
name: "newLimit",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
],
name: "collateralBalanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [
{
internalType: "uint8",
name: "",
type: "uint8",
},
],
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: [],
name: "detachedFromRewardController",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getBaselinePercentage",
outputs: [
{
internalType: "uint16",
name: "",
type: "uint16",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getIncentivesController",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getOwner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getPoolName",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getRate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getRewardController",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getScaleIndex",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
],
name: "getScaledUserBalanceAndSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getTreasury",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
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: [
{
components: [
{
internalType: "address",
name: "pool",
type: "address",
},
{
internalType: "address",
name: "treasury",
type: "address",
},
{
internalType: "address",
name: "underlyingAsset",
type: "address",
},
{
internalType: "uint8",
name: "underlyingDecimals",
type: "uint8",
},
],
internalType: "struct PoolTokenConfig",
name: "config",
type: "tuple",
},
{
internalType: "string",
name: "name",
type: "string",
},
{
internalType: "string",
name: "symbol",
type: "string",
},
{
internalType: "bytes",
name: "params",
type: "bytes",
},
],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "contract IRewardController",
name: "controller",
type: "address",
},
{
internalType: "string",
name: "poolName",
type: "string",
},
{
internalType: "uint16",
name: "baselinePercentage",
type: "uint16",
},
],
internalType: "struct IInitializableRewardPool.InitRewardPoolData",
name: "config",
type: "tuple",
},
],
name: "initializeRewardPool",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "initializedRewardPoolWith",
outputs: [
{
components: [
{
internalType: "contract IRewardController",
name: "controller",
type: "address",
},
{
internalType: "string",
name: "poolName",
type: "string",
},
{
internalType: "uint16",
name: "baselinePercentage",
type: "uint16",
},
],
internalType: "struct IInitializableRewardPool.InitRewardPoolData",
name: "",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "isPaused",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "provider",
type: "address",
},
{
internalType: "uint256",
name: "scaledAmount",
type: "uint256",
},
],
name: "lockSubBalance",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "index",
type: "uint256",
},
{
internalType: "bool",
name: "repayOverdraft",
type: "bool",
},
],
name: "mint",
outputs: [
{
internalType: "bool",
name: "firstBalance",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "index",
type: "uint256",
},
],
name: "mintToTreasury",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "nonces",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "address",
name: "spender",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint8",
name: "v",
type: "uint8",
},
{
internalType: "bytes32",
name: "r",
type: "bytes32",
},
{
internalType: "bytes32",
name: "s",
type: "bytes32",
},
],
name: "permit",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "provider",
type: "address",
},
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "scaledAmount",
type: "uint256",
},
],
name: "provideSubBalance",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "provider",
type: "address",
},
],
name: "removeRewardProvider",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "removeSubBalanceOperator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "prevProvider",
type: "address",
},
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "prevScaledAmount",
type: "uint256",
},
{
internalType: "address",
name: "newProvider",
type: "address",
},
{
internalType: "uint256",
name: "newScaledAmount",
type: "uint256",
},
],
name: "replaceSubBalance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "provider",
type: "address",
},
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "scaledAmount",
type: "uint256",
},
{
internalType: "bool",
name: "preferOverdraft",
type: "bool",
},
],
name: "returnSubBalance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
],
name: "rewardedBalanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
],
name: "scaledBalanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "scaledTotalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint16",
name: "factor",
type: "uint16",
},
],
name: "setBaselinePercentage",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "hook",
type: "address",
},
],
name: "setIncentivesController",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint16",
name: "overdraftTolerancePct",
type: "uint16",
},
],
name: "setOverdraftTolerancePct",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bool",
name: "paused",
type: "bool",
},
],
name: "setPaused",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "transfer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "address",
name: "recipient",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "transferFrom",
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: "scaledAmount",
type: "uint256",
},
],
name: "transferLockedBalance",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "user",
type: "address",
},
{
internalType: "address",
name: "receiver",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint256",
name: "index",
type: "uint256",
},
{
internalType: "bool",
name: "transferUnderlying",
type: "bool",
},
],
name: "transferOnLiquidation",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "target",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "transferUnderlyingTo",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "provider",
type: "address",
},
{
internalType: "uint256",
name: "scaledAmount",
type: "uint256",
},
{
internalType: "address",
name: "transferTo",
type: "address",
},
],
name: "unlockSubBalance",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "baseline",
type: "uint256",
},
],
name: "updateBaseline",
outputs: [
{
internalType: "bool",
name: "hasBaseline",
type: "bool",
},
{
internalType: "uint256",
name: "appliedRate",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "updatePool",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "updateTreasury",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "uint256",
name: "subtractedValue",
type: "uint256",
},
],
name: "useAllowance",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
];
const _bytecode = "0x60806040526002620000146001606462000753565b6200002190606462000753565b6200002d919062000718565b600f805461ffff191661ffff92909216919091179055620000526001600019620007a2565b60145560006015553480156200006757600080fd5b5060008080808080600060408051602080820180845260008084528451928301909452838252825192939192620000a091839162000657565b508151620000b690600190602085019062000657565b506002805460ff929092166001600160a81b0319909216919091176101006001600160a01b03958616021790555050600380546001600160a01b03199081169483169490941790556004805490931691161790556040805160208101909152600081526200012a908490849084906200015e565b5062000138915050620001a7565b601380546001600160a01b0319166001600160a01b03929092169190911790556200084d565b600a80546001600160a01b0319166001600160a01b03861617905561ffff8216156200018f576200018f8262000255565b8215620001a157620001a1836200033a565b50505050565b467f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001d362000380565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060105550565b6200025f6200039c565b61ffff81166200027b576200027560006200033a565b620002e3565b620002896001606462000753565b6200029690606462000753565b61ffff168161ffff161115620002e35760405162461bcd60e51b815260206004820152600d60248201526c696c6c6567616c2076616c756560981b60448201526064015b60405180910390fd5b600a805461ffff60a01b1916600160a01b61ffff8416908102919091179091556040519081527fa4a0021d5a3e887ed39092287593218ba56daabb698755739666df81df918409906020015b60405180910390a150565b620003446200039c565b6200034f81620003f8565b6040518181527fe65c987b2e4668e09ba867026921588005b2b2063607a1e7e7d91683c8f91b7b906020016200032f565b6060620003976200041160201b6200098f1760201c565b905090565b600a546001600160a01b0316620003f65760405162461bcd60e51b815260206004820152601660248201527f636f6e74726f6c6c6572206973207265717569726564000000000000000000006044820152606401620002da565b565b6200040e81620004ab60201b620023311760201c565b50565b6060600080546200042290620007e4565b80601f01602080910402602001604051908101604052809291908181526020018280546200045090620007e4565b8015620004a15780601f106200047557610100808354040283529160200191620004a1565b820191906000526020600020905b8154815290600101906020018083116200048357829003601f168201915b5050505050905090565b6200040e81426007546001600160e01b0316821415620004c9575050565b6001600160e01b03821115620004de57600080fd5b60075463ffffffff600160e01b909104811690821681146200054b576007546001600160e01b0390811690620005179084906200055016565b600780546001600160e01b0319166001600160e01b0386811691909117909155620001a1908281169084908690620005cf16565b505050565b60075463ffffffff600160e01b90910481169082161015620005aa5760405162461bcd60e51b8152602060048201526012602482015271726574726f6163746976652075706461746560701b6044820152606401620002da565b6007805463ffffffff909216600160e01b026001600160e01b03909216919091179055565b600954620005dc57505050565b8163ffffffff168163ffffffff16146200054b576009546200060e906ec097ce7bc90715b34b9f10000000006200073c565b6200061a908462000780565b9250620006288282620007bc565b6200063a9063ffffffff168462000780565b600860008282546200064d9190620006fd565b9091555050505050565b8280546200066590620007e4565b90600052602060002090601f016020900481019282620006895760008555620006d4565b82601f10620006a457805160ff1916838001178555620006d4565b82800160010185558215620006d4579182015b82811115620006d4578251825591602001919060010190620006b7565b50620006e2929150620006e6565b5090565b5b80821115620006e25760008155600101620006e7565b6000821982111562000713576200071362000821565b500190565b600061ffff8084168062000730576200073062000837565b92169190910492915050565b6000826200074e576200074e62000837565b500490565b600061ffff8083168185168183048111821515161562000777576200077762000821565b02949350505050565b60008160001904831182151516156200079d576200079d62000821565b500290565b600082821015620007b757620007b762000821565b500390565b600063ffffffff83811690831681811015620007dc57620007dc62000821565b039392505050565b600181811c90821680620007f957607f821691505b602082108114156200081b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6155b8806200085d6000396000f3fe608060405234801561001057600080fd5b50600436106103e65760003560e01c8063781603761161020a578063b187bd2611610125578063dbf110a7116100b8578063e4ae9af711610087578063e4ae9af71461090e578063e655dbd814610921578063f6fc84d214610934578063fc147d4a14610947578063ff85a2ba1461095a57600080fd5b8063dbf110a7146108b3578063dd62ed3e146108c6578063dde43cba146108ff578063e3161ddd1461090657600080fd5b8063c964a2f2116100f4578063c964a2f214610872578063d299398314610885578063d505accf1461088d578063d7020d0a146108a057600080fd5b8063b187bd2614610825578063b1bf962d14610837578063b6fe2e9c1461083f578063b9844d8d1461085257600080fd5b806395d89b411161019d578063a8346a8c1161016c578063a8346a8c146107b0578063a9059cbb146107ee578063a9dd770214610801578063b16a19de1461081457600080fd5b806395d89b41146107855780639c7697871461078d5780639cfa776814610795578063a457c2d71461079d57600080fd5b80637fcea80e116101d95780637fcea80e14610717578063893d20e81461072a5780638abc37d31461074057806392efda791461077457600080fd5b806378160376146106a85780637c6ad541146106c85780637df5bd3b146106db5780637ecebe00146106ee57600080fd5b80633644e515116103055780634efecaa511610298578063679aefce11610267578063679aefce146106635780636ea9ba541461066b57806370a082311461067e5780637535d2461461069157806375d26413146106a257600080fd5b80634efecaa51461062257806355f4f19714610635578063568ed0ed1461063d57806359e67e921461065057600080fd5b80633b19e84a116102d45780633b19e84a146105b65780634794c1d1146105db5780634800df8c146105ee5780634d25c4f11461060157600080fd5b80633644e5151461057257806337a926261461057b578063395093511461058e5780633a7d4089146105a157600080fd5b80631dd0f4831161037d5780632f8dc4ea1161034c5780632f8dc4ea146105105780633079fac21461052357806330adf81f14610536578063313ce5671461055d57600080fd5b80631dd0f483146104c457806320531b17146104d757806323b872dd146104ea578063296637ce146104fd57600080fd5b80630ca2103d116103b95780630ca2103d1461046a57806316c38b3c1461049457806318160ddd146104a95780631da24f3e146104b157600080fd5b806306fdde03146103eb5780630746363d14610409578063095ea7b31461041f5780630afbcdc914610442575b600080fd5b6103f361098f565b604051610400919061529b565b60405180910390f35b610411610a21565b60405190815260200161040056