Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(tectonic): Fix linting, fix duplicate ABI log warning
Browse files Browse the repository at this point in the history
  • Loading branch information
immasandwich committed Jun 23, 2022
1 parent efc7d80 commit 8a2c8a7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 62 deletions.
9 changes: 0 additions & 9 deletions src/apps/tectonic/contracts/abis/tectonic-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "string", "name": "action", "type": "string" },
{ "indexed": false, "internalType": "bool", "name": "pauseState", "type": "bool" }
],
"name": "ActionPaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down
29 changes: 6 additions & 23 deletions src/apps/tectonic/contracts/ethers/TectonicCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ export interface TectonicCoreInterface extends utils.Interface {
decodeFunctionResult(functionFragment: 'whitelistedAddresses', data: BytesLike): Result;

events: {
'ActionPaused(string,bool)': EventFragment;
'ActionPaused(address,string,bool)': EventFragment;
'ContributorTonicSpeedUpdated(address,uint256)': EventFragment;
'DistributedBorrowerTonic(address,address,uint256,uint256)': EventFragment;
Expand All @@ -403,8 +402,7 @@ export interface TectonicCoreInterface extends utils.Interface {
'WhitelistStatusChanged(bool)': EventFragment;
};

getEvent(nameOrSignatureOrTopic: 'ActionPaused(string,bool)'): EventFragment;
getEvent(nameOrSignatureOrTopic: 'ActionPaused(address,string,bool)'): EventFragment;
getEvent(nameOrSignatureOrTopic: 'ActionPaused'): EventFragment;
getEvent(nameOrSignatureOrTopic: 'ContributorTonicSpeedUpdated'): EventFragment;
getEvent(nameOrSignatureOrTopic: 'DistributedBorrowerTonic'): EventFragment;
getEvent(nameOrSignatureOrTopic: 'DistributedSupplierTonic'): EventFragment;
Expand All @@ -427,25 +425,14 @@ export interface TectonicCoreInterface extends utils.Interface {
getEvent(nameOrSignatureOrTopic: 'WhitelistStatusChanged'): EventFragment;
}

export interface ActionPaused_string_bool_EventObject {
action: string;
pauseState: boolean;
}
export type ActionPaused_string_bool_Event = TypedEvent<[string, boolean], ActionPaused_string_bool_EventObject>;

export type ActionPaused_string_bool_EventFilter = TypedEventFilter<ActionPaused_string_bool_Event>;

export interface ActionPaused_address_string_bool_EventObject {
export interface ActionPausedEventObject {
tToken: string;
action: string;
pauseState: boolean;
}
export type ActionPaused_address_string_bool_Event = TypedEvent<
[string, string, boolean],
ActionPaused_address_string_bool_EventObject
>;
export type ActionPausedEvent = TypedEvent<[string, string, boolean], ActionPausedEventObject>;

export type ActionPaused_address_string_bool_EventFilter = TypedEventFilter<ActionPaused_address_string_bool_Event>;
export type ActionPausedEventFilter = TypedEventFilter<ActionPausedEvent>;

export interface ContributorTonicSpeedUpdatedEventObject {
contributor: string;
Expand Down Expand Up @@ -1682,12 +1669,8 @@ export interface TectonicCore extends BaseContract {
};

filters: {
'ActionPaused(string,bool)'(action?: null, pauseState?: null): ActionPaused_string_bool_EventFilter;
'ActionPaused(address,string,bool)'(
tToken?: null,
action?: null,
pauseState?: null,
): ActionPaused_address_string_bool_EventFilter;
'ActionPaused(address,string,bool)'(tToken?: null, action?: null, pauseState?: null): ActionPausedEventFilter;
ActionPaused(tToken?: null, action?: null, pauseState?: null): ActionPausedEventFilter;

'ContributorTonicSpeedUpdated(address,uint256)'(
contributor?: string | null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@ const _abi = [
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'string',
name: 'action',
type: 'string',
},
{
indexed: false,
internalType: 'bool',
name: 'pauseState',
type: 'bool',
},
],
name: 'ActionPaused',
type: 'event',
},
{
anonymous: false,
inputs: [
Expand Down
4 changes: 2 additions & 2 deletions src/apps/tectonic/cronos/tectonic.balance-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { Inject } from '@nestjs/common';

import { Register } from '~app-toolkit/decorators';
import { presentBalanceFetcherResponse } from '~app-toolkit/helpers/presentation/balance-fetcher-response.present';
import { CompoundLendingMetaHelper } from '~apps/compound';
import { BalanceFetcher } from '~balance/balance-fetcher.interface';
import { Network } from '~types/network.interface';
import { CompoundLendingMetaHelper, CompoundSupplyBalanceHelper } from '~apps/compound';

import { TectonicContractFactory } from '../contracts';
import { TectonicBorrowBalanceHelper } from '../helper/tectonic.borrow.balance-helper';
import { TectonicClaimableBalanceHelper } from '../helper/tectonic.claimable.balance-helper';
import { TectonicSupplyBalanceHelper } from '../helper/tectonic.supply.balance-helper';
import { TectonicBorrowBalanceHelper } from '../helper/tectonic.borrow.balance-helper';
import { TECTONIC_DEFINITION } from '../tectonic.definition';

const appId = TECTONIC_DEFINITION.id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Inject } from '@nestjs/common';

import { Register } from '~app-toolkit/decorators';
import { CompoundBorrowContractPositionHelper } from '~apps/compound';
import { PositionFetcher } from '~position/position-fetcher.interface';
import { ContractPosition } from '~position/position.interface';
import { Network } from '~types/network.interface';
import { CompoundBorrowContractPositionHelper } from '~apps/compound';

import { TECTONIC_DEFINITION } from '../tectonic.definition';

Expand Down
10 changes: 5 additions & 5 deletions src/apps/tectonic/cronos/tectonic.supply.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export class CronosTectonicSupplyTokenFetcher implements PositionFetcher<AppToke
getTectonicCoreContract: ({ address, network }) =>
this.tectonicContractFactory.tectonicCore({ address, network }),
getTokenContract: ({ address, network }) => this.tectonicContractFactory.tectonicTToken({ address, network }),
getAllMarkets: ({ contract }) => contract.getAllMarkets(),
getExchangeRate: ({ contract }) => contract.callStatic.exchangeRateCurrent(),
getSupplyRate: ({ contract }) => contract.supplyRatePerBlock(),
getBorrowRate: ({ contract }) => contract.borrowRatePerBlock(),
getUnderlyingAddress: ({ contract }) => contract.underlying(),
getAllMarkets: ({ contract, multicall }) => multicall.wrap(contract).getAllMarkets(),
getExchangeRate: ({ contract, multicall }) => multicall.wrap(contract).callStatic.exchangeRateCurrent(),
getSupplyRate: ({ contract, multicall }) => multicall.wrap(contract).supplyRatePerBlock(),
getBorrowRate: ({ contract, multicall }) => multicall.wrap(contract).borrowRatePerBlock(),
getUnderlyingAddress: ({ contract, multicall }) => multicall.wrap(contract).underlying(),
getExchangeRateMantissa: ({ underlyingTokenDecimals }) => underlyingTokenDecimals + 10,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/tectonic/cronos/tectonic.tvl-fetcher.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Inject } from '@nestjs/common';

import { Register } from '~app-toolkit/decorators';
import { CompoundTvlHelper } from '~apps/compound';
import { TvlFetcher } from '~stats/tvl/tvl-fetcher.interface';
import { Network } from '~types/network.interface';
import { CompoundTvlHelper } from '~apps/compound';

import { TECTONIC_DEFINITION } from '../tectonic.definition';

Expand Down
4 changes: 2 additions & 2 deletions src/apps/tectonic/tectonic.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { CronosTectonicBalanceFetcher } from './cronos/tectonic.balance-fetcher'
import { CronosTectonicBorrowContractPositionFetcher } from './cronos/tectonic.borrow.contract-position-fetcher';
import { CronosTectonicSupplyTokenFetcher } from './cronos/tectonic.supply.token-fetcher';
import { CronosTectonicTvlFetcher } from './cronos/tectonic.tvl-fetcher';
import { TectonicClaimableBalanceHelper } from './helper/tectonic.claimable.balance-helper';
import { TectonicBorrowBalanceHelper } from './helper/tectonic.borrow.balance-helper';
import { TectonicSupplyTokenHelper } from './helper/tectonic.supply.token-helper';
import { TectonicClaimableBalanceHelper } from './helper/tectonic.claimable.balance-helper';
import { TectonicSupplyBalanceHelper } from './helper/tectonic.supply.balance-helper';
import { TectonicSupplyTokenHelper } from './helper/tectonic.supply.token-helper';
import { TectonicAppDefinition, TECTONIC_DEFINITION } from './tectonic.definition';

@Register.AppModule({
Expand Down

0 comments on commit 8a2c8a7

Please sign in to comment.