Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfantaholic committed Nov 29, 2023
1 parent 02d28ea commit 415aca5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion subgraphs/cauldrons/src/helpers/collateral/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './get-or-create-collateral';
export * from './get-or-create-collateral-daily-snapshot';
export * from './get-or-create-collateral-houry-snapshot';
export * from './get-or-create-collateral-houry-snapshot';
27 changes: 14 additions & 13 deletions subgraphs/cauldrons/tests/cauldron.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
CAULDRON_V1_COLLATERAL_ADDRESS,
PROTOCOL_ENTITY_TYPE,
COLLATERAL_DAILY_SNAPSHOT,
COLLATERAL_HOURY_SNAPSHOT
COLLATERAL_HOURY_SNAPSHOT,
} from './constants';
import { handleLogAccrue, handleLogExchangeRate } from '../src/mappings/cauldron';

Expand Down Expand Up @@ -162,12 +162,13 @@ describe('Cauldrons', () => {
createCauldron(CLONE_ADDRESS, NON_CAULDRON_V1_MASTER_CONTRACT_ADDRESS, BLOCK_NUMBER, BLOCK_TIMESTAMP, NON_CAULDRON_V1_DATA);

const cauldron = getCauldron(CLONE_ADDRESS.toHexString())!;
cauldron.totalCollateralShare = BigDecimal.fromString("10000");
cauldron.save();cauldron
cauldron.totalCollateralShare = BigDecimal.fromString('10000');
cauldron.save();
cauldron;
});

test('should update cauldron', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -182,7 +183,7 @@ describe('Cauldrons', () => {
});

test('should update cauldron daily snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -194,19 +195,19 @@ describe('Cauldrons', () => {
});

test('should update cauldron houry snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);

const cauldron = getCauldron(CLONE_ADDRESS.toHexString())!;

const cauldronHourySnapshotId = getOrCreateCauldronHourySnapshot(cauldron, log.block).id;
assert.fieldEquals(CAULDRON_HOURY_SNAPSHOT, cauldronHourySnapshotId, 'totalValueLockedUsd', "5.7910000000000000000029296669");
assert.fieldEquals(CAULDRON_HOURY_SNAPSHOT, cauldronHourySnapshotId, 'totalValueLockedUsd', '5.7910000000000000000029296669');
});

test('should update collateral', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -218,7 +219,7 @@ describe('Cauldrons', () => {
});

test('should update collateral daily snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -231,7 +232,7 @@ describe('Cauldrons', () => {
});

test('should update collateral houry snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -244,7 +245,7 @@ describe('Cauldrons', () => {
});

test('should update protocol', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -254,7 +255,7 @@ describe('Cauldrons', () => {
});

test('should update protocol daily snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand All @@ -264,7 +265,7 @@ describe('Cauldrons', () => {
});

test('should update protocol houry snapshot', () => {
const amount = BigInt.fromString("1726817475392850975651");
const amount = BigInt.fromString('1726817475392850975651');
const log = createLogExchangeRate(amount);

handleLogExchangeRate(log);
Expand Down

0 comments on commit 415aca5

Please sign in to comment.