diff --git a/schema.graphql b/schema.graphql index 87277e0..2bae9f8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -490,8 +490,8 @@ type OPC @entity { swapOceanFee: BigDecimal "fee in percent for swaps involving non OPC approved tokens" swapNonOceanFee: BigDecimal - "fee in percent taken by OPC from consumeFees" - consumeFee: BigDecimal + "fee in percent taken by OPC from orderFees" + orderFee: BigDecimal "fee in percent taken by OPC from providerFees" providerFee: BigDecimal approvedTokens: [String!] diff --git a/src/mappings/factoryRouter.ts b/src/mappings/factoryRouter.ts index e99db7e..9259619 100644 --- a/src/mappings/factoryRouter.ts +++ b/src/mappings/factoryRouter.ts @@ -35,7 +35,7 @@ export function handleOPCFeeChanged(event: OPCFeeChanged): void { event.params.newSwapNonOceanFee.toBigDecimal(), decimals ) - opc.consumeFee = weiToDecimal( + opc.orderFee = weiToDecimal( event.params.newConsumeFee.toBigDecimal(), decimals ) @@ -62,12 +62,12 @@ export function handleTokenAdded(event: TokenAdded): void { decimals ) - const newConsumeFee = contract.try_getOPCConsumeFee() - if (newConsumeFee.reverted) return + const newOrderFee = contract.try_getOPCConsumeFee() + if (newOrderFee.reverted) return const newProviderFee = contract.try_getOPCProviderFee() if (newProviderFee.reverted) return - opc.consumeFee = weiToDecimal(newConsumeFee.value.toBigDecimal(), decimals) + opc.orderFee = weiToDecimal(newOrderFee.value.toBigDecimal(), decimals) opc.providerFee = weiToDecimal(newProviderFee.value.toBigDecimal(), decimals) // add token to approvedTokens