Comments (4)
type Vault @entity {
id: ID!
address: Bytes!
asset: Token!
timestamp: BigInt!
totalAssets: BigInt!
totalSupply: BigInt!
assetPerShare: BigInt!
apy: BigDecimal!
DailyVaultStats: [DailyVaultStat!]! @derivedFrom(field: "vault")
}
type DailyVaultStat @entity {
id: ID!
vault: Vault!
timestamp: BigInt!
apy: BigDecimal!
totalAssets: BigInt!
totalSupply: BigInt!
assetPerShare: BigInt!
}
type VaultBalance @entity {
id: ID!
owner: Bytes!
vault: Vault!
timestamp: BigInt!
shareBalance: BigInt!
assetBalance: BigInt!
assetDeposited: BigInt!
dailyVaultBalances: [DailyVaultBalance!]! @derivedFrom(field: "vaultBalance")
}
type DailyVaultBalance @entity {
id: ID!
vaultBalance: VaultBalance!
timestamp: BigInt!
shareBalance: BigInt!
assetBalance: BigInt!
assetDeposited: BigInt!
}
enum TransactionType {
DEPOSIT
WITHDRAW
TRANSFER
}
type Transaction @entity {
id: ID!
vault: Vault!
timestamp: BigInt!
type: TransactionType!
shareAmount: BigInt!
assetAmount: BigInt!
hash: Bytes!
to: Bytes!
from: Bytes!
}
type Token @entity {
id: ID!
symbol: String!
name: String!
decimals: Int!
}
type TokenBalance @entity {
id: ID!
owner: Bytes!
token: Token!
balance: BigInt!
timestamp: BigInt!
}
from mstable-subgraphs-monorepo.
a few comments:
- what do you think of adding the address on relevant entities (or maybe you were planning on using
id
field for it) - we actually have 4 transaction types (+ MINT, REDEEM)
- is transaction data enough? Don't we need
hash
,to
,from
,spender
,...
from mstable-subgraphs-monorepo.
- yes we can, and it will also be the
id
field - from the ABI I see there's only
Deposit
,Withdraw
andTransfer
events https://api-goerli.etherscan.io/api?module=contract&action=getabi&address=0xA54f8A870f1817271bcb1DeDa0aB37566f6C4556 - yes you're right, will add that too
from mstable-subgraphs-monorepo.
agreed on the schema, move on to the development and integration
from mstable-subgraphs-monorepo.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mstable-subgraphs-monorepo.