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