Skip to content

Commit 469c9ac

Browse files
committed
removed SwapFeeUpdate
1 parent 49b6dd1 commit 469c9ac

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
lines changed

schema.graphql

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,6 @@ type AmpUpdate @entity(immutable: true) {
185185
endAmp: BigInt!
186186
}
187187

188-
type SwapFeeUpdate @entity(immutable: true) {
189-
id: ID!
190-
pool: Pool!
191-
scheduledTimestamp: Int!
192-
startTimestamp: BigInt!
193-
endTimestamp: BigInt!
194-
startSwapFeePercentage: BigDecimal!
195-
endSwapFeePercentage: BigDecimal!
196-
}
197-
198188
type Swap @entity(immutable: true) {
199189
id: ID!
200190
caller: Bytes!

src/mappings/poolController.ts

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address, BigDecimal, BigInt, log } from '@graphprotocol/graph-ts';
1+
import { Address, BigInt, log } from '@graphprotocol/graph-ts';
22
import { OracleEnabledChanged } from '../types/templates/WeightedPool2Tokens/WeightedPool2Tokens';
33
import { PausedStateChanged, SwapFeePercentageChanged } from '../types/templates/WeightedPool/WeightedPool';
44
import {
@@ -17,7 +17,7 @@ import {
1717
TokenRateProviderSet,
1818
} from '../types/templates/StablePhantomPoolV2/ComposableStablePool';
1919
import { ParametersSet } from '../types/templates/FXPool/FXPool';
20-
import { Pool, PriceRateProvider, GradualWeightUpdate, AmpUpdate, SwapFeeUpdate, PoolContract } from '../types/schema';
20+
import { Pool, PriceRateProvider, GradualWeightUpdate, AmpUpdate, PoolContract } from '../types/schema';
2121

2222
import {
2323
tokenToDecimal,
@@ -241,36 +241,6 @@ export function handleSwapFeePercentageChange(event: SwapFeePercentageChanged):
241241
const newSwapFee = scaleDown(event.params.swapFeePercentage, 18);
242242
pool.swapFee = newSwapFee;
243243
pool.save();
244-
245-
const swapFeeUpdateID = event.transaction.hash.toHexString().concat(event.transactionLogIndex.toString());
246-
createSwapFeeUpdate(
247-
swapFeeUpdateID,
248-
pool,
249-
event.block.timestamp.toI32(),
250-
event.block.timestamp,
251-
event.block.timestamp,
252-
newSwapFee,
253-
newSwapFee
254-
);
255-
}
256-
257-
export function createSwapFeeUpdate(
258-
_id: string,
259-
_pool: Pool,
260-
_blockTimestamp: i32,
261-
_startTimestamp: BigInt,
262-
_endTimestamp: BigInt,
263-
_startSwapFeePercentage: BigDecimal,
264-
_endSwapFeePercentage: BigDecimal
265-
): void {
266-
let swapFeeUpdate = new SwapFeeUpdate(_id);
267-
swapFeeUpdate.pool = _pool.id;
268-
swapFeeUpdate.scheduledTimestamp = _blockTimestamp;
269-
swapFeeUpdate.startTimestamp = _startTimestamp;
270-
swapFeeUpdate.endTimestamp = _endTimestamp;
271-
swapFeeUpdate.startSwapFeePercentage = _startSwapFeePercentage;
272-
swapFeeUpdate.endSwapFeePercentage = _endSwapFeePercentage;
273-
swapFeeUpdate.save();
274244
}
275245

276246
/************************************

0 commit comments

Comments
 (0)