@descent-protocol/sdk
Version:
A Typescript library for interacting with the Descent Protocol
156 lines (148 loc) • 4.68 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
Contract,
ContractFactory,
ContractTransactionResponse,
Interface,
} from "ethers";
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
import type { NonPayableOverrides } from "../common";
import type { Rate, RateInterface } from "../Rate";
const _abi = [
{
inputs: [
{
components: [
{
internalType: "uint256",
name: "rate",
type: "uint256",
},
{
internalType: "uint256",
name: "accumulatedRate",
type: "uint256",
},
{
internalType: "uint256",
name: "lastUpdateTime",
type: "uint256",
},
],
internalType: "struct IVault.RateInfo",
name: "_rateInfo",
type: "tuple",
},
],
name: "calculateCurrentAccumulatedRate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "uint256",
name: "rate",
type: "uint256",
},
{
internalType: "uint256",
name: "accumulatedRate",
type: "uint256",
},
{
internalType: "uint256",
name: "lastUpdateTime",
type: "uint256",
},
],
internalType: "struct IVault.RateInfo",
name: "_baseRateInfo",
type: "tuple",
},
{
components: [
{
internalType: "uint256",
name: "rate",
type: "uint256",
},
{
internalType: "uint256",
name: "accumulatedRate",
type: "uint256",
},
{
internalType: "uint256",
name: "lastUpdateTime",
type: "uint256",
},
],
internalType: "struct IVault.RateInfo",
name: "_collateralRateInfo",
type: "tuple",
},
],
name: "calculateCurrentTotalAccumulatedRate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
] as const;
const _bytecode =
"0x608060405234801561001057600080fd5b506101a0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063cf5696cb1461003b578063d14a27fd14610060575b600080fd5b61004e6100493660046100e3565b610073565b60405190815260200160405180910390f35b61004e61006e366004610118565b61009a565b600061007e8361009a565b6100878361009a565b6100919190610163565b90505b92915050565b6000806100ab604084013542610176565b6100b6908435610189565b6100c4906020850135610163565b9392505050565b6000606082840312156100dd57600080fd5b50919050565b60008060c083850312156100f657600080fd5b61010084846100cb565b915061010f84606085016100cb565b90509250929050565b60006060828403121561012a57600080fd5b61009183836100cb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561009457610094610134565b8181038181111561009457610094610134565b80820281158282048414176100945761009461013456";
type RateConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: RateConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class Rate__factory extends ContractFactory {
constructor(...args: RateConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override getDeployTransaction(
overrides?: NonPayableOverrides & { from?: string }
): Promise<ContractDeployTransaction> {
return super.getDeployTransaction(overrides || {});
}
override deploy(overrides?: NonPayableOverrides & { from?: string }) {
return super.deploy(overrides || {}) as Promise<
Rate & {
deploymentTransaction(): ContractTransactionResponse;
}
>;
}
override connect(runner: ContractRunner | null): Rate__factory {
return super.connect(runner) as Rate__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): RateInterface {
return new Interface(_abi) as RateInterface;
}
static connect(address: string, runner?: ContractRunner | null): Rate {
return new Contract(address, _abi, runner) as unknown as Rate;
}
}