Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdavinchee committed Jan 29, 2024
1 parent 71f8ff1 commit 7e31f4d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 54 deletions.
20 changes: 0 additions & 20 deletions packages/subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2411,11 +2411,6 @@ type AccountTokenSnapshot @entity {
"""
totalCFAAmountStreamedOutUntilUpdatedAt: BigInt!

"""
The total amount of `token` streamed from this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the GDA.
"""
totalGDAAmountStreamedOutUntilUpdatedAt: BigInt!

"""
The total amount of `token` streamed through this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements.
"""
Expand Down Expand Up @@ -2614,11 +2609,6 @@ type AccountTokenSnapshotLog @entity {
"""
totalCFAAmountStreamedOut: BigInt!

"""
The total (as of timestamp) amount of `token` streamed from this `account` until the `timestamp`/`block` for the GDA.
"""
totalGDAAmountStreamedOut: BigInt!

"""
The total (as of timestamp) net amount of `token` streamed through this `account` until the `timestamp`/`block`.
"""
Expand All @@ -2629,11 +2619,6 @@ type AccountTokenSnapshotLog @entity {
"""
totalCFAAmountStreamed: BigInt!

"""
The total (as of timestamp) net amount of `token` streamed through this `account` until the `timestamp`/`block` for the GDA.
"""
totalGDAAmountStreamed: BigInt!

"""
The total (as of timestamp) amount of `token` this `account` has transferred out until the `timestamp`/`block`.
"""
Expand Down Expand Up @@ -2919,11 +2904,6 @@ type TokenStatisticLog @entity {
"""
totalCFAAmountStreamed: BigInt!

"""
The all-time total amount of `token` streamed (outflows) until the `timestamp`/`block` for the GDA.
"""
totalGDAAmountStreamed: BigInt!

"""
The all-time total amount of `token` transferred until the `timestamp`/`block`.
"""
Expand Down
18 changes: 0 additions & 18 deletions packages/subgraph/src/mappingHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ if (accountTokenSnapshot == null) {
BIG_INT_ZERO;
accountTokenSnapshot.totalCFAAmountStreamedOutUntilUpdatedAt =
BIG_INT_ZERO;
accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt =
BIG_INT_ZERO;
accountTokenSnapshot.totalAmountStreamedUntilUpdatedAt = BIG_INT_ZERO;
accountTokenSnapshot.totalCFAAmountStreamedUntilUpdatedAt =
BIG_INT_ZERO;
Expand Down Expand Up @@ -754,8 +752,6 @@ export function _createAccountTokenSnapshotLogEntity(
atsLog.totalAmountStreamedOut = ats.totalAmountStreamedOutUntilUpdatedAt;
atsLog.totalCFAAmountStreamedOut =
ats.totalCFAAmountStreamedOutUntilUpdatedAt;
atsLog.totalGDAAmountStreamedOut =
ats.totalGDAAmountStreamedOutUntilUpdatedAt;
atsLog.totalAmountTransferred = ats.totalAmountTransferredUntilUpdatedAt;
atsLog.totalDeposit = ats.totalDeposit;
atsLog.totalCFADeposit = ats.totalCFADeposit;
Expand Down Expand Up @@ -1131,20 +1127,6 @@ export function updateATSStreamedAndBalanceUntilUpdatedAt(
totalCFAAmountStreamedOutSinceLastUpdatedAt
);

//////////////// GDA streamed amounts ////////////////
const totalGDAAmountStreamedOutSinceLastUpdatedAt =
getAmountStreamedSinceLastUpdatedAt(
block.timestamp,
accountTokenSnapshot.updatedAtTimestamp,
accountTokenSnapshot.totalGDAOutflowRate
);

// update the totalGDAStreamedUntilUpdatedAt (out)
accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt =
accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt.plus(
totalGDAAmountStreamedOutSinceLastUpdatedAt
);

accountTokenSnapshot.save();

const balanceUntilUpdatedAtAfterUpdate = accountTokenSnapshot.balanceUntilUpdatedAt;
Expand Down
12 changes: 0 additions & 12 deletions packages/subgraph/tests/assertionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export function assertIDAEventBaseProperties(
* @param totalGDAOutflowRate expected total outflow rate for the GDA
* @param totalAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for all flow agreements
* @param totalCFAAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for the CFA
* @param totalGDAAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for the GDA
* @param totalAmountTransferredUntilUpdatedAt expected total amount transferred until updated at timestamp
* @param totalAmountDistributedUntilUpdatedAt expected total amount distributed (with IDA) until updated at timestamp
* @param totalSupply expected total supply
Expand Down Expand Up @@ -191,7 +190,6 @@ export function assertTokenStatisticProperties(
totalGDAOutflowRate: BigInt,
totalAmountStreamedUntilUpdatedAt: BigInt,
totalCFAAmountStreamedUntilUpdatedAt: BigInt,
totalGDAAmountStreamedUntilUpdatedAt: BigInt,
totalAmountTransferredUntilUpdatedAt: BigInt,
totalAmountDistributedUntilUpdatedAt: BigInt,
totalSupply: BigInt,
Expand Down Expand Up @@ -222,7 +220,6 @@ export function assertTokenStatisticProperties(
assert.fieldEquals(entityName, id, "totalGDAOutflowRate", totalGDAOutflowRate.toString());
assert.fieldEquals(entityName, id, "totalAmountStreamedUntilUpdatedAt", totalAmountStreamedUntilUpdatedAt.toString());
assert.fieldEquals(entityName, id, "totalCFAAmountStreamedUntilUpdatedAt", totalCFAAmountStreamedUntilUpdatedAt.toString());
assert.fieldEquals(entityName, id, "totalGDAAmountStreamedUntilUpdatedAt", totalGDAAmountStreamedUntilUpdatedAt.toString());
assert.fieldEquals(entityName, id, "totalAmountTransferredUntilUpdatedAt", totalAmountTransferredUntilUpdatedAt.toString());
assert.fieldEquals(entityName, id, "totalAmountDistributedUntilUpdatedAt", totalAmountDistributedUntilUpdatedAt.toString());
assert.fieldEquals(entityName, id, "totalSupply", totalSupply.toString());
Expand Down Expand Up @@ -250,10 +247,8 @@ export function assertTokenStatisticProperties(
totalGDADeposit,
totalOutflowRate,
totalCFAOutflowRate,
totalGDAOutflowRate,
totalAmountStreamedUntilUpdatedAt,
totalCFAAmountStreamedUntilUpdatedAt,
totalGDAAmountStreamedUntilUpdatedAt,
totalAmountTransferredUntilUpdatedAt,
totalAmountDistributedUntilUpdatedAt,
totalSupply,
Expand Down Expand Up @@ -302,10 +297,8 @@ export function assertTokenStatisticProperties(
* @param totalGDADeposit expected total deposit amount for the GDA
* @param totalOutflowRate expected total outflow rate for all flow agreements
* @param totalCFAOutflowRate expected total outflow rate for the CFA
* @param totalGDAOutflowRate expected total outflow rate for the GDA
* @param totalAmountStreamed expected total amount streamed until timestamp for all flow agreements
* @param totalCFAAmountStreamed expected total amount streamed until timestamp for the CFA
* @param totalGDAAmountStreamed expected total amount streamed until timestamp for the GDA
* @param totalAmountTransferred expected total amount transferred until timestamp
* @param totalAmountDistributed expected total amount distributed (with IDA) until timestamp
* @param totalSupply expected total supply
Expand All @@ -331,10 +324,8 @@ export function assertTokenStatisticLogProperties(
totalGDADeposit: BigInt,
totalOutflowRate: BigInt,
totalCFAOutflowRate: BigInt,
totalGDAOutflowRate: BigInt,
totalAmountStreamed: BigInt,
totalCFAAmountStreamed: BigInt,
totalGDAAmountStreamed: BigInt,
totalAmountTransferred: BigInt,
totalAmountDistributed: BigInt,
totalSupply: BigInt,
Expand Down Expand Up @@ -370,10 +361,8 @@ export function assertTokenStatisticLogProperties(
assert.fieldEquals(entityName, id, "totalGDADeposit", totalGDADeposit.toString());
assert.fieldEquals(entityName, id, "totalOutflowRate", totalOutflowRate.toString());
assert.fieldEquals(entityName, id, "totalCFAOutflowRate", totalCFAOutflowRate.toString());
assert.fieldEquals(entityName, id, "totalGDAOutflowRate", totalGDAOutflowRate.toString());
assert.fieldEquals(entityName, id, "totalAmountStreamed", totalAmountStreamed.toString());
assert.fieldEquals(entityName, id, "totalCFAAmountStreamed", totalCFAAmountStreamed.toString());
assert.fieldEquals(entityName, id, "totalGDAAmountStreamed", totalGDAAmountStreamed.toString());
assert.fieldEquals(entityName, id, "totalAmountTransferred", totalAmountTransferred.toString());
assert.fieldEquals(entityName, id, "totalAmountDistributed", totalAmountDistributed.toString());
assert.fieldEquals(entityName, id, "totalSupply", totalSupply.toString());
Expand Down Expand Up @@ -424,7 +413,6 @@ export function assertEmptyTokenStatisticProperties(
BIG_INT_ZERO, // totalGDAOutflowRate
BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalAmountTransferredUntilUpdatedAt
BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt
totalSupply, // totalSupply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ describe("SuperToken Mapper Unit Tests", () => {
BIG_INT_ZERO, // totalGDAOutflowRate
BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalAmountTransferredUntilUpdatedAt
BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt
BigInt.fromI32(1000000), // totalSupply = 100
Expand Down Expand Up @@ -382,7 +381,6 @@ describe("SuperToken Mapper Unit Tests", () => {
BIG_INT_ZERO, // totalGDAOutflowRate
BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt
value, // totalAmountTransferredUntilUpdatedAt
BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt
BigInt.fromI32(1000000), // totalSupply = 100
Expand Down Expand Up @@ -529,7 +527,6 @@ describe("SuperToken Mapper Unit Tests", () => {
BIG_INT_ZERO, // totalGDAOutflowRate
BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt
value, // totalAmountTransferredUntilUpdatedAt
BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt
BigInt.fromI32(1000000), // totalSupply = 100
Expand Down Expand Up @@ -579,7 +576,6 @@ describe("SuperToken Mapper Unit Tests", () => {
BIG_INT_ZERO, // totalGDAOutflowRate
BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt
BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt
value.times(BigInt.fromI32(2)), // totalAmountTransferredUntilUpdatedAt
BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt
BigInt.fromI32(1000000), // totalSupply = 100
Expand Down

0 comments on commit 7e31f4d

Please sign in to comment.