mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
parent
04eddaaac0
commit
a13ff28062
1
package-lock.json
generated
1
package-lock.json
generated
@ -5,7 +5,6 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ocean-subgraph",
|
||||
"version": "1.2.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
@ -26,8 +26,8 @@ type Token @entity {
|
||||
"adreess of fee token (can be Ocean, ETH, etc.)"
|
||||
publishMarketFeeToken: String
|
||||
|
||||
"fee amount. Fixed value, expressed in wei in contracts, needs conversion in decimals."
|
||||
publishMarketFeeAmmount: BigDecimal
|
||||
"fee amount. Fixed value."
|
||||
publishMarketFeeAmount: BigDecimal
|
||||
|
||||
"template ID of the datatoken"
|
||||
templateId: Int
|
||||
@ -152,9 +152,6 @@ type Pool @entity {
|
||||
"liquidity provider fee total amount"
|
||||
liquidityProviderSwapFeeAmount: BigDecimal!
|
||||
|
||||
"OPF Fee percent, fee that goes to Ocean Protocol Foundation : SWAP"
|
||||
opcFee: BigDecimal!
|
||||
|
||||
"total pool token shares"
|
||||
totalShares: BigDecimal!
|
||||
|
||||
@ -328,8 +325,6 @@ type FixedRateExchange @entity {
|
||||
"if the fre has the minter role on the datatoken"
|
||||
isMinter: Boolean
|
||||
|
||||
marketSwapFee: BigDecimal!
|
||||
|
||||
updates: [FixedRateExchangeUpdate!] @derivedFrom(field: "exchangeId")
|
||||
swaps: [FixedRateExchangeSwap!] @derivedFrom(field: "exchangeId")
|
||||
|
||||
@ -340,7 +335,7 @@ type FixedRateExchange @entity {
|
||||
"address of the market where the datatoken was created. This address collects market fees."
|
||||
publishMarketFeeAddress: String
|
||||
|
||||
"fee amount. Fixed value, expressed in wei in contracts, needs conversion in decimals."
|
||||
"fee amount. Fixed value"
|
||||
publishMarketSwapFee: BigDecimal
|
||||
|
||||
}
|
||||
|
@ -90,26 +90,24 @@ export function handlePublishMarketFeeChanged(
|
||||
event: PublishMarketFeeChanged
|
||||
): void {
|
||||
const token = getToken(event.address, true)
|
||||
if (token != null) {
|
||||
token.publishMarketFeeAddress =
|
||||
event.params.PublishMarketFeeAddress.toHexString()
|
||||
token.publishMarketFeeToken =
|
||||
event.params.PublishMarketFeeToken.toHexString()
|
||||
let decimals = BigInt.fromI32(18).toI32()
|
||||
if (
|
||||
token.publishMarketFeeToken !=
|
||||
'0x0000000000000000000000000000000000000000'
|
||||
) {
|
||||
const token = getToken(event.params.PublishMarketFeeToken, false)
|
||||
decimals = BigInt.fromI32(token.decimals).toI32()
|
||||
}
|
||||
token.publishMarketFeeAmmount = weiToDecimal(
|
||||
event.params.PublishMarketFeeAmount.toBigDecimal(),
|
||||
decimals
|
||||
)
|
||||
token.save()
|
||||
// TODO - shold we have a history
|
||||
if (!token) return
|
||||
|
||||
token.publishMarketFeeAddress =
|
||||
event.params.PublishMarketFeeAddress.toHexString()
|
||||
token.publishMarketFeeToken = event.params.PublishMarketFeeToken.toHexString()
|
||||
let decimals = BigInt.fromI32(18).toI32()
|
||||
if (
|
||||
token.publishMarketFeeToken != '0x0000000000000000000000000000000000000000'
|
||||
) {
|
||||
const token = getToken(event.params.PublishMarketFeeToken, false)
|
||||
decimals = BigInt.fromI32(token.decimals).toI32()
|
||||
}
|
||||
token.publishMarketFeeAmount = weiToDecimal(
|
||||
event.params.PublishMarketFeeAmount.toBigDecimal(),
|
||||
decimals
|
||||
)
|
||||
token.save()
|
||||
// TODO - shold we have a history
|
||||
}
|
||||
|
||||
// roles
|
||||
|
Loading…
Reference in New Issue
Block a user