1- import { Address , BigDecimal , BigInt , log } from '@graphprotocol/graph-ts' ;
1+ import { Address , BigInt , log } from '@graphprotocol/graph-ts' ;
22import { OracleEnabledChanged } from '../types/templates/WeightedPool2Tokens/WeightedPool2Tokens' ;
33import { PausedStateChanged , SwapFeePercentageChanged } from '../types/templates/WeightedPool/WeightedPool' ;
44import {
@@ -17,7 +17,7 @@ import {
1717 TokenRateProviderSet ,
1818} from '../types/templates/StablePhantomPoolV2/ComposableStablePool' ;
1919import { 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
2222import {
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