@soma-finance/core-contracts
Version:
SOMA Finance core contracts
707 lines • 17.8 kB
JavaScript
"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ISomaEarn__factory = void 0;
const ethers_1 = require("ethers");
const _erc165InterfaceId = "0xda7389a1";
const _erc1820InterfaceId = "0x64b54b307cf487481b3ee1e4cd741c4676f003aa69985b78ca6f522b1bdb802f";
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint48",
name: "prevStartDate",
type: "uint48",
},
{
indexed: false,
internalType: "uint48",
name: "prevEndDate",
type: "uint48",
},
{
indexed: false,
internalType: "uint48",
name: "newStartDate",
type: "uint48",
},
{
indexed: false,
internalType: "uint48",
name: "newEndDate",
type: "uint48",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "DatesUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "DelegationAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
components: [
{
internalType: "uint8",
name: "percentLocked",
type: "uint8",
},
{
internalType: "uint8",
name: "lockDuration",
type: "uint8",
},
],
indexed: false,
internalType: "struct ISomaEarn.DelegationConfig",
name: "prevConfig",
type: "tuple",
},
{
components: [
{
internalType: "uint8",
name: "percentLocked",
type: "uint8",
},
{
internalType: "uint8",
name: "lockDuration",
type: "uint8",
},
],
indexed: false,
internalType: "struct ISomaEarn.DelegationConfig",
name: "newConfig",
type: "tuple",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "DelegationConfigUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "fromPoolId",
type: "bytes32",
},
{
indexed: true,
internalType: "bytes32",
name: "toPoolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "DelegationMoved",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
indexed: false,
internalType: "uint256",
name: "maxUserDelegation",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "maxTotalDelegation",
type: "uint256",
},
{
indexed: false,
internalType: "bytes32",
name: "requiredPrivileges",
type: "bytes32",
},
{
indexed: false,
internalType: "bool",
name: "enabled",
type: "bool",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "PoolUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
indexed: true,
internalType: "address",
name: "token",
type: "address",
},
],
name: "TokenCreated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "prevTo",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "newTo",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
],
name: "WithdrawToUpdated",
type: "event",
},
{
inputs: [],
name: "GLOBAL_ADMIN_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "LOCAL_ADMIN_ROLE",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "SOMA_EARN_TOKEN",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "asset",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "balanceOf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "delegate",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "delegationConfig",
outputs: [
{
components: [
{
internalType: "uint8",
name: "percentLocked",
type: "uint8",
},
{
internalType: "uint8",
name: "lockDuration",
type: "uint8",
},
],
internalType: "struct ISomaEarn.DelegationConfig",
name: "",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
],
name: "enabled",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "endDate",
outputs: [
{
internalType: "uint48",
name: "",
type: "uint48",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "id",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_id",
type: "uint256",
},
{
internalType: "address",
name: "_asset",
type: "address",
},
{
internalType: "address",
name: "_withdrawTo",
type: "address",
},
{
internalType: "uint48",
name: "_startDate",
type: "uint48",
},
{
internalType: "uint48",
name: "_endDate",
type: "uint48",
},
],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
],
name: "maxTotalDelegation",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
],
name: "maxUserDelegation",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "fromPoolId",
type: "bytes32",
},
{
internalType: "bytes32",
name: "toPoolId",
type: "bytes32",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "moveDelegation",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
],
name: "requiredPrivileges",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "setWithdrawTo",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "startDate",
outputs: [
{
internalType: "uint48",
name: "",
type: "uint48",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
],
name: "token",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint48",
name: "newStartDate",
type: "uint48",
},
{
internalType: "uint48",
name: "newEndDate",
type: "uint48",
},
],
name: "updateDateConfig",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "uint8",
name: "percentLocked",
type: "uint8",
},
{
internalType: "uint8",
name: "lockDuration",
type: "uint8",
},
],
internalType: "struct ISomaEarn.DelegationConfig",
name: "newConfig",
type: "tuple",
},
],
name: "updateDelegationConfig",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
internalType: "uint256",
name: "maxUserDelegation",
type: "uint256",
},
{
internalType: "uint256",
name: "maxTotalDelegation",
type: "uint256",
},
{
internalType: "bytes32",
name: "requiredPrivileges",
type: "bytes32",
},
{
internalType: "bool",
name: "enabled",
type: "bool",
},
],
name: "updatePool",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "poolId",
type: "bytes32",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "userDelegation",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "withdrawTo",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
];
class ISomaEarn__factory {
static createInterface() {
return new ethers_1.utils.Interface(_abi);
}
static connect(address, signerOrProvider) {
return new ethers_1.Contract(address, _abi, signerOrProvider);
}
}
exports.ISomaEarn__factory = ISomaEarn__factory;
ISomaEarn__factory.erc165InterfaceId = _erc165InterfaceId;
ISomaEarn__factory.erc1820InterfaceId = _erc1820InterfaceId;
ISomaEarn__factory.abi = _abi;
//# sourceMappingURL=ISomaEarn__factory.js.map