diff --git a/.gitignore b/.gitignore
index c22bcf0d..ad77000f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,4 @@ coverage/
packages/*/dist/
node_modules
package-lock.json
-.idea/
+.idea
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0665342d..c3181051 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -116,5 +116,5 @@ also in the package.json paste these in:
"types": "./dist/esm/index.d.ts",
```
-Thats it now start writing your logic, you must write your typescript code in
+That's it. Now start writing your logic. You must write your typescript code in
the `src` folder in your package.
diff --git a/README.md b/README.md
index d66413f0..18cc7848 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-
+
Aave Utilities
-The Aave Protocol is a decentralized non-custodial liquidity protocol
-where users can participate as suppliers or borrowers. The protocol is a set of
-open source smart contracts which facilitate the logic of user interactions.
-These contracts, and all user transactions/balances are stored on a
-public ledger called a blockchain, making them accessible to anyone
+The Aave Protocol is a decentralized non-custodial liquidity protocol where
+users can participate as suppliers or borrowers. The protocol is a set of open
+source smart contracts which facilitate the logic of user interactions. These
+contracts, and all user transactions/balances are stored on a public ledger
+called a blockchain, making them accessible to anyone
Aave Utilities is a JavaScript SDK for interacting with V2 and V3 of the Aave
Protocol, an upgrade to the existing [aave-js](https://github.com/aave/aave-js)
@@ -16,9 +16,9 @@ The `@aave/math-utils` package contains methods for formatting raw
([ethers.js](#ethers.js)) or indexed ([subgraph](#subgraph),
[caching server](#caching-server)) contract data for usage on a frontend
-The `@aave/contract-helpers` package contains methods for generating transactions
-based on method and parameter inputs. It can be used to read and write data to the
-on-chain protocol contracts.
+The `@aave/contract-helpers` package contains methods for generating
+transactions based on method and parameter inputs. Can be used to read and write
+data on the protocol contracts.
@@ -122,7 +122,7 @@ samples below:
[ethers.js](https://docs.ethers.io/v5/) is a library for interacting with
Ethereum and other EVM compatible blockchains. To install:
-The first step to query contract data with ethers is to inialize a `provider`,
+The first step to query contract data with ethers is to initialize a `provider`,
there are a [variety](https://docs.ethers.io/v5/api/providers/) to choose from,
all of them requiring the an rpcURL
@@ -153,7 +153,6 @@ const provider = new ethers.providers.StaticJsonRpcProvider(
);
// Aave protocol contract addresses, will be different for each market and can be found at https://docs.aave.com/developers/deployed-contracts/deployed-contracts
-// For V3 Testnet Release, contract addresses can be found here https://github.com/aave/aave-ui/blob/feat/arbitrum-clean/src/ui-config/markets/index.ts
const uiPoolDataProviderAddress = '0xa2DC1422E0cE89E1074A6cd7e2481e8e9c4415A6';
const uiIncentiveDataProviderAddress =
'0xD01ab9a6577E1D84F142e44D49380e23A340387d';
@@ -216,7 +215,7 @@ frontend interface.
### Subgraph
A subgraph indexes events emitted from a smart contract and exposes a graphql
-endpoing to query data from. Each network where the protocol is deployed is a
+endpoint to query data from. Each network where the protocol is deployed is a
corresponding subgraph. Subgraph can be queried directly using the playground
(links below) and integrated into applications directly via TheGraph API. Check
out these guides from
@@ -487,7 +486,7 @@ All V3 market use USD based oracles, so baseCurrencyData can be hardcoded:
Incentives
-Samples for incentives data coming soon. Uses `incentivesControlllers` field and
+Samples for incentives data coming soon. Uses `incentivesControllers` field and
maps incentives to reserves and userReserves.
@@ -500,7 +499,7 @@ maps incentives to reserves and userReserves.
Given that the Aave Ui has decentralized hosting with IPFS, it makes sense to
not require any API keys to run the UI, but this means only public rpc endpoints
-are used which are quickly rate limited. To account for this, Aave has publushed
+are used which are quickly rate limited. To account for this, Aave has published
a [caching server](https://github.com/aave/aave-ui-caching-server) to perform
contract queries on one server, then serve this data to all frontend users
through a graphQL endpoint.
@@ -793,7 +792,7 @@ const txs: EthereumTransactionTypeExtended[] = await pool.supply({
onBehalfOf,
});
-// If the user has not appoved the pool contract to spend their tokens, txs will also contain two transactions: approve and supply. These approval and supply transactions can be submitted just as in V2,OR you can skip the first approval transaction with a gasless signature by using signERC20Approval -> supplyWithPermit which are documented below
+// If the user has not approved the pool contract to spend their tokens, txs will also contain two transactions: approve and supply. These approval and supply transactions can be submitted just as in V2,OR you can skip the first approval transaction with a gasless signature by using signERC20Approval -> supplyWithPermit which are documented below
// If there is no approval transaction, then supply() can called without the need for an approval or signature
```
@@ -837,7 +836,7 @@ const dataToSign: string = await pool.signERC20Approval({
user,
reserve,
amount,
- deadline
+ deadline,
});
const signature = await provider.send('eth_signTypedData_v4', [
@@ -855,7 +854,7 @@ const signature = await provider.send('eth_signTypedData_v4', [
### supplyWithPermit
Same underlying method as `supply` but uses a signature based approval passed as
-a paramter.
+a parameter.
Sample Code
@@ -894,7 +893,7 @@ Submit transaction as shown [here](#submitting-transactions)
Borrow an `amount` of `reserve` asset.
-User must have a collaterised position (i.e. aTokens in their wallet)
+User must have a collateralized position (i.e. aTokens in their wallet)
Sample Code
@@ -908,7 +907,7 @@ const pool = new Pool(provider, {
});
/*
-- @param `user` The ethereum address that repays
+- @param `user` The ethereum address that repays
- @param `reserve` The ethereum address of the reserve on which the user borrowed
- @param `amount` The amount to repay, or (-1) if the user wants to repay everything
- @param `interestRateMode` // Whether the borrow will incur a stable (InterestRate.Stable) or variable (InterestRate.Variable) interest rate
@@ -965,7 +964,7 @@ const txs: EthereumTransactionTypeExtended[] = await pool.repay({
onBehalfOf,
});
-// If the user has not appoved the pool contract to spend their tokens, txs will also contain two transactions: approve and repay. This approval transaction can be submitted just as in V2, OR you approve with a gasless signature by using signERC20Approval -> supplyWithPermit which are documented below
+// If the user has not approved the pool contract to spend their tokens, txs will also contain two transactions: approve and repay. This approval transaction can be submitted just as in V2, OR you approve with a gasless signature by using signERC20Approval -> supplyWithPermit which are documented below
// If there is no approval transaction, then repay() can called without the need for an approval or signature
```
@@ -979,7 +978,7 @@ Submit transaction(s) as shown [here](#submitting-transactions)
### repayWithPermit
Same underlying method as `repay` but uses a signature based approval passed as
-a paramter.
+a parameter.
Sample Code
@@ -1215,18 +1214,18 @@ const pool = new Pool(provider, {
});
/*
-- @param `user` The ethereum address that will liquidate the position
-- @param @optional `flash` If the transaction will be executed through a flasloan(true) or will be done directly through the adapters(false). Defaults to false
-- @param `fromAsset` The ethereum address of the asset you want to swap
-- @param `fromAToken` The ethereum address of the aToken of the asset you want to swap
-- @param `toAsset` The ethereum address of the asset you want to swap to (get)
-- @param `fromAmount` The amount you want to swap
-- @param `toAmount` The amount you want to get after the swap
-- @param `maxSlippage` The max slippage that the user accepts in the swap
-- @param @optional `permitSignature` A permit signature of the tx. Only needed when previously signed (Not needed at the moment).
-- @param `swapAll` Bool indicating if the user wants to swap all the current collateral
-- @param @optional `onBehalfOf` The ethereum address for which user is swaping. It will default to the user address
-- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
+- @param `user` The ethereum address that will liquidate the position
+- @param @optional `flash` If the transaction will be executed through a flashloan(true) or will be done directly through the adapters(false). Defaults to false
+- @param `fromAsset` The ethereum address of the asset you want to swap
+- @param `fromAToken` The ethereum address of the aToken of the asset you want to swap
+- @param `toAsset` The ethereum address of the asset you want to swap to (get)
+- @param `fromAmount` The amount you want to swap
+- @param `toAmount` The amount you want to get after the swap
+- @param `maxSlippage` The max slippage that the user accepts in the swap
+- @param @optional `permitSignature` A permit signature of the tx. Only needed when previously signed (Not needed at the moment).
+- @param `swapAll` Bool indicating if the user wants to swap all the current collateral
+- @param @optional `onBehalfOf` The ethereum address for which user is swapping. It will default to the user address
+- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
- @param @optional `useEthPath` Boolean to indicate if the swap will use an ETH path. Defaults to false
*/
const txs: EthereumTransactionTypeExtended[] = await lendingPool.swapCollateral(
@@ -1271,18 +1270,18 @@ const pool = new Pool(provider, {
});
/*
-- @param `user` The ethereum address that will liquidate the position
-- @param `fromAsset` The ethereum address of the asset you want to repay with (collateral)
-- @param `fromAToken` The ethereum address of the aToken of the asset you want to repay with (collateral)
-- @param `assetToRepay` The ethereum address of the asset you want to repay
+- @param `user` The ethereum address that will liquidate the position
+- @param `fromAsset` The ethereum address of the asset you want to repay with (collateral)
+- @param `fromAToken` The ethereum address of the aToken of the asset you want to repay with (collateral)
+- @param `assetToRepay` The ethereum address of the asset you want to repay
- @param `repayWithAmount` The amount of collateral you want to repay the debt with
-- @param `repayAmount` The amount of debt you want to repay
+- @param `repayAmount` The amount of debt you want to repay
- @param `permitSignature` A permit signature of the tx. Optional
- @param @optional `repayAllDebt` Bool indicating if the user wants to repay all current debt. Defaults to false
- @param `rateMode` //Enum indicating the type of the interest rate of the collateral
-- @param @optional `onBehalfOf` The ethereum address for which user is swaping. It will default to the user address
-- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
-- @param @optional `flash` If the transaction will be executed through a flasloan(true) or will be done directly through the adapters(false). Defaults to false
+- @param @optional `onBehalfOf` The ethereum address for which user is swapping. It will default to the user address
+- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
+- @param @optional `flash` If the transaction will be executed through a flashloan(true) or will be done directly through the adapters(false). Defaults to false
- @param @optional `useEthPath` Boolean to indicate if the swap will use an ETH path. Defaults to false
*/
const txs: EthereumTransactionTypeExtended[] =
@@ -1314,7 +1313,7 @@ Submit transaction(s) as shown [here](#submitting-transactions)
Function to enable eMode on a user account IF conditions are met:
To enable, pass `categoryId` of desired eMode (1 = stablecoins), can only be
-enabled if a users currently borrowed assests are ALL within this eMode category
+enabled if a users currently borrowed assets are ALL within this eMode category
To disable, pass `categoryId` of 0, can only be disabled if new LTV will not
leave user undercollateralized
@@ -1390,7 +1389,7 @@ Submit transaction(s) as shown [here](#submitting-transactions)
Borrow an `amount` of `reserve` asset.
-User must have a collaterised position (i.e. aTokens in their wallet)
+User must have a collateralized position (i.e. aTokens in their wallet)
@@ -1406,8 +1405,8 @@ const lendingPool = new LendingPool(provider, {
});
/*
-- @param `user` The ethereum address that will receive the borrowed amount
-- @param `reserve` The ethereum address of the reserve asset
+- @param `user` The ethereum address that will receive the borrowed amount
+- @param `reserve` The ethereum address of the reserve asset
- @param `amount` The amount to be borrowed, in human readable units (e.g. 2.5 ETH)
- @param `interestRateMode`//Whether the borrow will incur a stable (InterestRate.Stable) or variable (InterestRate.Variable) interest rate
- @param @optional `debtTokenAddress` The ethereum address of the debt token of the asset you want to borrow. Only needed if the reserve is ETH mock address
@@ -1451,7 +1450,7 @@ const lendingPool = new LendingPool(provider, {
});
/*
-- @param `user` The ethereum address that repays
+- @param `user` The ethereum address that repays
- @param `reserve` The ethereum address of the reserve on which the user borrowed
- @param `amount` The amount to repay, or (-1) if the user wants to repay everything
- @param `interestRateMode` // Whether stable (InterestRate.Stable) or variable (InterestRate.Variable) debt will be repaid
@@ -1558,7 +1557,7 @@ const lendingPool = new LendingPool(provider, {
/*
- @param `user` The ethereum address that enables or disables the deposit as collateral
-- @param `reserve` The ethereum address of the reserve
+- @param `reserve` The ethereum address of the reserve
- @param `useAsCollateral` Boolean, true if the user wants to use the deposit as collateral, false otherwise
*/
const txs: EthereumTransactionTypeExtended[] = lendingPool.setUsageAsCollateral(
@@ -1594,10 +1593,10 @@ const lendingPool = new LendingPool(provider, {
});
/*
-- @param `liquidator` The ethereum address that will liquidate the position
-- @param `liquidatedUser` The address of the borrower
-- @param `debtReserve` The ethereum address of the principal reserve
-- @param `collateralReserve` The address of the collateral to liquidated
+- @param `liquidator` The ethereum address that will liquidate the position
+- @param `liquidatedUser` The address of the borrower
+- @param `debtReserve` The ethereum address of the principal reserve
+- @param `collateralReserve` The address of the collateral to liquidated
- @param `purchaseAmount` The amount of principal that the liquidator wants to repay
- @param @optional `getAToken` Boolean to indicate if the user wants to receive the aToken instead of the asset. Defaults to false
*/
@@ -1638,17 +1637,17 @@ const lendingPool = new LendingPool(provider, {
});
/*
-- @param `user` The ethereum address that will liquidate the position
-- @param @optional `flash` If the transaction will be executed through a flasloan(true) or will be done directly through the adapters(false). Defaults to false
-- @param `fromAsset` The ethereum address of the asset you want to swap
+- @param `user` The ethereum address that will liquidate the position
+- @param @optional `flash` If the transaction will be executed through a flashloan(true) or will be done directly through the adapters(false). Defaults to false
+- @param `fromAsset` The ethereum address of the asset you want to swap
- @param `fromAToken` The ethereum address of the aToken of the asset you want to swap
-- @param `toAsset` The ethereum address of the asset you want to swap to (get)
-- @param `fromAmount` The amount you want to swap
-- @param `toAmount` The amount you want to get after the swap
-- @param `maxSlippage` The max slippage that the user accepts in the swap
+- @param `toAsset` The ethereum address of the asset you want to swap to (get)
+- @param `fromAmount` The amount you want to swap
+- @param `toAmount` The amount you want to get after the swap
+- @param `maxSlippage` The max slippage that the user accepts in the swap
- @param @optional `permitSignature` A permit signature of the tx. Only needed when previously signed (Not needed at the moment).
- @param `swapAll` Bool indicating if the user wants to swap all the current collateral
-- @param @optional `onBehalfOf` The ethereum address for which user is swaping. It will default to the user address
+- @param @optional `onBehalfOf` The ethereum address for which user is swapping. It will default to the user address
- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
- @param @optional `useEthPath` Boolean to indicate if the swap will use an ETH path. Defaults to false
*/
@@ -1698,18 +1697,18 @@ const lendingPool = new LendingPool(provider, {
});
/*
-- @param `user` The ethereum address that will liquidate the position
+- @param `user` The ethereum address that will liquidate the position
- @param `fromAsset` The ethereum address of the asset you want to repay with (collateral)
- @param `fromAToken` The ethereum address of the aToken of the asset you want to repay with (collateral)
-- @param `assetToRepay` The ethereum address of the asset you want to repay
+- @param `assetToRepay` The ethereum address of the asset you want to repay
- @param `repayWithAmount` The amount of collateral you want to repay the debt with
-- @param `repayAmount` The amount of debt you want to repay
+- @param `repayAmount` The amount of debt you want to repay
- @param `permitSignature` A permit signature of the tx. Optional
- @param @optional `repayAllDebt` Bool indicating if the user wants to repay all current debt. Defaults to false
- @param `rateMode` //Enum indicating the type of the interest rate of the collateral
-- @param @optional `onBehalfOf` The ethereum address for which user is swaping. It will default to the user address
+- @param @optional `onBehalfOf` The ethereum address for which user is swapping. It will default to the user address
- @param @optional `referralCode` Integrators are assigned a referral code and can potentially receive rewards. It defaults to 0 (no referrer)
-- @param @optional `flash` If the transaction will be executed through a flasloan(true) or will be done directly through the adapters(false). Defaults to false
+- @param @optional `flash` If the transaction will be executed through a flashloan(true) or will be done directly through the adapters(false). Defaults to false
- @param @optional `useEthPath` Boolean to indicate if the swap will use an ETH path. Defaults to false
*/
const txs: EthereumTransactionTypeExtended[] =
@@ -1773,10 +1772,10 @@ const governanceService = new AaveGovernanceService(rpcProvider, {
/*
- @param `user` The ethereum address that will create the proposal
- @param `targets` list of contracts called by proposal's associated transactions
-- @param `values` list of value in wei for each propoposal's associated transaction
+- @param `values` list of value in wei for each proposal's associated transaction
- @param `signatures` list of function signatures (can be empty) to be used when created the callData
- @param `calldatas` list of calldatas: if associated signature empty, calldata ready, else calldata is arguments
-- @param `withDelegatecalls` boolean, true = transaction delegatecalls the taget, else calls the target
+- @param `withDelegatecalls` boolean, true = transaction delegatecalls the target, else calls the target
- @param `ipfsHash` IPFS hash of the proposal
- @param `executor` The ExecutorWithTimelock contract that will execute the proposal: ExecutorType.Short or ExecutorType.Long
*/
@@ -1929,7 +1928,7 @@ import { GovernancePowerDelegationTokenService } from '@aave/contract-helpers';
const powerDelegation = new GovernancePowerDelegationTokenService(rpcProvider);
/*
-- @param `user` The ethereum address that will create the proposal
+- @param `user` The ethereum address that will create the proposal
- @param `delegatee` The ethereum address to which the user wants to delegate proposition power and voting power
- @param `governanceToken` The ethereum address of the governance token
*/
@@ -1956,7 +1955,7 @@ import { GovernancePowerDelegationTokenService } from '@aave/contract-helpers';
const powerDelegation = new GovernancePowerDelegationTokenService(rpcProvider);
/*
-- @param `user` The ethereum address that will create the proposal
+- @param `user` The ethereum address that will create the proposal
- @param `delegatee` The ethereum address to which the user wants to delegate proposition power and voting power
- @param `delegationType` The type of the delegation the user wants to do: voting power ('0') or proposition power ('1')
- @param `governanceToken` The ethereum address of the governance token
@@ -1994,7 +1993,7 @@ const faucetService = new FaucetService(provider, faucetAddress);
/*
- @param `userAddress` The ethereum address of the wallet the minted tokens will go
-- @param `reserve` The ethereum address of the token you want to mint
+- @param `reserve` The ethereum address of the token you want to mint
- @param `tokenSymbol` The symbol of the token you want to mint
*/
const tx = faucet.mint({ userAddress, reserve, tokenSymbol });
@@ -2008,9 +2007,13 @@ Submit transaction as shown [here](#submitting-transactions)
## Credit Delegation
-Credit delegation is performed on the debtToken contract through the `approveDelegation` function, which approves a spender to borrow a specified amount of that token.
+Credit delegation is performed on the debtToken contract through the
+`approveDelegation` function, which approves a spender to borrow a specified
+amount of that token.
-Accessing delegated credit is done by passing the delegator address as the `onBehalfOf` parameter when calling `borrow` on the `Pool` (V3) or `LendingPool` (V2).
+Accessing delegated credit is done by passing the delegator address as the
+`onBehalfOf` parameter when calling `borrow` on the `Pool` (V3) or `LendingPool`
+(V2).
### approveDelegation
@@ -2018,23 +2021,23 @@ Accessing delegated credit is done by passing the delegator address as the `onBe
Sample Code
```ts
-import { BaseDebtToken, ERC20Service } from "@aave/contract-helpers";
-import { ethers } from "ethers";
+import { BaseDebtToken, ERC20Service } from '@aave/contract-helpers';
+import { ethers } from 'ethers';
// Sample public RPC address for querying polygon mainnet
const provider = new ethers.providers.JsonRpcProvider(
- "https://polygon-rpc.com"
+ 'https://polygon-rpc.com',
);
const delegationServicePolygonV2USDC = new BaseDebtToken(
provider,
- new ERC20Service(provider) // This parameter will be removed in future utils version
+ new ERC20Service(provider), // This parameter will be removed in future utils version
);
const approveDelegation = delegationServicePolygonV2USDC.approveDelegation({
- user: "...", /// delegator
- delegatee: "...",
- debtTokenAddress: "...", // can be any V2 or V3 debt token
+ user: '...', /// delegator
+ delegatee: '...',
+ debtTokenAddress: '...', // can be any V2 or V3 debt token
amount: 1, // in decimals of underlying token
});
```
diff --git a/jest.config.js b/jest.config.js
index 10af533b..7586e402 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -38,7 +38,6 @@ module.exports = {
'packages/contract-helpers/src/paraswap-repayWithCollateralAdapter-contract/typechain',
'packages/contract-helpers/src/lendingPool-contract/typechain',
'packages/contract-helpers/src/v3-migration-contract/typechain',
- 'packages/contract-helpers/src/v3-migration-contract/typechain/factories',
'packages/contract-helpers/src/index.ts',
'packages/math-utils/src/formatters/reserve/index.ts', // TODO: remove
],
diff --git a/packages/contract-helpers/CHANGELOG.md b/packages/contract-helpers/CHANGELOG.md
index cc419936..2e1b1ccb 100644
--- a/packages/contract-helpers/CHANGELOG.md
+++ b/packages/contract-helpers/CHANGELOG.md
@@ -3,35 +3,99 @@
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
-## 1.12.2 (2023-01-12)
+## 1.13.5 (2023-02-03)
-**Note:** Version bump only for package @aave/contract-helpers
+### Bug Fixes
+- Fix typos ([#486](https://github.com/aave/aave-utilities/issues/486))
+ ([db4cef5](https://github.com/aave/aave-utilities/commit/db4cef584a68f951183df25ffa2e8f2042893d21))
+## 1.13.4 (2023-02-03)
+### Bug Fixes
+- check for liq threshold in place of ltv for user collateral check
+ ([#505](https://github.com/aave/aave-utilities/issues/505))
+ ([7c776d2](https://github.com/aave/aave-utilities/commit/7c776d23c50ff0d5240151a922c64e837818283d))
-## 1.12.1 (2023-01-10)
+## 1.13.3 (2023-01-26)
+
+### Bug Fixes
+
+- typechain structure
+ ([#501](https://github.com/aave/aave-utilities/issues/501))
+ ([70f3c4f](https://github.com/aave/aave-utilities/commit/70f3c4f4b066676a37636ed1be913e3056a70766))
+
+## 1.13.2 (2023-01-25)
+
+**Note:** Version bump only for package @aave/contract-helpers
+
+# Change Log
+All notable changes to this project will be documented in this file. See
+[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## 1.13.1 (2023-01-24)
### Bug Fixes
-* change flashloan parameters to have variable debt on v3 instead of stable and variable ([#490](https://github.com/aave/aave-utilities/issues/490)) ([9b8a726](https://github.com/aave/aave-utilities/commit/9b8a7261ba9c3e123798d781312a5388271cef3b))
+<<<<<<< HEAD
+- imports and file loaders
+ ([#477](https://github.com/aave/aave-utilities/issues/477))
+ ([42e8530](https://github.com/aave/aave-utilities/commit/42e853041820a35696c1017eb2fb082aeb9e3c89))
+ =======
+* apply default gas limit estimations
+ ([#499](https://github.com/aave/aave-utilities/issues/499))
+ ([b377452](https://github.com/aave/aave-utilities/commit/b37745255194cc2f8c713bc3451a05dc8bab20a1))
+> > > > > > > master
+# 1.13.0 (2023-01-23)
-# 1.12.0 (2023-01-03)
+<<<<<<< HEAD
+# 1.10.0 (2022-12-14)
### Features
-* add V3Faucet service ([#475](https://github.com/aave/aave-utilities/issues/475)) ([1608398](https://github.com/aave/aave-utilities/commit/160839863a83955d54a4a1e727bb4a22f111c13e))
+=======
+### Features
+- add default gas estimation for borrow and vote
+ ([#492](https://github.com/aave/aave-utilities/issues/492))
+ ([713ad36](https://github.com/aave/aave-utilities/commit/713ad361215f0fcbaaf07f7e374489459d1874ae))
+ > > > > > > > master
+* add default gas estimation for permit actions
+ ([#461](https://github.com/aave/aave-utilities/issues/461))
+ ([7342763](https://github.com/aave/aave-utilities/commit/734276326b1d6b0b2b9aa9965bbd3f310ae0ec37))
+# 1.9.0 (2022-10-14)
+
+## 1.12.2 (2023-01-12)
+
+**Note:** Version bump only for package @aave/contract-helpers
+
+## 1.12.1 (2023-01-10)
+
+### Bug Fixes
+
+- change flashloan parameters to have variable debt on v3 instead of stable and
+ variable ([#490](https://github.com/aave/aave-utilities/issues/490))
+ ([9b8a726](https://github.com/aave/aave-utilities/commit/9b8a7261ba9c3e123798d781312a5388271cef3b))
+
+# 1.12.0 (2023-01-03)
+
+### Features
+
+# <<<<<<< HEAD
+
+- add V3Faucet service
+ ([#475](https://github.com/aave/aave-utilities/issues/475))
+ ([1608398](https://github.com/aave/aave-utilities/commit/160839863a83955d54a4a1e727bb4a22f111c13e))
## 1.11.2 (2022-12-29)
@@ -45,20 +109,12 @@ All notable changes to this project will be documented in this file. See
**Note:** Version bump only for package @aave/contract-helpers
-# 1.10.0 (2022-12-14)
-
-### Features
-
-- add default gas estimation for permit actions
- ([#461](https://github.com/aave/aave-utilities/issues/461))
- ([7342763](https://github.com/aave/aave-utilities/commit/734276326b1d6b0b2b9aa9965bbd3f310ae0ec37))
-
# 1.11.0 (2022-12-21)
-# 1.9.0 (2022-10-14)
-
### Features
+> > > > > > > master
+
- v3 migration ([#465](https://github.com/aave/aave-utilities/issues/465))
([ac9197f](https://github.com/aave/aave-utilities/commit/ac9197f6a2237b34e917d23bc79798efe3e04cb1))
diff --git a/packages/contract-helpers/package.json b/packages/contract-helpers/package.json
index 5208b37f..a8828ded 100644
--- a/packages/contract-helpers/package.json
+++ b/packages/contract-helpers/package.json
@@ -1,6 +1,6 @@
{
"name": "@aave/contract-helpers",
- "version": "1.12.2",
+ "version": "1.13.5",
"sideEffects": false,
"license": "MIT",
"description": "",
diff --git a/packages/contract-helpers/src/commons/BaseService.test.ts b/packages/contract-helpers/src/commons/BaseService.test.ts
index a04a5ecb..0e52cc52 100644
--- a/packages/contract-helpers/src/commons/BaseService.test.ts
+++ b/packages/contract-helpers/src/commons/BaseService.test.ts
@@ -35,7 +35,7 @@ describe('BaseService', () => {
afterEach(() => {
jest.clearAllMocks();
});
- it('Expects to initalize new instance', () => {
+ it('Expects to initialize new instance', () => {
const spy = jest.spyOn(Test__factory, 'connect');
const baseService = new BaseService(provider, Test__factory);
@@ -90,7 +90,7 @@ describe('BaseService', () => {
expect(tx.value).toEqual(DEFAULT_NULL_VALUE_ON_TX);
expect(tx.gasLimit).toEqual(BigNumber.from(1));
});
- it('Expects a tx object with recomended gas limit', async () => {
+ it('Expects a tx object with recommended gas limit', async () => {
const txCallback = baseService.generateTxCallback({
rawTxMethod,
from,
diff --git a/packages/contract-helpers/src/commons/BaseService.ts b/packages/contract-helpers/src/commons/BaseService.ts
index df701625..48737923 100644
--- a/packages/contract-helpers/src/commons/BaseService.ts
+++ b/packages/contract-helpers/src/commons/BaseService.ts
@@ -93,7 +93,7 @@ export default class BaseService {
const { gasLimit, gasPrice: gasPriceProv }: transactionType =
await txCallback();
if (!gasLimit) {
- // If we don't recieve the correct gas we throw a error
+ // If we don't receive the correct gas we throw an error
throw new Error('Transaction calculation error');
}
diff --git a/packages/contract-helpers/src/commons/types.ts b/packages/contract-helpers/src/commons/types.ts
index 82c5cac1..b6a814c1 100644
--- a/packages/contract-helpers/src/commons/types.ts
+++ b/packages/contract-helpers/src/commons/types.ts
@@ -96,6 +96,7 @@ export enum eEthereumTxType {
export enum ProtocolAction {
default = 'default',
supply = 'supply',
+ borrow = 'borrow',
withdraw = 'withdraw',
deposit = 'deposit',
liquidationCall = 'liquidationCall',
@@ -110,6 +111,7 @@ export enum ProtocolAction {
repayWithPermit = 'repayWithPermit',
stake = 'stake',
stakeWithPermit = 'stakeWithPermit',
+ vote = 'vote',
}
export enum GovernanceVote {
diff --git a/packages/contract-helpers/src/commons/utils.ts b/packages/contract-helpers/src/commons/utils.ts
index d0b5c6ef..03ef8ab6 100644
--- a/packages/contract-helpers/src/commons/utils.ts
+++ b/packages/contract-helpers/src/commons/utils.ts
@@ -46,6 +46,10 @@ export const gasLimitRecommendations: GasRecommendationType = {
limit: '300000',
recommended: '300000',
},
+ [ProtocolAction.borrow]: {
+ limit: '400000',
+ recommended: '400000',
+ },
[ProtocolAction.withdraw]: {
limit: '230000',
recommended: '300000',
@@ -98,6 +102,10 @@ export const gasLimitRecommendations: GasRecommendationType = {
limit: '400000',
recommended: '400000',
},
+ [ProtocolAction.vote]: {
+ limit: '125000',
+ recommended: '125000',
+ },
};
export const mintAmountsPerToken: Record = {
diff --git a/packages/contract-helpers/src/gho/GhoDiscountRateStrategyService.ts b/packages/contract-helpers/src/gho/GhoDiscountRateStrategyService.ts
deleted file mode 100644
index 0d66fbc6..00000000
--- a/packages/contract-helpers/src/gho/GhoDiscountRateStrategyService.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import { BigNumber, BigNumberish, providers } from 'ethers';
-import BaseService from '../commons/BaseService';
-import {
- GhoVariableDebtTokenService,
- IGhoVariableDebtTokenService,
-} from './GhoVariableDebtTokenService';
-import type { GhoDiscountRateStrategy } from './typechain/GhoDiscountRateStrategy';
-import { GhoDiscountRateStrategy__factory } from './typechain/GhoDiscountRateStrategy__factory';
-
-interface IGhoDiscountRateStrategyService {
- getGhoDiscountedPerDiscountToken: () => Promise;
- getGhoDiscountRate: () => Promise;
- getGhoMinDiscountTokenBalance: () => Promise;
- getGhoMinDebtTokenBalance: () => Promise;
- calculateDiscountRate: (
- ghoDebtTokenBalance: BigNumberish,
- skAaveBalance: BigNumberish,
- ) => Promise;
-}
-
-/**
- * The service for interacting with the GhoDiscountRateStrategy.sol smart contract
- * https://github.com/aave/gho/blob/main/src/contracts/facilitators/aave/interestStrategy/GhoDiscountRateStrategy.sol
- */
-export class GhoDiscountRateStrategyService
- extends BaseService
- implements IGhoDiscountRateStrategyService
-{
- readonly ghoVariableDebtTokenService: IGhoVariableDebtTokenService;
-
- constructor(
- provider: providers.Provider,
- ghoVariableDebtTokenAddress: string,
- ) {
- super(provider, GhoDiscountRateStrategy__factory);
- this.ghoVariableDebtTokenService = new GhoVariableDebtTokenService(
- provider,
- ghoVariableDebtTokenAddress,
- );
- }
-
- /**
- * Gets the amount of debt that is entitled to get a discount per unit of discount token
- * @returns - A BigNumber representing the amount of GHO tokens per discount token that are eligible to be discounted, expressed with the number of decimals of the discount token
- */
- public async getGhoDiscountedPerDiscountToken() {
- const ghoDiscountRateStrategyAddress =
- await this.ghoVariableDebtTokenService.getDiscountRateStrategy();
- const contract = this.getContractInstance(ghoDiscountRateStrategyAddress);
- // eslint-disable-next-line new-cap
- const result = await contract.GHO_DISCOUNTED_PER_DISCOUNT_TOKEN();
- return result;
- }
-
- /**
- * Gets the percentage of discount to apply to the part of the debt that is entitled to get a discount
- * @returns - A BigNumber representing the current maximum discount rate, expressed in bps, a value of 2000 results in 20.00%
- */
- public async getGhoDiscountRate() {
- const ghoDiscountRateStrategyAddress =
- await this.ghoVariableDebtTokenService.getDiscountRateStrategy();
- const contract = this.getContractInstance(ghoDiscountRateStrategyAddress);
- // eslint-disable-next-line new-cap
- const result = await contract.DISCOUNT_RATE();
- return result;
- }
-
- /**
- * Gets the minimum balance amount of discount token to be entitled to a discount
- * @returns - A BigNumber representing the minimum amount of discount tokens needed to be eligible for a discount, expressed with the number of decimals of the discount token
- */
- public async getGhoMinDiscountTokenBalance() {
- const ghoDiscountRateStrategyAddress =
- await this.ghoVariableDebtTokenService.getDiscountRateStrategy();
- const contract = this.getContractInstance(ghoDiscountRateStrategyAddress);
- // eslint-disable-next-line new-cap
- const result = await contract.MIN_DISCOUNT_TOKEN_BALANCE();
- return result;
- }
-
- /**
- * Gets the minimum balance amount of debt token to be entitled to a discount
- * @returns - A BigNumber representing the minimum amount of debt tokens needed to be eligible for a discount, expressed with the number of decimals of the debt token
- */
- public async getGhoMinDebtTokenBalance() {
- const ghoDiscountRateStrategyAddress =
- await this.ghoVariableDebtTokenService.getDiscountRateStrategy();
- const contract = this.getContractInstance(ghoDiscountRateStrategyAddress);
- // eslint-disable-next-line new-cap
- const result = await contract.MIN_DEBT_TOKEN_BALANCE();
- return result;
- }
-
- /**
- * Calculates the discounted interest rate charged on the borrowed native GHO token from the Aave Protocol. Currently this is set to be 20% on 100 GHO borrowed per stkAAVE held. Additionally, a user's discount rate is updated anytime they send or receive the discount token (stkAAVE). Users are entitled to this discount for a given amount of time without needing to perform any additional actions (i.e. the discount lock period).
- * @param ghoDebtTokenBalance - The balance for the user's GhoVariableDebtToken, i.e. the amount they currently have borrowed from the protocol
- * @param stakedAaveBalance - The balance of the user's stkAAVE token balance
- * @returns - A BigNumber representing the discounted interest rate charged on the borrowed native GHO token, expresed in bps
- */
- public async calculateDiscountRate(
- ghoDebtTokenBalance: BigNumberish,
- stakedAaveBalance: BigNumberish,
- ) {
- const ghoDiscountRateStrategyAddress =
- await this.ghoVariableDebtTokenService.getDiscountRateStrategy();
- const contract = this.getContractInstance(ghoDiscountRateStrategyAddress);
- const result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
- return result;
- }
-}
diff --git a/packages/contract-helpers/src/gho/GhoService.ts b/packages/contract-helpers/src/gho/GhoService.ts
index e98eda8c..699b09eb 100644
--- a/packages/contract-helpers/src/gho/GhoService.ts
+++ b/packages/contract-helpers/src/gho/GhoService.ts
@@ -78,7 +78,7 @@ export class GhoService implements IGhoService {
);
return {
- userGhoDiscountRate: ghoUserData.userGhoDiscountRate.toString(),
+ userGhoDiscountPercent: ghoUserData.userGhoDiscountPercent.toString(),
userDiscountTokenBalance: ghoUserData.userDiscountTokenBalance.toString(),
userGhoScaledBorrowBalance:
ghoUserData.userGhoScaledBorrowBalance.toString(),
diff --git a/packages/contract-helpers/src/gho/GhoTokenService.ts b/packages/contract-helpers/src/gho/GhoTokenService.ts
deleted file mode 100644
index a0f6925b..00000000
--- a/packages/contract-helpers/src/gho/GhoTokenService.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { BigNumber, providers } from 'ethers';
-import BaseService from '../commons/BaseService';
-import type { GhoToken } from './typechain/GhoToken';
-import { GhoToken__factory } from './typechain/GhoToken__factory';
-import type { IGhoToken } from './typechain/IGhoToken';
-
-interface IGhoTokenService {
- totalSupply: () => Promise;
- getFacilitatorsList: () => Promise;
- getFacilitator: (
- facilitatorAddress: string,
- ) => Promise;
- getFacilitatorBucket: (
- facilitatorAddress: string,
- ) => Promise;
-}
-
-/**
- * The service for interacting with the GhoToken.sol smart contract.
- * This contract controls operations minting & burning the native GHO token as well as facilitator management.
- * https://github.com/aave/gho/blob/main/src/contracts/gho/GhoToken.sol
- */
-export class GhoTokenService
- extends BaseService
- implements IGhoTokenService
-{
- readonly ghoTokenAddress: string;
-
- constructor(provider: providers.Provider, ghoTokenAddress: string) {
- super(provider, GhoToken__factory);
- this.ghoTokenAddress = ghoTokenAddress;
- }
-
- /**
- * Gets the total supply for the GHO token. This is the sum of all facilitators' current bucket levels
- * @returns - A BigNumber representing the total supply of GHO
- */
- public async totalSupply() {
- const contract = this.getContractInstance(this.ghoTokenAddress);
- const result = await contract.totalSupply();
- return result;
- }
-
- /**
- * Gets the full list of facilitators for the GHO token
- * @returns - An array of facilitator addresses as strings, which can be used for querying in more detail
- */
- public async getFacilitatorsList() {
- const contract = this.getContractInstance(this.ghoTokenAddress);
- const result = await contract.getFacilitatorsList();
- return result;
- }
-
- /**
- * Gets the instance for a given facilitator
- * @param facilitatorAddress - The address for the currently deployed contract for the facilitator being queried
- * @returns - The instance of the facilitator, which contains `bucket` and `label` fields
- */
- public async getFacilitator(facilitatorAddress: string) {
- const contract = this.getContractInstance(this.ghoTokenAddress);
- const result = await contract.getFacilitator(facilitatorAddress);
- return result;
- }
-
- /**
- * Gets the bucket instance for a given facilitator
- * @param facilitatorAddress - The address for the currently deployed contract for the facilitator being queried
- * @returns - The instance of the facilitator bucket, which contains `maxCapacity` and `level` fields
- */
- public async getFacilitatorBucket(facilitatorAddress: string) {
- const contract = this.getContractInstance(this.ghoTokenAddress);
- const result = await contract.getFacilitatorBucket(facilitatorAddress);
- return result;
- }
-}
diff --git a/packages/contract-helpers/src/gho/GhoVariableDebtTokenService.ts b/packages/contract-helpers/src/gho/GhoVariableDebtTokenService.ts
deleted file mode 100644
index be92d289..00000000
--- a/packages/contract-helpers/src/gho/GhoVariableDebtTokenService.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import { BigNumber, providers } from 'ethers';
-import BaseService from '../commons/BaseService';
-import { GhoVariableDebtToken__factory } from './typechain/GhoVariableDebtToken__factory';
-import type { IGhoVariableDebtToken } from './typechain/IGhoVariableDebtToken';
-
-export interface IGhoVariableDebtTokenService {
- getDiscountToken: () => Promise;
- getDiscountLockPeriod: () => Promise;
- getUserDiscountPercent: (userAddress: string) => Promise;
- getUserRebalanceTimestamp: (userAddress: string) => Promise;
- getDiscountRateStrategy: () => Promise;
-}
-
-/**
- * The service for interacting with the GhoToken.sol smart contract.
- * This contract controls operations minting & burning the native GHO token as well as facilitator management.
- * https://github.com/aave/gho/blob/main/src/contracts/gho/GhoToken.sol
- */
-export class GhoVariableDebtTokenService
- extends BaseService
- implements IGhoVariableDebtTokenService
-{
- readonly ghoVariableDebtTokenAddress: string;
-
- constructor(
- provider: providers.Provider,
- ghoVariableDebtTokenAddress: string,
- ) {
- super(provider, GhoVariableDebtToken__factory);
- this.ghoVariableDebtTokenAddress = ghoVariableDebtTokenAddress;
- }
-
- /**
- * Gets the discount token address tied the variable debt token (stkAAVE currently)
- * @returns - A string representing the address for the deployed smart contract of the token
- */
- public async getDiscountToken() {
- const contract = this.getContractInstance(this.ghoVariableDebtTokenAddress);
- const result = await contract.getDiscountToken();
- return result;
- }
-
- /**
- * Gets the current discount percent lock period
- * @returns - A BigNumber representing the discount percent lock period, expressed in seconds
- */
- public async getDiscountLockPeriod() {
- const contract = this.getContractInstance(this.ghoVariableDebtTokenAddress);
- const result = await contract.getDiscountLockPeriod();
- return result;
- }
-
- /**
- * Gets the discount percent being applied to the GHO debt interest for the provided user
- * @param userAddress - The address for the given user to query for
- * @returns - A BigNumber representing the user's discount percentage, expressed in bps
- */
- public async getUserDiscountPercent(userAddress: string) {
- const contract = this.getContractInstance(this.ghoVariableDebtTokenAddress);
- const result = await contract.getDiscountPercent(userAddress);
- return result;
- }
-
- /**
- * Gets the timestamp at which a user's discount percent can be rebalanced
- * @param userAddress - The address of the user's rebalance timestamp being requested
- * @returns - A BigNumber representing the time when a users discount percent can be rebalanced, expressed in seconds
- */
- public async getUserRebalanceTimestamp(userAddress: string) {
- const contract = this.getContractInstance(this.ghoVariableDebtTokenAddress);
- const result = await contract.getUserRebalanceTimestamp(userAddress);
- return result;
- }
-
- /**
- * Gets the discount rate strategy currently in use
- * @returns - Address of current GhoDiscountRateStrategy
- */
- public async getDiscountRateStrategy() {
- const contract = this.getContractInstance(this.ghoVariableDebtTokenAddress);
- const result = await contract.getDiscountRateStrategy();
- return result;
- }
-}
diff --git a/packages/contract-helpers/src/gho/__tests__/GhoDiscountRateStrategyService.test.ts b/packages/contract-helpers/src/gho/__tests__/GhoDiscountRateStrategyService.test.ts
deleted file mode 100644
index 826dc03b..00000000
--- a/packages/contract-helpers/src/gho/__tests__/GhoDiscountRateStrategyService.test.ts
+++ /dev/null
@@ -1,400 +0,0 @@
-import { constants, BigNumber, BigNumberish, providers } from 'ethers';
-import { valueToWei } from '../../commons/utils';
-import { GhoDiscountRateStrategyService } from '../GhoDiscountRateStrategyService';
-import { GhoDiscountRateStrategy } from '../typechain/GhoDiscountRateStrategy';
-import { GhoDiscountRateStrategy__factory } from '../typechain/GhoDiscountRateStrategy__factory';
-import { GhoVariableDebtToken } from '../typechain/GhoVariableDebtToken';
-import { GhoVariableDebtToken__factory } from '../typechain/GhoVariableDebtToken__factory';
-
-jest.mock('../../commons/gasStation', () => {
- return {
- __esModule: true,
- estimateGasByNetwork: jest
- .fn()
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1))),
- estimateGas: jest.fn(async () => Promise.resolve(BigNumber.from(1))),
- };
-});
-
-// Helper for contract call arguments
-const convertToBN = (n: string) => valueToWei(n, 18);
-
-describe('GhoDiscountRateStrategyService', () => {
- const GHO_VARIABLE_DEBT_TOKEN_ADDRESS = constants.AddressZero;
- const correctProvider: providers.Provider = new providers.JsonRpcProvider();
-
- // Mocking
- jest
- .spyOn(correctProvider, 'getGasPrice')
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1)));
-
- // Mock the response of GhoVariableDebtToken.getDiscountRateStrategy()
- jest.spyOn(GhoVariableDebtToken__factory, 'connect').mockReturnValue({
- getDiscountRateStrategy: async () => Promise.resolve(constants.AddressZero),
- } as unknown as GhoVariableDebtToken);
-
- afterEach(() => jest.clearAllMocks());
-
- describe('Create new GhoDiscountRateStrategyService', () => {
- it('Expects to be initialized correctly', () => {
- // Create instance
- const instance = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Assert it
- expect(instance).toBeInstanceOf(GhoDiscountRateStrategyService);
- });
- });
-
- describe('getGhoDiscountedPerDiscountToken', () => {
- it('should return the amount of GHO eligible to be discounted per one discount token', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockGhoDiscountedPerDiscountToken = convertToBN('100');
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN: async () =>
- Promise.resolve(mockGhoDiscountedPerDiscountToken),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.getGhoDiscountedPerDiscountToken();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockGhoDiscountedPerDiscountToken);
- });
- });
-
- describe('getGhoDiscountRate', () => {
- it('should return the current maximum discount rate against borrowing GHO, expressed in bps', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockDiscountRate = convertToBN('2000'); // 20.00%
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- DISCOUNT_RATE: async () => Promise.resolve(mockDiscountRate),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.getGhoDiscountRate();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockDiscountRate);
- });
- });
-
- describe('getGhoMinDiscountTokenBalance', () => {
- it('should return the minimum amount of discount tokens needed to be eligible for a discount', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockMinDiscountTokenBalance = convertToBN('100');
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- MIN_DISCOUNT_TOKEN_BALANCE: async () =>
- Promise.resolve(mockMinDiscountTokenBalance),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.getGhoMinDiscountTokenBalance();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockMinDiscountTokenBalance);
- });
- });
-
- describe('getGhoMinDebtTokenBalance', () => {
- it('should return the minimum amount of debt tokens needed to be eligible for a discount', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockMinDebtTokenBalance = convertToBN('100');
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- MIN_DEBT_TOKEN_BALANCE: async () =>
- Promise.resolve(mockMinDebtTokenBalance),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.getGhoMinDebtTokenBalance();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockMinDebtTokenBalance);
- });
- });
-
- describe('calculateDiscountRate', () => {
- it('should return zero discount if discount token balance does not meet minimum requirements to gain a discount', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Use case - borrowing 100 GHO owning 0 skAAVE
- const ghoDebtTokenBalance: BigNumberish = convertToBN('100');
- const stakedAaveBalance: BigNumberish = convertToBN('0');
- const expected = BigNumber.from('0'); // 0%
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- calculateDiscountRate: async () => Promise.resolve(expected),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(expected);
- });
-
- it('should return zero discount if GHO variable debt token balance does not meet minimum requirements to gain a discount', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Use case - borrowing 0 GHO owning 1 skAAVE
- const ghoDebtTokenBalance: BigNumberish = convertToBN('0');
- const stakedAaveBalance: BigNumberish = convertToBN('1');
- const expected = BigNumber.from('0'); // 0%
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- calculateDiscountRate: async () => Promise.resolve(expected),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(expected);
- });
-
- // Discounted balance = discount token * 100
- it('should return the maximum discount rate of 20% if the calculated total discounted balance is greater or equal to the debt token balance', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Use case #1 - borrowing 100 GHO owning 1 stkAAVE
- const ghoDebtTokenBalance: BigNumberish = convertToBN('100');
- let stakedAaveBalance: BigNumberish = convertToBN('1');
- const expected = BigNumber.from('2000'); // 20.00% discount
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- calculateDiscountRate: async () => Promise.resolve(expected),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- let result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(expected);
-
- // Use case #2 - borrowing 100 GHO owning 5 stkAAVE
- stakedAaveBalance = convertToBN('5');
-
- // Call it
- result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(expected);
- });
-
- it('should return a sub-maximum discount if user borrows more GHO than can be discounted based off of the discount token balance', async () => {
- // Create instance
- const contract = new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Use case - borrowing 150 GHO owning 1 skAAVE
- const ghoDebtTokenBalance: BigNumberish = convertToBN('150');
- const stakedAaveBalance: BigNumberish = convertToBN('1');
- const expected = BigNumber.from('1333'); // 13.33% discount
-
- // Mock it
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- calculateDiscountRate: async () => Promise.resolve(expected),
- } as unknown as GhoDiscountRateStrategy);
-
- // Call it
- const result = await contract.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(expected);
- });
- });
- describe('ghoDiscountRateStrategy update on ghoVariableDebtToken contract', () => {
- it('should return discount based on the active strategy on the ghoVariableDebtToken', async () => {
- // Create different mocked return values for the two discount rate strategies when given the same input
-
- // Constants
- const ghoDiscountRateStrategyOne =
- '0x0000000000000000000000000000000000000001';
- const ghoDiscountRateStrategyTwo =
- '0x0000000000000000000000000000000000000002';
- const ghoDebtTokenBalance: BigNumberish = convertToBN('150');
- const stakedAaveBalance: BigNumberish = convertToBN('1');
- const expectedOne = BigNumber.from('1333'); // 13.33% discount
- const expectedTwo = BigNumber.from('2000'); // 20% discount
-
- // Mock services
- const ghoDiscountRateStrategyServiceOne = {
- calculateDiscountRate: jest.fn(),
- };
- ghoDiscountRateStrategyServiceOne.calculateDiscountRate.mockReturnValue(
- Promise.resolve(expectedOne),
- );
- const ghoDiscountRateStrategyServiceTwo = {
- calculateDiscountRate: jest.fn(),
- };
- ghoDiscountRateStrategyServiceTwo.calculateDiscountRate.mockReturnValue(
- Promise.resolve(expectedTwo),
- );
-
- // Create a spy which will conditionally return the service based on the rate strategy address
- const spy = jest
- .spyOn(GhoDiscountRateStrategy__factory, 'connect')
- .mockReturnValue({
- calculateDiscountRate: async () => {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
- const rateStrategyAddress =
- await mockVariableDebtTokenService.getDiscountRateStrategy();
- if (rateStrategyAddress === ghoDiscountRateStrategyOne) {
- return Promise.resolve(
- ghoDiscountRateStrategyServiceOne.calculateDiscountRate(),
- );
- }
-
- return Promise.resolve(
- ghoDiscountRateStrategyServiceTwo.calculateDiscountRate(),
- );
- },
- } as unknown as GhoDiscountRateStrategy);
-
- // Mock a variable debt service to return the first discount rate strategy
- const mockVariableDebtTokenService = {
- getDiscountRateStrategy: jest.fn(),
- };
-
- jest
- .mocked(mockVariableDebtTokenService)
- .getDiscountRateStrategy.mockResolvedValue(
- Promise.resolve(ghoDiscountRateStrategyOne),
- );
-
- // Create a discount service which will be spied and trigger calls to ghoVariableDebtToken.getDiscountRateStrategy() -> ghoDiscountRateService.calculateDiscountRate()
- const ghoDiscountRateStrategyServiceThree =
- new GhoDiscountRateStrategyService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Call calculateDiscountRate with the first rate strategy
- const resultOne =
- await ghoDiscountRateStrategyServiceThree.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(resultOne).toEqual(expectedOne);
-
- // Simulates a ghoDiscountRateStrategy update
- jest
- .mocked(mockVariableDebtTokenService)
- .getDiscountRateStrategy.mockResolvedValue(
- Promise.resolve(ghoDiscountRateStrategyTwo),
- );
-
- // Call calculateDiscountRate with the updated rate strategy
- const resultTwo =
- await ghoDiscountRateStrategyServiceThree.calculateDiscountRate(
- ghoDebtTokenBalance,
- stakedAaveBalance,
- );
-
- expect(resultTwo).toEqual(expectedTwo);
- });
- });
-});
diff --git a/packages/contract-helpers/src/gho/__tests__/GhoService.test.ts b/packages/contract-helpers/src/gho/__tests__/GhoService.test.ts
index 5dad4413..72786e89 100644
--- a/packages/contract-helpers/src/gho/__tests__/GhoService.test.ts
+++ b/packages/contract-helpers/src/gho/__tests__/GhoService.test.ts
@@ -18,7 +18,7 @@ const ghoReserveDataMock: GhoReserveData = {
};
const ghoUserDataMock: GhoUserData = {
- userGhoDiscountRate: '0',
+ userGhoDiscountPercent: '0',
userDiscountTokenBalance: '0',
userGhoScaledBorrowBalance: '0',
userPreviousGhoBorrowIndex: '0',
diff --git a/packages/contract-helpers/src/gho/__tests__/GhoTokenService.test.ts b/packages/contract-helpers/src/gho/__tests__/GhoTokenService.test.ts
deleted file mode 100644
index 6fb6ddde..00000000
--- a/packages/contract-helpers/src/gho/__tests__/GhoTokenService.test.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-import { constants, BigNumber, providers } from 'ethers';
-import { valueToWei } from '../../commons/utils';
-import { GhoTokenService } from '../GhoTokenService';
-import { GhoToken } from '../typechain/GhoToken';
-import { GhoToken__factory } from '../typechain/GhoToken__factory';
-import { IGhoToken } from '../typechain/IGhoToken';
-
-jest.mock('../../commons/gasStation', () => {
- return {
- __esModule: true,
- estimateGasByNetwork: jest
- .fn()
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1))),
- estimateGas: jest.fn(async () => Promise.resolve(BigNumber.from(1))),
- };
-});
-
-// Helper for contract call arguments
-const convertToBN = (n: string) => valueToWei(n, 18);
-
-describe('GhoTokenService', () => {
- const GHO_TOKEN_ADDRESS = constants.AddressZero;
- const correctProvider: providers.Provider = new providers.JsonRpcProvider();
-
- // Mocking
- jest
- .spyOn(correctProvider, 'getGasPrice')
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1)));
-
- afterEach(() => jest.clearAllMocks());
-
- describe('Create new GhoTokenService', () => {
- it('Expects to be initialized correctly', () => {
- // Create Instance
- const instance = new GhoTokenService(correctProvider, GHO_TOKEN_ADDRESS);
-
- // Assert it
- expect(instance).toBeInstanceOf(GhoTokenService);
- });
- });
-
- describe('totalSupply', () => {
- it('should return the total supply of GHO tokens', async () => {
- // Create Instance
- const contract = new GhoTokenService(correctProvider, GHO_TOKEN_ADDRESS);
-
- // Setup
- const mockTotalSupply = convertToBN('10000000'); // 10M
-
- // Mock it
- const spy = jest.spyOn(GhoToken__factory, 'connect').mockReturnValue({
- totalSupply: async () => Promise.resolve(mockTotalSupply),
- } as unknown as GhoToken);
-
- // Call it
- const result = await contract.totalSupply();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockTotalSupply);
- });
- });
-
- describe('getFacilitatorsList', () => {
- it('should return the list of facilitators as an array of addresses', async () => {
- // Create instance
- const contract = new GhoTokenService(correctProvider, GHO_TOKEN_ADDRESS);
-
- // Setup
- const faciliatorAddress1: string = constants.AddressZero;
- const faciliatorAddress2: string = constants.AddressZero;
- const mockFacilitatorsList: string[] = [
- faciliatorAddress1,
- faciliatorAddress2,
- ];
-
- // Mock it
- const spy = jest.spyOn(GhoToken__factory, 'connect').mockReturnValue({
- getFacilitatorsList: async () => Promise.resolve(mockFacilitatorsList),
- } as unknown as GhoToken);
-
- // Call it
- const result = await contract.getFacilitatorsList();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockFacilitatorsList);
- });
- });
-
- describe('getFacilitator', () => {
- it('should return the facilitator instance for the provided facilitator address', async () => {
- // Create instance
- const contract = new GhoTokenService(correctProvider, GHO_TOKEN_ADDRESS);
-
- // Setup
- const faciliatorAddress: string = constants.AddressZero;
- const mockBucket: IGhoToken.BucketStruct = {
- maxCapacity: convertToBN('1000'),
- level: convertToBN('500'),
- };
- const mockFacilitator: IGhoToken.FacilitatorStruct = {
- bucket: mockBucket,
- label: 'Aave Facilitator',
- };
-
- // Mock it
- const spy = jest.spyOn(GhoToken__factory, 'connect').mockReturnValue({
- getFacilitator: async () => Promise.resolve(mockFacilitator),
- } as unknown as GhoToken);
-
- // Call it
- const result = await contract.getFacilitator(faciliatorAddress);
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockFacilitator);
- });
- });
-
- describe('getFacilitatorBucket', () => {
- it('should return the bucket instance for the provided facilitator address', async () => {
- // Create instance
- const contract = new GhoTokenService(correctProvider, GHO_TOKEN_ADDRESS);
-
- // Setup
- const faciliatorAddress: string = constants.AddressZero;
- const mockBucket: IGhoToken.BucketStruct = {
- maxCapacity: convertToBN('1000'),
- level: convertToBN('500'),
- };
-
- // Mock it
- const spy = jest.spyOn(GhoToken__factory, 'connect').mockReturnValue({
- getFacilitatorBucket: async () => Promise.resolve(mockBucket),
- } as unknown as GhoToken);
-
- // Call it
- const result = await contract.getFacilitatorBucket(faciliatorAddress);
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockBucket);
- });
- });
-});
diff --git a/packages/contract-helpers/src/gho/__tests__/GhoVariableDebtTokenService.test.ts b/packages/contract-helpers/src/gho/__tests__/GhoVariableDebtTokenService.test.ts
deleted file mode 100644
index f54a1f7b..00000000
--- a/packages/contract-helpers/src/gho/__tests__/GhoVariableDebtTokenService.test.ts
+++ /dev/null
@@ -1,190 +0,0 @@
-import { constants, BigNumber, providers } from 'ethers';
-import { valueToWei } from '../../commons/utils';
-import { GhoVariableDebtTokenService } from '../GhoVariableDebtTokenService';
-import { GhoVariableDebtToken } from '../typechain/GhoVariableDebtToken';
-import { GhoVariableDebtToken__factory } from '../typechain/GhoVariableDebtToken__factory';
-
-jest.mock('../../commons/gasStation', () => {
- return {
- __esModule: true,
- estimateGasByNetwork: jest
- .fn()
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1))),
- estimateGas: jest.fn(async () => Promise.resolve(BigNumber.from(1))),
- };
-});
-
-// Helper for contract call arguments
-const convertToBN = (n: string) => valueToWei(n, 18);
-
-describe('GhoVariableDebtTokenService', () => {
- const GHO_VARIABLE_DEBT_TOKEN_ADDRESS = constants.AddressZero;
- const correctProvider: providers.Provider = new providers.JsonRpcProvider();
-
- // Mocking
- jest
- .spyOn(correctProvider, 'getGasPrice')
- .mockImplementation(async () => Promise.resolve(BigNumber.from(1)));
-
- afterEach(() => jest.clearAllMocks());
-
- describe('Create new GhoVariableDebtTokenService', () => {
- it('Expects to be initialized correctly', () => {
- // Create Instance
- const instance = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Assert it
- expect(instance).toBeInstanceOf(GhoVariableDebtTokenService);
- });
- });
-
- describe('getDiscountToken', () => {
- it('should return the address of the current discount token', async () => {
- // Create Instance
- const contract = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockDiscountTokenAddress = constants.AddressZero;
-
- // Mock it
- const spy = jest
- .spyOn(GhoVariableDebtToken__factory, 'connect')
- .mockReturnValue({
- getDiscountToken: async () =>
- Promise.resolve(mockDiscountTokenAddress),
- } as unknown as GhoVariableDebtToken);
-
- // Call it
- const result = await contract.getDiscountToken();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockDiscountTokenAddress);
- });
- });
-
- describe('getDiscountLockPeriod', () => {
- it('should return the current discount percent lock period', async () => {
- // Create instance
- const contract = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockDiscountLockPeriod = convertToBN('123456789');
-
- // Mock it
- const spy = jest
- .spyOn(GhoVariableDebtToken__factory, 'connect')
- .mockReturnValue({
- getDiscountLockPeriod: async () =>
- Promise.resolve(mockDiscountLockPeriod),
- } as unknown as GhoVariableDebtToken);
-
- // Call it
- const result = await contract.getDiscountLockPeriod();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockDiscountLockPeriod);
- });
- });
-
- describe('getUserDiscountPercent', () => {
- it("should return the user's current discount percentage for their borrowed GHO", async () => {
- // Create instance
- const contract = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockUserAddress = constants.AddressZero;
- const mockUserDiscountPercent = convertToBN('2000'); // 20.00%
-
- // Mock it
- const spy = jest
- .spyOn(GhoVariableDebtToken__factory, 'connect')
- .mockReturnValue({
- getDiscountPercent: async () =>
- Promise.resolve(mockUserDiscountPercent),
- } as unknown as GhoVariableDebtToken);
-
- // Call it
- const result = await contract.getUserDiscountPercent(mockUserAddress);
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockUserDiscountPercent);
- });
- });
-
- describe('getUserRebalanceTimestamp', () => {
- it("should return the timestamp when a user's discount percent can be rebalanced", async () => {
- // Create instance
- const contract = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockUserAddress = constants.AddressZero;
- const mockUserRebalanceTimestamp = convertToBN('123456789');
-
- // Mock it
- const spy = jest
- .spyOn(GhoVariableDebtToken__factory, 'connect')
- .mockReturnValue({
- getUserRebalanceTimestamp: async () =>
- Promise.resolve(mockUserRebalanceTimestamp),
- } as unknown as GhoVariableDebtToken);
-
- // Call it
- const result = await contract.getUserRebalanceTimestamp(mockUserAddress);
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockUserRebalanceTimestamp);
- });
- });
-
- describe('getDiscountRateStrategy', () => {
- it('should return the current discount rate strategy address', async () => {
- // Create instance
- const contract = new GhoVariableDebtTokenService(
- correctProvider,
- GHO_VARIABLE_DEBT_TOKEN_ADDRESS,
- );
-
- // Setup
- const mockDiscountRateStrategy = constants.AddressZero;
-
- // Mock it
- const spy = jest
- .spyOn(GhoVariableDebtToken__factory, 'connect')
- .mockReturnValue({
- getDiscountRateStrategy: async () =>
- Promise.resolve(mockDiscountRateStrategy),
- } as unknown as GhoVariableDebtToken);
-
- // Call it
- const result = await contract.getDiscountRateStrategy();
-
- // Assert it
- expect(spy).toHaveBeenCalled();
- expect(spy).toBeCalledTimes(1);
- expect(result).toEqual(mockDiscountRateStrategy);
- });
- });
-});
diff --git a/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy.d.ts b/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy.d.ts
deleted file mode 100644
index 2c31e633..00000000
--- a/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy.d.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* eslint-disable */
-import type {
- BaseContract,
- BigNumber,
- BigNumberish,
- BytesLike,
- CallOverrides,
- PopulatedTransaction,
- Signer,
- utils,
-} from 'ethers';
-import type { FunctionFragment, Result } from '@ethersproject/abi';
-import type { Listener, Provider } from '@ethersproject/providers';
-import type {
- TypedEventFilter,
- TypedEvent,
- TypedListener,
- OnEvent,
-} from '../../../../../common';
-
-export interface GhoDiscountRateStrategyInterface extends utils.Interface {
- functions: {
- 'DISCOUNT_RATE()': FunctionFragment;
- 'DISCOUNT_TOKEN()': FunctionFragment;
- 'GHO_DISCOUNTED_PER_DISCOUNT_TOKEN()': FunctionFragment;
- 'MIN_DEBT_TOKEN_BALANCE()': FunctionFragment;
- 'MIN_DISCOUNT_TOKEN_BALANCE()': FunctionFragment;
- 'calculateDiscountRate(uint256,uint256)': FunctionFragment;
- };
-
- getFunction(
- nameOrSignatureOrTopic:
- | 'DISCOUNT_RATE'
- | 'DISCOUNT_TOKEN'
- | 'GHO_DISCOUNTED_PER_DISCOUNT_TOKEN'
- | 'MIN_DEBT_TOKEN_BALANCE'
- | 'MIN_DISCOUNT_TOKEN_BALANCE'
- | 'calculateDiscountRate',
- ): FunctionFragment;
-
- encodeFunctionData(
- functionFragment: 'DISCOUNT_RATE',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'DISCOUNT_TOKEN',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'GHO_DISCOUNTED_PER_DISCOUNT_TOKEN',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'MIN_DEBT_TOKEN_BALANCE',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'MIN_DISCOUNT_TOKEN_BALANCE',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'calculateDiscountRate',
- values: [BigNumberish, BigNumberish],
- ): string;
-
- decodeFunctionResult(
- functionFragment: 'DISCOUNT_RATE',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'DISCOUNT_TOKEN',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'GHO_DISCOUNTED_PER_DISCOUNT_TOKEN',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'MIN_DEBT_TOKEN_BALANCE',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'MIN_DISCOUNT_TOKEN_BALANCE',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'calculateDiscountRate',
- data: BytesLike,
- ): Result;
-
- events: {};
-}
-
-export interface GhoDiscountRateStrategy extends BaseContract {
- connect(signerOrProvider: Signer | Provider | string): this;
- attach(addressOrName: string): this;
- deployed(): Promise;
-
- interface: GhoDiscountRateStrategyInterface;
-
- queryFilter(
- event: TypedEventFilter,
- fromBlockOrBlockhash?: string | number | undefined,
- toBlock?: string | number | undefined,
- ): Promise>;
-
- listeners(
- eventFilter?: TypedEventFilter,
- ): Array>;
- listeners(eventName?: string): Array;
- removeAllListeners(
- eventFilter: TypedEventFilter,
- ): this;
- removeAllListeners(eventName?: string): this;
- off: OnEvent;
- on: OnEvent;
- once: OnEvent;
- removeListener: OnEvent;
-
- functions: {
- DISCOUNT_RATE(overrides?: CallOverrides): Promise<[BigNumber]>;
-
- DISCOUNT_TOKEN(overrides?: CallOverrides): Promise<[string]>;
-
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN(
- overrides?: CallOverrides,
- ): Promise<[BigNumber]>;
-
- MIN_DEBT_TOKEN_BALANCE(overrides?: CallOverrides): Promise<[BigNumber]>;
-
- MIN_DISCOUNT_TOKEN_BALANCE(overrides?: CallOverrides): Promise<[BigNumber]>;
-
- calculateDiscountRate(
- debtBalance: BigNumberish,
- discountTokenBalance: BigNumberish,
- overrides?: CallOverrides,
- ): Promise<[BigNumber]>;
- };
-
- DISCOUNT_RATE(overrides?: CallOverrides): Promise;
-
- DISCOUNT_TOKEN(overrides?: CallOverrides): Promise;
-
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN(
- overrides?: CallOverrides,
- ): Promise;
-
- MIN_DEBT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- MIN_DISCOUNT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- calculateDiscountRate(
- debtBalance: BigNumberish,
- discountTokenBalance: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- callStatic: {
- DISCOUNT_RATE(overrides?: CallOverrides): Promise;
-
- DISCOUNT_TOKEN(overrides?: CallOverrides): Promise;
-
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN(
- overrides?: CallOverrides,
- ): Promise;
-
- MIN_DEBT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- MIN_DISCOUNT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- calculateDiscountRate(
- debtBalance: BigNumberish,
- discountTokenBalance: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
- };
-
- filters: {};
-
- estimateGas: {
- DISCOUNT_RATE(overrides?: CallOverrides): Promise;
-
- DISCOUNT_TOKEN(overrides?: CallOverrides): Promise;
-
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN(
- overrides?: CallOverrides,
- ): Promise;
-
- MIN_DEBT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- MIN_DISCOUNT_TOKEN_BALANCE(overrides?: CallOverrides): Promise;
-
- calculateDiscountRate(
- debtBalance: BigNumberish,
- discountTokenBalance: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
- };
-
- populateTransaction: {
- DISCOUNT_RATE(overrides?: CallOverrides): Promise;
-
- DISCOUNT_TOKEN(overrides?: CallOverrides): Promise;
-
- GHO_DISCOUNTED_PER_DISCOUNT_TOKEN(
- overrides?: CallOverrides,
- ): Promise;
-
- MIN_DEBT_TOKEN_BALANCE(
- overrides?: CallOverrides,
- ): Promise;
-
- MIN_DISCOUNT_TOKEN_BALANCE(
- overrides?: CallOverrides,
- ): Promise;
-
- calculateDiscountRate(
- debtBalance: BigNumberish,
- discountTokenBalance: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
- };
-}
diff --git a/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy__factory.ts b/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy__factory.ts
deleted file mode 100644
index d3f358ad..00000000
--- a/packages/contract-helpers/src/gho/typechain/GhoDiscountRateStrategy__factory.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* tslint:disable */
-/* eslint-disable */
-import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
-import type { Provider, TransactionRequest } from "@ethersproject/providers";
-import type {
- GhoDiscountRateStrategy,
- GhoDiscountRateStrategyInterface,
-} from "./GhoDiscountRateStrategy";
-
-const _abi = [
- {
- inputs: [],
- name: "DISCOUNT_RATE",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "DISCOUNT_TOKEN",
- outputs: [
- {
- internalType: "address",
- name: "",
- type: "address",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "GHO_DISCOUNTED_PER_DISCOUNT_TOKEN",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "MIN_DEBT_TOKEN_BALANCE",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "MIN_DISCOUNT_TOKEN_BALANCE",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "debtBalance",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "discountTokenBalance",
- type: "uint256",
- },
- ],
- name: "calculateDiscountRate",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "pure",
- type: "function",
- },
-];
-
-const _bytecode =
- "0x608060405234801561001057600080fd5b506102c1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806393adbec51161005057806393adbec5146100e957806398c4f438146100bc578063b510c589146100fc57600080fd5b80631fd5c9e9146100775780633454274e146100bc578063771a73af146100d9575b600080fd5b610092734da27a545c0c5b758a6ba100e3a049001de870f581565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100cb670de0b6b3a764000081565b6040519081526020016100b3565b6100cb68056bc75e2d6310000081565b6100cb6100f73660046101ca565b610105565b6100cb6107d081565b6000670de0b6b3a76400008210806101245750670de0b6b3a764000083105b1561013157506000610175565b60006101468368056bc75e2d6310000061017b565b905083811061015a576107d0915050610175565b836101676107d0836101ec565b6101719190610250565b9150505b92915050565b600081157ffffffffffffffffffffffffffffffffffffffffffffffffff90fa4a62c4dffff839004841115176101b057600080fd5b50670de0b6b3a764000091026706f05b59d3b20000010490565b600080604083850312156101dd57600080fd5b50508035926020909101359150565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561024b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b600082610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea26469706673582212206bbf29bf6be38a8be7683b6b85fad0e89ba775122d079836285e8ed847f2d92564736f6c634300080a0033";
-
-type GhoDiscountRateStrategyConstructorParams =
- | [signer?: Signer]
- | ConstructorParameters;
-
-const isSuperArgs = (
- xs: GhoDiscountRateStrategyConstructorParams
-): xs is ConstructorParameters => xs.length > 1;
-
-export class GhoDiscountRateStrategy__factory extends ContractFactory {
- constructor(...args: GhoDiscountRateStrategyConstructorParams) {
- if (isSuperArgs(args)) {
- super(...args);
- } else {
- super(_abi, _bytecode, args[0]);
- }
- }
-
- override deploy(
- overrides?: Overrides & { from?: string | Promise }
- ): Promise {
- return super.deploy(overrides || {}) as Promise;
- }
- override getDeployTransaction(
- overrides?: Overrides & { from?: string | Promise }
- ): TransactionRequest {
- return super.getDeployTransaction(overrides || {});
- }
- override attach(address: string): GhoDiscountRateStrategy {
- return super.attach(address) as GhoDiscountRateStrategy;
- }
- override connect(signer: Signer): GhoDiscountRateStrategy__factory {
- return super.connect(signer) as GhoDiscountRateStrategy__factory;
- }
-
- static readonly bytecode = _bytecode;
- static readonly abi = _abi;
- static createInterface(): GhoDiscountRateStrategyInterface {
- return new utils.Interface(_abi) as GhoDiscountRateStrategyInterface;
- }
- static connect(
- address: string,
- signerOrProvider: Signer | Provider
- ): GhoDiscountRateStrategy {
- return new Contract(
- address,
- _abi,
- signerOrProvider
- ) as GhoDiscountRateStrategy;
- }
-}
diff --git a/packages/contract-helpers/src/gho/typechain/GhoToken.d.ts b/packages/contract-helpers/src/gho/typechain/GhoToken.d.ts
deleted file mode 100644
index 5c745b78..00000000
--- a/packages/contract-helpers/src/gho/typechain/GhoToken.d.ts
+++ /dev/null
@@ -1,979 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* eslint-disable */
-import type {
- BaseContract,
- BigNumber,
- BigNumberish,
- BytesLike,
- CallOverrides,
- ContractTransaction,
- Overrides,
- PopulatedTransaction,
- Signer,
- utils,
-} from 'ethers';
-import type {
- FunctionFragment,
- Result,
- EventFragment,
-} from '@ethersproject/abi';
-import type { Listener, Provider } from '@ethersproject/providers';
-import type {
- TypedEventFilter,
- TypedEvent,
- TypedListener,
- OnEvent,
-} from '../../../common';
-
-export declare namespace IGhoToken {
- export type BucketStruct = { maxCapacity: BigNumberish; level: BigNumberish };
-
- export type BucketStructOutput = [BigNumber, BigNumber] & {
- maxCapacity: BigNumber;
- level: BigNumber;
- };
-
- export type FacilitatorStruct = {
- bucket: IGhoToken.BucketStruct;
- label: string;
- };
-
- export type FacilitatorStructOutput = [
- IGhoToken.BucketStructOutput,
- string,
- ] & { bucket: IGhoToken.BucketStructOutput; label: string };
-}
-
-export interface GhoTokenInterface extends utils.Interface {
- functions: {
- 'DOMAIN_SEPARATOR()': FunctionFragment;
- 'PERMIT_TYPEHASH()': FunctionFragment;
- 'addFacilitators(address[],((uint128,uint128),string)[])': FunctionFragment;
- 'allowance(address,address)': FunctionFragment;
- 'approve(address,uint256)': FunctionFragment;
- 'balanceOf(address)': FunctionFragment;
- 'burn(uint256)': FunctionFragment;
- 'decimals()': FunctionFragment;
- 'getFacilitator(address)': FunctionFragment;
- 'getFacilitatorBucket(address)': FunctionFragment;
- 'getFacilitatorsList()': FunctionFragment;
- 'mint(address,uint256)': FunctionFragment;
- 'name()': FunctionFragment;
- 'nonces(address)': FunctionFragment;
- 'owner()': FunctionFragment;
- 'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment;
- 'removeFacilitators(address[])': FunctionFragment;
- 'renounceOwnership()': FunctionFragment;
- 'setFacilitatorBucketCapacity(address,uint128)': FunctionFragment;
- 'symbol()': FunctionFragment;
- 'totalSupply()': FunctionFragment;
- 'transfer(address,uint256)': FunctionFragment;
- 'transferFrom(address,address,uint256)': FunctionFragment;
- 'transferOwnership(address)': FunctionFragment;
- };
-
- getFunction(
- nameOrSignatureOrTopic:
- | 'DOMAIN_SEPARATOR'
- | 'PERMIT_TYPEHASH'
- | 'addFacilitators'
- | 'allowance'
- | 'approve'
- | 'balanceOf'
- | 'burn'
- | 'decimals'
- | 'getFacilitator'
- | 'getFacilitatorBucket'
- | 'getFacilitatorsList'
- | 'mint'
- | 'name'
- | 'nonces'
- | 'owner'
- | 'permit'
- | 'removeFacilitators'
- | 'renounceOwnership'
- | 'setFacilitatorBucketCapacity'
- | 'symbol'
- | 'totalSupply'
- | 'transfer'
- | 'transferFrom'
- | 'transferOwnership',
- ): FunctionFragment;
-
- encodeFunctionData(
- functionFragment: 'DOMAIN_SEPARATOR',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'PERMIT_TYPEHASH',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'addFacilitators',
- values: [string[], IGhoToken.FacilitatorStruct[]],
- ): string;
- encodeFunctionData(
- functionFragment: 'allowance',
- values: [string, string],
- ): string;
- encodeFunctionData(
- functionFragment: 'approve',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string;
- encodeFunctionData(functionFragment: 'burn', values: [BigNumberish]): string;
- encodeFunctionData(functionFragment: 'decimals', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'getFacilitator',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getFacilitatorBucket',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getFacilitatorsList',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'mint',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'name', values?: undefined): string;
- encodeFunctionData(functionFragment: 'nonces', values: [string]): string;
- encodeFunctionData(functionFragment: 'owner', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'permit',
- values: [
- string,
- string,
- BigNumberish,
- BigNumberish,
- BigNumberish,
- BytesLike,
- BytesLike,
- ],
- ): string;
- encodeFunctionData(
- functionFragment: 'removeFacilitators',
- values: [string[]],
- ): string;
- encodeFunctionData(
- functionFragment: 'renounceOwnership',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'setFacilitatorBucketCapacity',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'symbol', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'totalSupply',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'transfer',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'transferFrom',
- values: [string, string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'transferOwnership',
- values: [string],
- ): string;
-
- decodeFunctionResult(
- functionFragment: 'DOMAIN_SEPARATOR',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'PERMIT_TYPEHASH',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'addFacilitators',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'getFacilitator',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getFacilitatorBucket',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getFacilitatorsList',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'permit', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'removeFacilitators',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'renounceOwnership',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'setFacilitatorBucketCapacity',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'totalSupply',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'transferFrom',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'transferOwnership',
- data: BytesLike,
- ): Result;
-
- events: {
- 'Approval(address,address,uint256)': EventFragment;
- 'BucketLevelChanged(address,uint256,uint256)': EventFragment;
- 'FacilitatorAdded(address,string,uint256)': EventFragment;
- 'FacilitatorBucketCapacityUpdated(address,uint256,uint256)': EventFragment;
- 'FacilitatorRemoved(address)': EventFragment;
- 'OwnershipTransferred(address,address)': EventFragment;
- 'Transfer(address,address,uint256)': EventFragment;
- };
-
- getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'BucketLevelChanged'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'FacilitatorAdded'): EventFragment;
- getEvent(
- nameOrSignatureOrTopic: 'FacilitatorBucketCapacityUpdated',
- ): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'FacilitatorRemoved'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment;
-}
-
-export interface ApprovalEventObject {
- owner: string;
- spender: string;
- amount: BigNumber;
-}
-export type ApprovalEvent = TypedEvent<
- [string, string, BigNumber],
- ApprovalEventObject
->;
-
-export type ApprovalEventFilter = TypedEventFilter;
-
-export interface BucketLevelChangedEventObject {
- facilitatorAaddress: string;
- oldLevel: BigNumber;
- newLevel: BigNumber;
-}
-export type BucketLevelChangedEvent = TypedEvent<
- [string, BigNumber, BigNumber],
- BucketLevelChangedEventObject
->;
-
-export type BucketLevelChangedEventFilter =
- TypedEventFilter;
-
-export interface FacilitatorAddedEventObject {
- facilitatorAddress: string;
- label: string;
- initialBucketCapacity: BigNumber;
-}
-export type FacilitatorAddedEvent = TypedEvent<
- [string, string, BigNumber],
- FacilitatorAddedEventObject
->;
-
-export type FacilitatorAddedEventFilter =
- TypedEventFilter;
-
-export interface FacilitatorBucketCapacityUpdatedEventObject {
- facilitatorAaddress: string;
- oldCapacity: BigNumber;
- newCapacity: BigNumber;
-}
-export type FacilitatorBucketCapacityUpdatedEvent = TypedEvent<
- [string, BigNumber, BigNumber],
- FacilitatorBucketCapacityUpdatedEventObject
->;
-
-export type FacilitatorBucketCapacityUpdatedEventFilter =
- TypedEventFilter;
-
-export interface FacilitatorRemovedEventObject {
- facilitatorAddress: string;
-}
-export type FacilitatorRemovedEvent = TypedEvent<
- [string],
- FacilitatorRemovedEventObject
->;
-
-export type FacilitatorRemovedEventFilter =
- TypedEventFilter;
-
-export interface OwnershipTransferredEventObject {
- previousOwner: string;
- newOwner: string;
-}
-export type OwnershipTransferredEvent = TypedEvent<
- [string, string],
- OwnershipTransferredEventObject
->;
-
-export type OwnershipTransferredEventFilter =
- TypedEventFilter;
-
-export interface TransferEventObject {
- from: string;
- to: string;
- amount: BigNumber;
-}
-export type TransferEvent = TypedEvent<
- [string, string, BigNumber],
- TransferEventObject
->;
-
-export type TransferEventFilter = TypedEventFilter;
-
-export interface GhoToken extends BaseContract {
- connect(signerOrProvider: Signer | Provider | string): this;
- attach(addressOrName: string): this;
- deployed(): Promise;
-
- interface: GhoTokenInterface;
-
- queryFilter(
- event: TypedEventFilter,
- fromBlockOrBlockhash?: string | number | undefined,
- toBlock?: string | number | undefined,
- ): Promise>;
-
- listeners(
- eventFilter?: TypedEventFilter,
- ): Array>;
- listeners(eventName?: string): Array;
- removeAllListeners(
- eventFilter: TypedEventFilter,
- ): this;
- removeAllListeners(eventName?: string): this;
- off: OnEvent;
- on: OnEvent;
- once: OnEvent;
- removeListener: OnEvent;
-
- functions: {
- DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>;
-
- PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>;
-
- addFacilitators(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- allowance(
- arg0: string,
- arg1: string,
- overrides?: CallOverrides,
- ): Promise<[BigNumber]>;
-
- approve(
- spender: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- balanceOf(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;
-
- burn(
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- decimals(overrides?: CallOverrides): Promise<[number]>;
-
- getFacilitator(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise<[IGhoToken.FacilitatorStructOutput]>;
-
- getFacilitatorBucket(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise<[IGhoToken.BucketStructOutput]>;
-
- getFacilitatorsList(overrides?: CallOverrides): Promise<[string[]]>;
-
- mint(
- account: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- name(overrides?: CallOverrides): Promise<[string]>;
-
- nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;
-
- owner(overrides?: CallOverrides): Promise<[string]>;
-
- permit(
- owner: string,
- spender: string,
- value: BigNumberish,
- deadline: BigNumberish,
- v: BigNumberish,
- r: BytesLike,
- s: BytesLike,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- removeFacilitators(
- facilitators: string[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- renounceOwnership(
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- setFacilitatorBucketCapacity(
- facilitator: string,
- newCapacity: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- symbol(overrides?: CallOverrides): Promise<[string]>;
-
- totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>;
-
- transfer(
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferFrom(
- from: string,
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferOwnership(
- newOwner: string,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
- };
-
- DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise;
-
- PERMIT_TYPEHASH(overrides?: CallOverrides): Promise;
-
- addFacilitators(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- allowance(
- arg0: string,
- arg1: string,
- overrides?: CallOverrides,
- ): Promise;
-
- approve(
- spender: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- balanceOf(arg0: string, overrides?: CallOverrides): Promise;
-
- burn(
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- decimals(overrides?: CallOverrides): Promise;
-
- getFacilitator(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorBucket(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorsList(overrides?: CallOverrides): Promise;
-
- mint(
- account: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- name(overrides?: CallOverrides): Promise;
-
- nonces(arg0: string, overrides?: CallOverrides): Promise;
-
- owner(overrides?: CallOverrides): Promise;
-
- permit(
- owner: string,
- spender: string,
- value: BigNumberish,
- deadline: BigNumberish,
- v: BigNumberish,
- r: BytesLike,
- s: BytesLike,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- removeFacilitators(
- facilitators: string[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- renounceOwnership(
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- setFacilitatorBucketCapacity(
- facilitator: string,
- newCapacity: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- symbol(overrides?: CallOverrides): Promise;
-
- totalSupply(overrides?: CallOverrides): Promise;
-
- transfer(
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferFrom(
- from: string,
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferOwnership(
- newOwner: string,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- callStatic: {
- DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise;
-
- PERMIT_TYPEHASH(overrides?: CallOverrides): Promise;
-
- addFacilitators(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: CallOverrides,
- ): Promise;
-
- allowance(
- arg0: string,
- arg1: string,
- overrides?: CallOverrides,
- ): Promise;
-
- approve(
- spender: string,
- amount: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- balanceOf(arg0: string, overrides?: CallOverrides): Promise;
-
- burn(amount: BigNumberish, overrides?: CallOverrides): Promise;
-
- decimals(overrides?: CallOverrides): Promise;
-
- getFacilitator(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorBucket(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorsList(overrides?: CallOverrides): Promise;
-
- mint(
- account: string,
- amount: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- name(overrides?: CallOverrides): Promise;
-
- nonces(arg0: string, overrides?: CallOverrides): Promise;
-
- owner(overrides?: CallOverrides): Promise;
-
- permit(
- owner: string,
- spender: string,
- value: BigNumberish,
- deadline: BigNumberish,
- v: BigNumberish,
- r: BytesLike,
- s: BytesLike,
- overrides?: CallOverrides,
- ): Promise;
-
- removeFacilitators(
- facilitators: string[],
- overrides?: CallOverrides,
- ): Promise;
-
- renounceOwnership(overrides?: CallOverrides): Promise;
-
- setFacilitatorBucketCapacity(
- facilitator: string,
- newCapacity: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- symbol(overrides?: CallOverrides): Promise;
-
- totalSupply(overrides?: CallOverrides): Promise;
-
- transfer(
- to: string,
- amount: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- transferFrom(
- from: string,
- to: string,
- amount: BigNumberish,
- overrides?: CallOverrides,
- ): Promise;
-
- transferOwnership(
- newOwner: string,
- overrides?: CallOverrides,
- ): Promise;
- };
-
- filters: {
- 'Approval(address,address,uint256)'(
- owner?: string | null,
- spender?: string | null,
- amount?: null,
- ): ApprovalEventFilter;
- Approval(
- owner?: string | null,
- spender?: string | null,
- amount?: null,
- ): ApprovalEventFilter;
-
- 'BucketLevelChanged(address,uint256,uint256)'(
- facilitatorAaddress?: string | null,
- oldLevel?: null,
- newLevel?: null,
- ): BucketLevelChangedEventFilter;
- BucketLevelChanged(
- facilitatorAaddress?: string | null,
- oldLevel?: null,
- newLevel?: null,
- ): BucketLevelChangedEventFilter;
-
- 'FacilitatorAdded(address,string,uint256)'(
- facilitatorAddress?: string | null,
- label?: string | null,
- initialBucketCapacity?: null,
- ): FacilitatorAddedEventFilter;
- FacilitatorAdded(
- facilitatorAddress?: string | null,
- label?: string | null,
- initialBucketCapacity?: null,
- ): FacilitatorAddedEventFilter;
-
- 'FacilitatorBucketCapacityUpdated(address,uint256,uint256)'(
- facilitatorAaddress?: string | null,
- oldCapacity?: null,
- newCapacity?: null,
- ): FacilitatorBucketCapacityUpdatedEventFilter;
- FacilitatorBucketCapacityUpdated(
- facilitatorAaddress?: string | null,
- oldCapacity?: null,
- newCapacity?: null,
- ): FacilitatorBucketCapacityUpdatedEventFilter;
-
- 'FacilitatorRemoved(address)'(
- facilitatorAddress?: string | null,
- ): FacilitatorRemovedEventFilter;
- FacilitatorRemoved(
- facilitatorAddress?: string | null,
- ): FacilitatorRemovedEventFilter;
-
- 'OwnershipTransferred(address,address)'(
- previousOwner?: string | null,
- newOwner?: string | null,
- ): OwnershipTransferredEventFilter;
- OwnershipTransferred(
- previousOwner?: string | null,
- newOwner?: string | null,
- ): OwnershipTransferredEventFilter;
-
- 'Transfer(address,address,uint256)'(
- from?: string | null,
- to?: string | null,
- amount?: null,
- ): TransferEventFilter;
- Transfer(
- from?: string | null,
- to?: string | null,
- amount?: null,
- ): TransferEventFilter;
- };
-
- estimateGas: {
- DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise;
-
- PERMIT_TYPEHASH(overrides?: CallOverrides): Promise;
-
- addFacilitators(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- allowance(
- arg0: string,
- arg1: string,
- overrides?: CallOverrides,
- ): Promise;
-
- approve(
- spender: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- balanceOf(arg0: string, overrides?: CallOverrides): Promise;
-
- burn(
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- decimals(overrides?: CallOverrides): Promise;
-
- getFacilitator(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorBucket(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorsList(overrides?: CallOverrides): Promise;
-
- mint(
- account: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- name(overrides?: CallOverrides): Promise;
-
- nonces(arg0: string, overrides?: CallOverrides): Promise;
-
- owner(overrides?: CallOverrides): Promise;
-
- permit(
- owner: string,
- spender: string,
- value: BigNumberish,
- deadline: BigNumberish,
- v: BigNumberish,
- r: BytesLike,
- s: BytesLike,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- removeFacilitators(
- facilitators: string[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- renounceOwnership(
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- setFacilitatorBucketCapacity(
- facilitator: string,
- newCapacity: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- symbol(overrides?: CallOverrides): Promise;
-
- totalSupply(overrides?: CallOverrides): Promise;
-
- transfer(
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferFrom(
- from: string,
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferOwnership(
- newOwner: string,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
- };
-
- populateTransaction: {
- DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise;
-
- PERMIT_TYPEHASH(overrides?: CallOverrides): Promise;
-
- addFacilitators(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- allowance(
- arg0: string,
- arg1: string,
- overrides?: CallOverrides,
- ): Promise;
-
- approve(
- spender: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- balanceOf(
- arg0: string,
- overrides?: CallOverrides,
- ): Promise;
-
- burn(
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- decimals(overrides?: CallOverrides): Promise;
-
- getFacilitator(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorBucket(
- facilitator: string,
- overrides?: CallOverrides,
- ): Promise;
-
- getFacilitatorsList(
- overrides?: CallOverrides,
- ): Promise;
-
- mint(
- account: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- name(overrides?: CallOverrides): Promise;
-
- nonces(
- arg0: string,
- overrides?: CallOverrides,
- ): Promise;
-
- owner(overrides?: CallOverrides): Promise;
-
- permit(
- owner: string,
- spender: string,
- value: BigNumberish,
- deadline: BigNumberish,
- v: BigNumberish,
- r: BytesLike,
- s: BytesLike,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- removeFacilitators(
- facilitators: string[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- renounceOwnership(
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- setFacilitatorBucketCapacity(
- facilitator: string,
- newCapacity: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- symbol(overrides?: CallOverrides): Promise;
-
- totalSupply(overrides?: CallOverrides): Promise;
-
- transfer(
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferFrom(
- from: string,
- to: string,
- amount: BigNumberish,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
-
- transferOwnership(
- newOwner: string,
- overrides?: Overrides & { from?: string | Promise },
- ): Promise;
- };
-}
diff --git a/packages/contract-helpers/src/gho/typechain/GhoToken__factory.ts b/packages/contract-helpers/src/gho/typechain/GhoToken__factory.ts
deleted file mode 100644
index 773ef110..00000000
--- a/packages/contract-helpers/src/gho/typechain/GhoToken__factory.ts
+++ /dev/null
@@ -1,751 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* eslint-disable */
-import { Signer, utils, Contract, ContractFactory, Overrides } from 'ethers';
-import type { Provider, TransactionRequest } from '@ethersproject/providers';
-import type { GhoToken, GhoTokenInterface, IGhoToken } from './GhoToken';
-
-const _abi = [
- {
- inputs: [
- {
- internalType: 'address[]',
- name: 'facilitatorsAddresses',
- type: 'address[]',
- },
- {
- components: [
- {
- components: [
- {
- internalType: 'uint128',
- name: 'maxCapacity',
- type: 'uint128',
- },
- {
- internalType: 'uint128',
- name: 'level',
- type: 'uint128',
- },
- ],
- internalType: 'struct IGhoToken.Bucket',
- name: 'bucket',
- type: 'tuple',
- },
- {
- internalType: 'string',
- name: 'label',
- type: 'string',
- },
- ],
- internalType: 'struct IGhoToken.Facilitator[]',
- name: 'facilitatorsConfig',
- type: 'tuple[]',
- },
- ],
- 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: 'amount',
- type: 'uint256',
- },
- ],
- name: 'Approval',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'facilitatorAaddress',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'oldLevel',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'newLevel',
- type: 'uint256',
- },
- ],
- name: 'BucketLevelChanged',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'facilitatorAddress',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'string',
- name: 'label',
- type: 'string',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'initialBucketCapacity',
- type: 'uint256',
- },
- ],
- name: 'FacilitatorAdded',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'facilitatorAaddress',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'oldCapacity',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'newCapacity',
- type: 'uint256',
- },
- ],
- name: 'FacilitatorBucketCapacityUpdated',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'facilitatorAddress',
- type: 'address',
- },
- ],
- name: 'FacilitatorRemoved',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'previousOwner',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'OwnershipTransferred',
- 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: 'amount',
- type: 'uint256',
- },
- ],
- name: 'Transfer',
- type: 'event',
- },
- {
- inputs: [],
- name: 'DOMAIN_SEPARATOR',
- outputs: [
- {
- internalType: 'bytes32',
- name: '',
- type: 'bytes32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'PERMIT_TYPEHASH',
- outputs: [
- {
- internalType: 'bytes32',
- name: '',
- type: 'bytes32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address[]',
- name: 'facilitatorsAddresses',
- type: 'address[]',
- },
- {
- components: [
- {
- components: [
- {
- internalType: 'uint128',
- name: 'maxCapacity',
- type: 'uint128',
- },
- {
- internalType: 'uint128',
- name: 'level',
- type: 'uint128',
- },
- ],
- internalType: 'struct IGhoToken.Bucket',
- name: 'bucket',
- type: 'tuple',
- },
- {
- internalType: 'string',
- name: 'label',
- type: 'string',
- },
- ],
- internalType: 'struct IGhoToken.Facilitator[]',
- name: 'facilitatorsConfig',
- type: 'tuple[]',
- },
- ],
- name: 'addFacilitators',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- {
- internalType: 'address',
- name: '',
- 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: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- name: 'balanceOf',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'burn',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'decimals',
- outputs: [
- {
- internalType: 'uint8',
- name: '',
- type: 'uint8',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'facilitator',
- type: 'address',
- },
- ],
- name: 'getFacilitator',
- outputs: [
- {
- components: [
- {
- components: [
- {
- internalType: 'uint128',
- name: 'maxCapacity',
- type: 'uint128',
- },
- {
- internalType: 'uint128',
- name: 'level',
- type: 'uint128',
- },
- ],
- internalType: 'struct IGhoToken.Bucket',
- name: 'bucket',
- type: 'tuple',
- },
- {
- internalType: 'string',
- name: 'label',
- type: 'string',
- },
- ],
- internalType: 'struct IGhoToken.Facilitator',
- name: '',
- type: 'tuple',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'facilitator',
- type: 'address',
- },
- ],
- name: 'getFacilitatorBucket',
- outputs: [
- {
- components: [
- {
- internalType: 'uint128',
- name: 'maxCapacity',
- type: 'uint128',
- },
- {
- internalType: 'uint128',
- name: 'level',
- type: 'uint128',
- },
- ],
- internalType: 'struct IGhoToken.Bucket',
- name: '',
- type: 'tuple',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'getFacilitatorsList',
- outputs: [
- {
- internalType: 'address[]',
- name: '',
- type: 'address[]',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'account',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'mint',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'name',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- name: 'nonces',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'owner',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- 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: 'facilitators',
- type: 'address[]',
- },
- ],
- name: 'removeFacilitators',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'renounceOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'facilitator',
- type: 'address',
- },
- {
- internalType: 'uint128',
- name: 'newCapacity',
- type: 'uint128',
- },
- ],
- name: 'setFacilitatorBucketCapacity',
- 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: 'to',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'amount',
- 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: 'amount',
- type: 'uint256',
- },
- ],
- name: 'transferFrom',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'transferOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
-];
-
-const _bytecode =
- '0x60e06040523480156200001157600080fd5b5060405162002fcb38038062002fcb8339810160408190526200003491620007d2565b604080518082018252600981526823b437902a37b5b2b760b91b60208083019182528351808501909452600384526247484f60e81b908401528151919291601291620000849160009190620004c0565b5081516200009a906001906020850190620004c0565b5060ff81166080524660a052620000b0620000d7565b60c05250620000c3915033905062000173565b620000cf8282620001c5565b5050620009c5565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516200010b9190620008ed565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518251146200020c5760405162461bcd60e51b815260206004820152600d60248201526c1253959053125117d253941555609a1b60448201526064015b60405180910390fd5b60005b81518110156200026c576200026383828151811062000232576200023262000991565b60200260200101518383815181106200024f576200024f62000991565b60200260200101516200027160201b60201c565b6001016200020f565b505050565b6001600160a01b03821660009081526007602052604090206001810180546200029a90620008b0565b159050620002eb5760405162461bcd60e51b815260206004820152601a60248201527f464143494c495441544f525f414c52454144595f455849535453000000000000604482015260640162000203565b600082602001515111620003325760405162461bcd60e51b815260206004820152600d60248201526c1253959053125117d310509153609a1b604482015260640162000203565b8151602001516001600160801b031615620003905760405162461bcd60e51b815260206004820152601c60248201527f494e56414c49445f4255434b45545f434f4e46494755524154494f4e00000000604482015260640162000203565b6020808301518051620003aa9260018501920190620004c0565b50815180516020918201516001600160801b03908116600160801b029116178255620003e4906008908590620013ab6200044e821b17901c565b508160200151604051620003f99190620009a7565b6040519081900381208351516001600160801b03168252906001600160a01b038516907ff27320e83f88f912f4441ed1db7432165eab17cb2eeac6c08848b857172707ae9060200160405180910390a3505050565b600062000465836001600160a01b0384166200046e565b90505b92915050565b6000818152600183016020526040812054620004b75750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000468565b50600062000468565b828054620004ce90620008b0565b90600052602060002090601f016020900481019282620004f257600085556200053d565b82601f106200050d57805160ff19168380011785556200053d565b828001600101855582156200053d579182015b828111156200053d57825182559160200191906001019062000520565b506200054b9291506200054f565b5090565b5b808211156200054b576000815560010162000550565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620005a157620005a162000566565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620005d257620005d262000566565b604052919050565b60006001600160401b03821115620005f657620005f662000566565b5060051b60200190565b80516001600160801b03811681146200061857600080fd5b919050565b60005b838110156200063a57818101518382015260200162000620565b838111156200064a576000848401525b50505050565b6000601f83818401126200066357600080fd5b825160206200067c6200067683620005da565b620005a7565b82815260059290921b850181019181810190878411156200069c57600080fd5b8287015b84811015620007c65780516001600160401b0380821115620006c25760008081fd5b90890190601f19828c038101606080821215620006df5760008081fd5b620006e96200057c565b604080841215620006fa5760008081fd5b620007046200057c565b9350620007138b880162000600565b84526200072281880162000600565b848c01529281528582015192858411156200073f57600092508283fd5b83870196508f603f8801126200075757600093508384fd5b8a87015193508584111562000770576200077062000566565b620007818b868f87011601620005a7565b95508386528f818589010111156200079b57600094508485fd5b620007ac848c8801838a016200061d565b50808a0194909452505050845250918301918301620006a0565b50979650505050505050565b60008060408385031215620007e657600080fd5b82516001600160401b0380821115620007fe57600080fd5b818501915085601f8301126200081357600080fd5b81516020620008266200067683620005da565b82815260059290921b840181019181810190898411156200084657600080fd5b948201945b838610156200087d5785516001600160a01b03811681146200086d5760008081fd5b825294820194908201906200084b565b918801519196509093505050808211156200089757600080fd5b50620008a68582860162000650565b9150509250929050565b600181811c90821680620008c557607f821691505b60208210811415620008e757634e487b7160e01b600052602260045260246000fd5b50919050565b600080835481600182811c9150808316806200090a57607f831692505b60208084108214156200092b57634e487b7160e01b86526022600452602486fd5b818015620009425760018114620009545762000983565b60ff1986168952848901965062000983565b60008a81526020902060005b868110156200097b5781548b82015290850190830162000960565b505084890196505b509498975050505050505050565b634e487b7160e01b600052603260045260246000fd5b60008251620009bb8184602087016200061d565b9190910192915050565b60805160a05160c0516125d6620009f56000396000610707015260006106d70152600061024901526125d66000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80637ecebe00116100e3578063aa02f94a1161008c578063d505accf11610066578063d505accf14610425578063dd62ed3e14610438578063f2fde38b1461046357600080fd5b8063aa02f94a1461035e578063af93df57146103f2578063d46ec0ed1461040557600080fd5b8063941b7554116100bd578063941b75541461033057806395d89b4114610343578063a9059cbb1461034b57600080fd5b80637ecebe00146102d55780638238da3d146102f55780638da5cb5b1461030857600080fd5b8063313ce5671161014557806342966c681161011f57806342966c681461029a57806370a08231146102ad578063715018a6146102cd57600080fd5b8063313ce567146102445780633644e5151461027d57806340c10f191461028557600080fd5b80631ec90f2e116101765780631ec90f2e146101f557806323b872dd1461020a57806330adf81f1461021d57600080fd5b806306fdde031461019d578063095ea7b3146101bb57806318160ddd146101de575b600080fd5b6101a5610476565b6040516101b29190611d81565b60405180910390f35b6101ce6101c9366004611dbd565b610504565b60405190151581526020016101b2565b6101e760025481565b6040519081526020016101b2565b6101fd61057e565b6040516101b29190611de7565b6101ce610218366004611e41565b61058f565b6101e77f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b61026b7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101b2565b6101e76106d3565b610298610293366004611dbd565b610729565b005b6102986102a8366004611e7d565b610919565b6101e76102bb366004611e96565b60036020526000908152604090205481565b6102986109ec565b6101e76102e3366004611e96565b60056020526000908152604090205481565b610298610303366004612123565b610a79565b60065460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b2565b61029861033e3660046121e3565b610b08565b6101a5610bcb565b6101ce610359366004611dbd565b610bd8565b6103e561036c366004611e96565b60408051808201909152600080825260208201525073ffffffffffffffffffffffffffffffffffffffff166000908152600760209081526040918290208251808401909352546fffffffffffffffffffffffffffffffff8082168452700100000000000000000000000000000000909104169082015290565b6040516101b29190612258565b610298610400366004612285565b610c5d565b610418610413366004611e96565b610e22565b6040516101b291906122b8565b610298610433366004612304565b610f4f565b6101e7610446366004612377565b600460209081526000928352604080842090915290825290205481565b610298610471366004611e96565b61127b565b60008054610483906123a1565b80601f01602080910402602001604051908101604052809291908181526020018280546104af906123a1565b80156104fc5780601f106104d1576101008083540402835291602001916104fc565b820191906000526020600020905b8154815290600101906020018083116104df57829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061056c9086815260200190565b60405180910390a35060015b92915050565b606061058a60086113d4565b905090565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610623576105f18382612424565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602090815260408083203384529091529020555b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604081208054859290610658908490612424565b909155505073ffffffffffffffffffffffffffffffffffffffff808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106c09087815260200190565b60405180910390a3506001949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146107045761058a6113e1565b507f000000000000000000000000000000000000000000000000000000000000000090565b336000908152600760205260409020546fffffffffffffffffffffffffffffffff16806107b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e56414c49445f464143494c495441544f520000000000000000000000000060448201526064015b60405180910390fd5b3360009081526007602052604081205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906107f8848361243b565b905080831015610889576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f464143494c495441544f525f4255434b45545f43415041434954595f4558434560448201527f454445440000000000000000000000000000000000000000000000000000000060648201526084016107ae565b336000818152600760205260409081902080546fffffffffffffffffffffffffffffffff808616700100000000000000000000000000000000029116179055517e7c7de1f1a34712b17838a180c9c7b2cac4571e6c64cb423373b634636a61ce906109009085908590918252602082015260400190565b60405180910390a2610912858561147b565b5050505050565b3360009081526007602052604081205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169061095a8383612424565b336000818152600760205260409081902080546fffffffffffffffffffffffffffffffff80861670010000000000000000000000000000000002911617905551919250907e7c7de1f1a34712b17838a180c9c7b2cac4571e6c64cb423373b634636a61ce906109d59085908590918252602082015260400190565b60405180910390a26109e733846114f4565b505050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ae565b610a776000611582565b565b60065473ffffffffffffffffffffffffffffffffffffffff163314610afa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ae565b610b0482826115f9565b5050565b60065473ffffffffffffffffffffffffffffffffffffffff163314610b89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ae565b60005b818110156109e757610bc3838383818110610ba957610ba9612453565b9050602002016020810190610bbe9190611e96565b6116b4565b600101610b8c565b60018054610483906123a1565b33600090815260036020526040812080548391908390610bf9908490612424565b909155505073ffffffffffffffffffffffffffffffffffffffff8316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061056c9086815260200190565b60065473ffffffffffffffffffffffffffffffffffffffff163314610cde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ae565b73ffffffffffffffffffffffffffffffffffffffff821660009081526007602052604081206001018054610d11906123a1565b905011610d7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f464143494c495441544f525f444f45535f4e4f545f455849535400000000000060448201526064016107ae565b73ffffffffffffffffffffffffffffffffffffffff821660008181526007602090815260409182902080547fffffffffffffffffffffffffffffffff0000000000000000000000000000000081166fffffffffffffffffffffffffffffffff878116918217909355845192909116808352928201529092917fc795c0a4927c3b6645e4e49a5a519af936b3c1c0e4c323a3f7251063f3f4bb0e910160405180910390a2505050565b6040805160808101825260009181018281526060808301939093528152602081019190915273ffffffffffffffffffffffffffffffffffffffff8216600090815260076020908152604091829020825160808101845281546fffffffffffffffffffffffffffffffff8082169583019586527001000000000000000000000000000000009091041660608201529283526001810180549192840191610ec6906123a1565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef2906123a1565b8015610f3f5780601f10610f1457610100808354040283529160200191610f3f565b820191906000526020600020905b815481529060010190602001808311610f2257829003601f168201915b5050505050815250509050919050565b42841015610fb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016107ae565b6000610fc36106d3565b73ffffffffffffffffffffffffffffffffffffffff89811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938c166060840152608083018b905260a083019390935260c08083018a90528151808403909101815260e0830190915280519201919091207f190100000000000000000000000000000000000000000000000000000000000061010083015261010282019290925261012281019190915261014201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611122573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061119d57508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611203576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f494e56414c49445f5349474e455200000000000000000000000000000000000060448201526064016107ae565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526004602090815260408083208b8516808552908352928190208a905551898152919350918a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146112fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107ae565b73ffffffffffffffffffffffffffffffffffffffff811661139f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107ae565b6113a881611582565b50565b60006113cd8373ffffffffffffffffffffffffffffffffffffffff8416611816565b9392505050565b606060006113cd83611865565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516114139190612482565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b806002600082825461148d919061243b565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054839290611529908490612424565b909155505060028054829003905560405181815260009073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016114e8565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051825114611664576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f494e5055540000000000000000000000000000000000000060448201526064016107ae565b60005b81518110156109e7576116ac83828151811061168557611685612453565b602002602001015183838151811061169f5761169f612453565b60200260200101516118c1565b600101611667565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604090205470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff161561178d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f464143494c495441544f525f4255434b45545f4c4556454c5f4e4f545f5a455260448201527f4f0000000000000000000000000000000000000000000000000000000000000060648201526084016107ae565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760205260408120818155906117c36001830182611c34565b506117d19050600882611b24565b5060405173ffffffffffffffffffffffffffffffffffffffff8216907fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf90600090a250565b600081815260018301602052604081205461185d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610578565b506000610578565b6060816000018054806020026020016040519081016040528092919081815260200182805480156118b557602002820191906000526020600020905b8154815260200190600101908083116118a1575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526007602052604090206001810180546118f5906123a1565b15905061195e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f464143494c495441544f525f414c52454144595f45584953545300000000000060448201526064016107ae565b6000826020015151116119cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f4c4142454c0000000000000000000000000000000000000060448201526064016107ae565b8151602001516fffffffffffffffffffffffffffffffff1615611a4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f494e56414c49445f4255434b45545f434f4e46494755524154494f4e0000000060448201526064016107ae565b6020808301518051611a649260018501920190611c6e565b50815180516020909101516fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000029116178155611aa66008846113ab565b508160200151604051611ab99190612555565b6040519081900381208351516fffffffffffffffffffffffffffffffff1682529073ffffffffffffffffffffffffffffffffffffffff8516907ff27320e83f88f912f4441ed1db7432165eab17cb2eeac6c08848b857172707ae9060200160405180910390a3505050565b60006113cd8373ffffffffffffffffffffffffffffffffffffffff841660008181526001830160205260408120548015611c2a576000611b65600183612424565b8554909150600090611b7990600190612424565b9050818114611bde576000866000018281548110611b9957611b99612453565b9060005260206000200154905080876000018481548110611bbc57611bbc612453565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611bef57611bef612571565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610578565b6000915050610578565b508054611c40906123a1565b6000825580601f10611c50575050565b601f0160209004906000526020600020908101906113a89190611cf2565b828054611c7a906123a1565b90600052602060002090601f016020900481019282611c9c5760008555611ce2565b82601f10611cb557805160ff1916838001178555611ce2565b82800160010185558215611ce2579182015b82811115611ce2578251825591602001919060010190611cc7565b50611cee929150611cf2565b5090565b5b80821115611cee5760008155600101611cf3565b60005b83811015611d22578181015183820152602001611d0a565b83811115611d31576000848401525b50505050565b60008151808452611d4f816020860160208601611d07565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006113cd6020830184611d37565b803573ffffffffffffffffffffffffffffffffffffffff81168114611db857600080fd5b919050565b60008060408385031215611dd057600080fd5b611dd983611d94565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015611e3557835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611e03565b50909695505050505050565b600080600060608486031215611e5657600080fd5b611e5f84611d94565b9250611e6d60208501611d94565b9150604084013590509250925092565b600060208284031215611e8f57600080fd5b5035919050565b600060208284031215611ea857600080fd5b6113cd82611d94565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611f0357611f03611eb1565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611f5057611f50611eb1565b604052919050565b600067ffffffffffffffff821115611f7257611f72611eb1565b5060051b60200190565b80356fffffffffffffffffffffffffffffffff81168114611db857600080fd5b6000601f8381840112611fae57600080fd5b82356020611fc3611fbe83611f58565b611f09565b82815260059290921b85018101918181019087841115611fe257600080fd5b8287015b8481101561211757803567ffffffffffffffff808211156120075760008081fd5b908901907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828c0381016060808212156120415760008081fd5b612049611ee0565b6040808412156120595760008081fd5b612061611ee0565b935061206e8b8801611f7c565b845261207b818801611f7c565b848c015292815285820135928584111561209757600092508283fd5b83870196508f603f8801126120ae57600093508384fd5b8a8701359350858411156120c4576120c4611eb1565b6120d38b868f87011601611f09565b95508386528f818589010111156120ec57600094508485fd5b838188018c8801375060009285018a0192909252508088019290925250845250918301918301611fe6565b50979650505050505050565b6000806040838503121561213657600080fd5b823567ffffffffffffffff8082111561214e57600080fd5b818501915085601f83011261216257600080fd5b81356020612172611fbe83611f58565b82815260059290921b8401810191818101908984111561219157600080fd5b948201945b838610156121b6576121a786611d94565b82529482019490820190612196565b965050860135925050808211156121cc57600080fd5b506121d985828601611f9c565b9150509250929050565b600080602083850312156121f657600080fd5b823567ffffffffffffffff8082111561220e57600080fd5b818501915085601f83011261222257600080fd5b81358181111561223157600080fd5b8660208260051b850101111561224657600080fd5b60209290920196919550909350505050565b60408101610578828480516fffffffffffffffffffffffffffffffff908116835260209182015116910152565b6000806040838503121561229857600080fd5b6122a183611d94565b91506122af60208401611f7c565b90509250929050565b6020808252825180516fffffffffffffffffffffffffffffffff90811684840152910151166040820152600060208301516060808401526122fc6080840182611d37565b949350505050565b600080600080600080600060e0888a03121561231f57600080fd5b61232888611d94565b965061233660208901611d94565b95506040880135945060608801359350608088013560ff8116811461235a57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561238a57600080fd5b61239383611d94565b91506122af60208401611d94565b600181811c908216806123b557607f821691505b602082108114156123ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015612436576124366123f5565b500390565b6000821982111561244e5761244e6123f5565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080835481600182811c91508083168061249e57607f831692505b60208084108214156124d7577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b8180156124eb576001811461251a57612547565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861689528489019650612547565b60008a81526020902060005b8681101561253f5781548b820152908501908301612526565b505084890196505b509498975050505050505050565b60008251612567818460208701611d07565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212209be0e9712b2b9fed4dd3d131949ccca437090267c44589ac784b7a86d5c3b7d164736f6c634300080a0033';
-
-type GhoTokenConstructorParams =
- | [signer?: Signer]
- | ConstructorParameters;
-
-const isSuperArgs = (
- xs: GhoTokenConstructorParams,
-): xs is ConstructorParameters => xs.length > 1;
-
-export class GhoToken__factory extends ContractFactory {
- constructor(...args: GhoTokenConstructorParams) {
- if (isSuperArgs(args)) {
- super(...args);
- } else {
- super(_abi, _bytecode, args[0]);
- }
- }
-
- override deploy(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): Promise {
- return super.deploy(
- facilitatorsAddresses,
- facilitatorsConfig,
- overrides || {},
- ) as Promise;
- }
- override getDeployTransaction(
- facilitatorsAddresses: string[],
- facilitatorsConfig: IGhoToken.FacilitatorStruct[],
- overrides?: Overrides & { from?: string | Promise },
- ): TransactionRequest {
- return super.getDeployTransaction(
- facilitatorsAddresses,
- facilitatorsConfig,
- overrides || {},
- );
- }
- override attach(address: string): GhoToken {
- return super.attach(address) as GhoToken;
- }
- override connect(signer: Signer): GhoToken__factory {
- return super.connect(signer) as GhoToken__factory;
- }
-
- static readonly bytecode = _bytecode;
- static readonly abi = _abi;
- static createInterface(): GhoTokenInterface {
- return new utils.Interface(_abi) as GhoTokenInterface;
- }
- static connect(
- address: string,
- signerOrProvider: Signer | Provider,
- ): GhoToken {
- return new Contract(address, _abi, signerOrProvider) as GhoToken;
- }
-}
diff --git a/packages/contract-helpers/src/gho/typechain/GhoVariableDebtToken.d.ts b/packages/contract-helpers/src/gho/typechain/GhoVariableDebtToken.d.ts
deleted file mode 100644
index a753a881..00000000
--- a/packages/contract-helpers/src/gho/typechain/GhoVariableDebtToken.d.ts
+++ /dev/null
@@ -1,1741 +0,0 @@
-/* Autogenerated file. Do not edit manually. */
-/* eslint-disable */
-import type {
- BaseContract,
- BigNumber,
- BigNumberish,
- BytesLike,
- CallOverrides,
- ContractTransaction,
- Overrides,
- PopulatedTransaction,
- Signer,
- utils,
-} from 'ethers';
-import type {
- FunctionFragment,
- Result,
- EventFragment,
-} from '@ethersproject/abi';
-import type { Listener, Provider } from '@ethersproject/providers';
-import type {
- TypedEventFilter,
- TypedEvent,
- TypedListener,
- OnEvent,
-} from '../../../../../common';
-
-export interface GhoVariableDebtTokenInterface extends utils.Interface {
- functions: {
- 'DEBT_TOKEN_REVISION()': FunctionFragment;
- 'DELEGATION_WITH_SIG_TYPEHASH()': FunctionFragment;
- 'DOMAIN_SEPARATOR()': FunctionFragment;
- 'EIP712_REVISION()': FunctionFragment;
- 'POOL()': FunctionFragment;
- 'UNDERLYING_ASSET_ADDRESS()': FunctionFragment;
- 'allowance(address,address)': FunctionFragment;
- 'approve(address,uint256)': FunctionFragment;
- 'approveDelegation(address,uint256)': FunctionFragment;
- 'balanceOf(address)': FunctionFragment;
- 'borrowAllowance(address,address)': FunctionFragment;
- 'burn(address,uint256,uint256)': FunctionFragment;
- 'decimals()': FunctionFragment;
- 'decreaseAllowance(address,uint256)': FunctionFragment;
- 'decreaseBalanceFromInterest(address,uint256)': FunctionFragment;
- 'delegationWithSig(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment;
- 'getAToken()': FunctionFragment;
- 'getBalanceFromInterest(address)': FunctionFragment;
- 'getDiscountLockPeriod()': FunctionFragment;
- 'getDiscountPercent(address)': FunctionFragment;
- 'getDiscountRateStrategy()': FunctionFragment;
- 'getDiscountToken()': FunctionFragment;
- 'getIncentivesController()': FunctionFragment;
- 'getPreviousIndex(address)': FunctionFragment;
- 'getScaledUserBalanceAndSupply(address)': FunctionFragment;
- 'getUserRebalanceTimestamp(address)': FunctionFragment;
- 'increaseAllowance(address,uint256)': FunctionFragment;
- 'initialize(address,address,address,uint8,string,string,bytes)': FunctionFragment;
- 'mint(address,address,uint256,uint256)': FunctionFragment;
- 'name()': FunctionFragment;
- 'nonces(address)': FunctionFragment;
- 'rebalanceUserDiscountPercent(address)': FunctionFragment;
- 'scaledBalanceOf(address)': FunctionFragment;
- 'scaledTotalSupply()': FunctionFragment;
- 'setAToken(address)': FunctionFragment;
- 'setIncentivesController(address)': FunctionFragment;
- 'symbol()': FunctionFragment;
- 'totalSupply()': FunctionFragment;
- 'transfer(address,uint256)': FunctionFragment;
- 'transferFrom(address,address,uint256)': FunctionFragment;
- 'updateDiscountDistribution(address,address,uint256,uint256,uint256)': FunctionFragment;
- 'updateDiscountLockPeriod(uint256)': FunctionFragment;
- 'updateDiscountRateStrategy(address)': FunctionFragment;
- 'updateDiscountToken(address)': FunctionFragment;
- };
-
- getFunction(
- nameOrSignatureOrTopic:
- | 'DEBT_TOKEN_REVISION'
- | 'DELEGATION_WITH_SIG_TYPEHASH'
- | 'DOMAIN_SEPARATOR'
- | 'EIP712_REVISION'
- | 'POOL'
- | 'UNDERLYING_ASSET_ADDRESS'
- | 'allowance'
- | 'approve'
- | 'approveDelegation'
- | 'balanceOf'
- | 'borrowAllowance'
- | 'burn'
- | 'decimals'
- | 'decreaseAllowance'
- | 'decreaseBalanceFromInterest'
- | 'delegationWithSig'
- | 'getAToken'
- | 'getBalanceFromInterest'
- | 'getDiscountLockPeriod'
- | 'getDiscountPercent'
- | 'getDiscountRateStrategy'
- | 'getDiscountToken'
- | 'getIncentivesController'
- | 'getPreviousIndex'
- | 'getScaledUserBalanceAndSupply'
- | 'getUserRebalanceTimestamp'
- | 'increaseAllowance'
- | 'initialize'
- | 'mint'
- | 'name'
- | 'nonces'
- | 'rebalanceUserDiscountPercent'
- | 'scaledBalanceOf'
- | 'scaledTotalSupply'
- | 'setAToken'
- | 'setIncentivesController'
- | 'symbol'
- | 'totalSupply'
- | 'transfer'
- | 'transferFrom'
- | 'updateDiscountDistribution'
- | 'updateDiscountLockPeriod'
- | 'updateDiscountRateStrategy'
- | 'updateDiscountToken',
- ): FunctionFragment;
-
- encodeFunctionData(
- functionFragment: 'DEBT_TOKEN_REVISION',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'DELEGATION_WITH_SIG_TYPEHASH',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'DOMAIN_SEPARATOR',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'EIP712_REVISION',
- values?: undefined,
- ): string;
- encodeFunctionData(functionFragment: 'POOL', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'UNDERLYING_ASSET_ADDRESS',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'allowance',
- values: [string, string],
- ): string;
- encodeFunctionData(
- functionFragment: 'approve',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'approveDelegation',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string;
- encodeFunctionData(
- functionFragment: 'borrowAllowance',
- values: [string, string],
- ): string;
- encodeFunctionData(
- functionFragment: 'burn',
- values: [string, BigNumberish, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'decimals', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'decreaseAllowance',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'decreaseBalanceFromInterest',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'delegationWithSig',
- values: [
- string,
- string,
- BigNumberish,
- BigNumberish,
- BigNumberish,
- BytesLike,
- BytesLike,
- ],
- ): string;
- encodeFunctionData(functionFragment: 'getAToken', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'getBalanceFromInterest',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getDiscountLockPeriod',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'getDiscountPercent',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getDiscountRateStrategy',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'getDiscountToken',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'getIncentivesController',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'getPreviousIndex',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getScaledUserBalanceAndSupply',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'getUserRebalanceTimestamp',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'increaseAllowance',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'initialize',
- values: [string, string, string, BigNumberish, string, string, BytesLike],
- ): string;
- encodeFunctionData(
- functionFragment: 'mint',
- values: [string, string, BigNumberish, BigNumberish],
- ): string;
- encodeFunctionData(functionFragment: 'name', values?: undefined): string;
- encodeFunctionData(functionFragment: 'nonces', values: [string]): string;
- encodeFunctionData(
- functionFragment: 'rebalanceUserDiscountPercent',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'scaledBalanceOf',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'scaledTotalSupply',
- values?: undefined,
- ): string;
- encodeFunctionData(functionFragment: 'setAToken', values: [string]): string;
- encodeFunctionData(
- functionFragment: 'setIncentivesController',
- values: [string],
- ): string;
- encodeFunctionData(functionFragment: 'symbol', values?: undefined): string;
- encodeFunctionData(
- functionFragment: 'totalSupply',
- values?: undefined,
- ): string;
- encodeFunctionData(
- functionFragment: 'transfer',
- values: [string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'transferFrom',
- values: [string, string, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'updateDiscountDistribution',
- values: [string, string, BigNumberish, BigNumberish, BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'updateDiscountLockPeriod',
- values: [BigNumberish],
- ): string;
- encodeFunctionData(
- functionFragment: 'updateDiscountRateStrategy',
- values: [string],
- ): string;
- encodeFunctionData(
- functionFragment: 'updateDiscountToken',
- values: [string],
- ): string;
-
- decodeFunctionResult(
- functionFragment: 'DEBT_TOKEN_REVISION',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'DELEGATION_WITH_SIG_TYPEHASH',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'DOMAIN_SEPARATOR',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'EIP712_REVISION',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'POOL', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'UNDERLYING_ASSET_ADDRESS',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'approveDelegation',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'borrowAllowance',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'decreaseAllowance',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'decreaseBalanceFromInterest',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'delegationWithSig',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'getAToken', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'getBalanceFromInterest',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getDiscountLockPeriod',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getDiscountPercent',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getDiscountRateStrategy',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getDiscountToken',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getIncentivesController',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getPreviousIndex',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getScaledUserBalanceAndSupply',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'getUserRebalanceTimestamp',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'increaseAllowance',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result;
- decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'rebalanceUserDiscountPercent',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'scaledBalanceOf',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'scaledTotalSupply',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'setAToken', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'setIncentivesController',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'totalSupply',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result;
- decodeFunctionResult(
- functionFragment: 'transferFrom',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'updateDiscountDistribution',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'updateDiscountLockPeriod',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'updateDiscountRateStrategy',
- data: BytesLike,
- ): Result;
- decodeFunctionResult(
- functionFragment: 'updateDiscountToken',
- data: BytesLike,
- ): Result;
-
- events: {
- 'ATokenSet(address)': EventFragment;
- 'Approval(address,address,uint256)': EventFragment;
- 'BorrowAllowanceDelegated(address,address,address,uint256)': EventFragment;
- 'Burn(address,address,uint256,uint256,uint256)': EventFragment;
- 'DiscountLockPeriodUpdated(uint256,uint256)': EventFragment;
- 'DiscountPercentLocked(address,uint256,uint256)': EventFragment;
- 'DiscountRateStrategyUpdated(address,address)': EventFragment;
- 'DiscountTokenUpdated(address,address)': EventFragment;
- 'Initialized(address,address,address,uint8,string,string,bytes)': EventFragment;
- 'Mint(address,address,uint256,uint256,uint256)': EventFragment;
- 'Transfer(address,address,uint256)': EventFragment;
- };
-
- getEvent(nameOrSignatureOrTopic: 'ATokenSet'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'BorrowAllowanceDelegated'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Burn'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'DiscountLockPeriodUpdated'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'DiscountPercentLocked'): EventFragment;
- getEvent(
- nameOrSignatureOrTopic: 'DiscountRateStrategyUpdated',
- ): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'DiscountTokenUpdated'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Mint'): EventFragment;
- getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment;
-}
-
-export interface ATokenSetEventObject {
- aToken: string;
-}
-export type ATokenSetEvent = TypedEvent<[string], ATokenSetEventObject>;
-
-export type ATokenSetEventFilter = TypedEventFilter;
-
-export interface ApprovalEventObject {
- owner: string;
- spender: string;
- value: BigNumber;
-}
-export type ApprovalEvent = TypedEvent<
- [string, string, BigNumber],
- ApprovalEventObject
->;
-
-export type ApprovalEventFilter = TypedEventFilter;
-
-export interface BorrowAllowanceDelegatedEventObject {
- fromUser: string;
- toUser: string;
- asset: string;
- amount: BigNumber;
-}
-export type BorrowAllowanceDelegatedEvent = TypedEvent<
- [string, string, string, BigNumber],
- BorrowAllowanceDelegatedEventObject
->;
-
-export type BorrowAllowanceDelegatedEventFilter =
- TypedEventFilter;
-
-export interface BurnEventObject {
- from: string;
- target: string;
- value: BigNumber;
- balanceIncrease: BigNumber;
- index: BigNumber;
-}
-export type BurnEvent = TypedEvent<
- [string, string, BigNumber, BigNumber, BigNumber],
- BurnEventObject
->;
-
-export type BurnEventFilter = TypedEventFilter;
-
-export interface DiscountLockPeriodUpdatedEventObject {
- oldDiscountLockPeriod: BigNumber;
- newDiscountLockPeriod: BigNumber;
-}
-export type DiscountLockPeriodUpdatedEvent = TypedEvent<
- [BigNumber, BigNumber],
- DiscountLockPeriodUpdatedEventObject
->;
-
-export type DiscountLockPeriodUpdatedEventFilter =
- TypedEventFilter;
-
-export interface DiscountPercentLockedEventObject {
- user: string;
- discountPercent: BigNumber;
- rebalanceTimestamp: BigNumber;
-}
-export type DiscountPercentLockedEvent = TypedEvent<
- [string, BigNumber, BigNumber],
- DiscountPercentLockedEventObject
->;
-
-export type DiscountPercentLockedEventFilter =
- TypedEventFilter;
-
-export interface DiscountRateStrategyUpdatedEventObject {
- oldDiscountRateStrategy: string;
- newDiscountRateStrategy: string;
-}
-export type DiscountRateStrategyUpdatedEvent = TypedEvent<
- [string, string],
- DiscountRateStrategyUpdatedEventObject
->;
-
-export type DiscountRateStrategyUpdatedEventFilter =
- TypedEventFilter;
-
-export interface DiscountTokenUpdatedEventObject {
- oldDiscountToken: string;
- newDiscountToken: string;
-}
-export type DiscountTokenUpdatedEvent = TypedEvent<
- [string, string],
- DiscountTokenUpdatedEventObject
->;
-
-export type DiscountTokenUpdatedEventFilter =
- TypedEventFilter;
-
-export interface InitializedEventObject {
- underlyingAsset: string;
- pool: string;
- incentivesController: string;
- debtTokenDecimals: number;
- debtTokenName: string;
- debtTokenSymbol: string;
- params: string;
-}
-export type InitializedEvent = TypedEvent<
- [string, string, string, number, string, string, string],
- InitializedEventObject
->;
-
-export type InitializedEventFilter = TypedEventFilter;
-
-export interface MintEventObject {
- caller: string;
- onBehalfOf: string;
- value: BigNumber;
- balanceIncrease: BigNumber;
- index: BigNumber;
-}
-export type MintEvent = TypedEvent<
- [string, string, BigNumber, BigNumber, BigNumber],
- MintEventObject
->;
-
-export type MintEventFilter = TypedEventFilter;
-
-export interface TransferEventObject {
- from: string;
- to: string;
- value: BigNumber;
-}
-export type TransferEvent = TypedEvent<
- [string, string, BigNumber],
- TransferEventObject
->;
-
-export type TransferEventFilter = TypedEventFilter