diff --git a/protocol/synthetix/subgraph/arbitrum-mainnet/generated/schema.ts b/protocol/synthetix/subgraph/arbitrum-mainnet/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/arbitrum-mainnet/generated/schema.ts +++ b/protocol/synthetix/subgraph/arbitrum-mainnet/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/arbitrum-mainnet/schema.graphql b/protocol/synthetix/subgraph/arbitrum-mainnet/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/arbitrum-mainnet/schema.graphql +++ b/protocol/synthetix/subgraph/arbitrum-mainnet/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/arbitrum-sepolia/generated/schema.ts b/protocol/synthetix/subgraph/arbitrum-sepolia/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/arbitrum-sepolia/generated/schema.ts +++ b/protocol/synthetix/subgraph/arbitrum-sepolia/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/arbitrum-sepolia/schema.graphql b/protocol/synthetix/subgraph/arbitrum-sepolia/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/arbitrum-sepolia/schema.graphql +++ b/protocol/synthetix/subgraph/arbitrum-sepolia/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/base-mainnet-andromeda/generated/schema.ts b/protocol/synthetix/subgraph/base-mainnet-andromeda/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/base-mainnet-andromeda/generated/schema.ts +++ b/protocol/synthetix/subgraph/base-mainnet-andromeda/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/base-mainnet-andromeda/schema.graphql b/protocol/synthetix/subgraph/base-mainnet-andromeda/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/base-mainnet-andromeda/schema.graphql +++ b/protocol/synthetix/subgraph/base-mainnet-andromeda/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/base-sepolia-andromeda/generated/schema.ts b/protocol/synthetix/subgraph/base-sepolia-andromeda/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/base-sepolia-andromeda/generated/schema.ts +++ b/protocol/synthetix/subgraph/base-sepolia-andromeda/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/base-sepolia-andromeda/schema.graphql b/protocol/synthetix/subgraph/base-sepolia-andromeda/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/base-sepolia-andromeda/schema.graphql +++ b/protocol/synthetix/subgraph/base-sepolia-andromeda/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/mainnet/generated/schema.ts b/protocol/synthetix/subgraph/mainnet/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/mainnet/generated/schema.ts +++ b/protocol/synthetix/subgraph/mainnet/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/mainnet/handlePermissionGranted.ts b/protocol/synthetix/subgraph/mainnet/handlePermissionGranted.ts index 769ef22b2e..2cdaa1f417 100644 --- a/protocol/synthetix/subgraph/mainnet/handlePermissionGranted.ts +++ b/protocol/synthetix/subgraph/mainnet/handlePermissionGranted.ts @@ -1,14 +1,14 @@ import { PermissionGranted } from './generated/CoreProxy/CoreProxy'; -import { Account, AccountPermissionUsers } from './generated/schema'; +import { Account, AccountPermissionUser } from './generated/schema'; export function handlePermissionGranted(event: PermissionGranted): void { const account = Account.load(event.params.accountId.toString()); if (account !== null) { - let accountPermissionUsers = AccountPermissionUsers.load( + let accountPermissionUsers = AccountPermissionUser.load( event.params.accountId.toString().concat('-').concat(event.params.user.toHex()) ); if (accountPermissionUsers === null) { - accountPermissionUsers = new AccountPermissionUsers( + accountPermissionUsers = new AccountPermissionUser( event.params.accountId.toString().concat('-').concat(event.params.user.toHex()) ); accountPermissionUsers.created_at = event.block.timestamp; diff --git a/protocol/synthetix/subgraph/mainnet/handlePermissionRevoked.ts b/protocol/synthetix/subgraph/mainnet/handlePermissionRevoked.ts index da335bf618..c0df58791f 100644 --- a/protocol/synthetix/subgraph/mainnet/handlePermissionRevoked.ts +++ b/protocol/synthetix/subgraph/mainnet/handlePermissionRevoked.ts @@ -1,10 +1,10 @@ import { PermissionRevoked } from './generated/CoreProxy/CoreProxy'; -import { Account, AccountPermissionUsers } from './generated/schema'; +import { Account, AccountPermissionUser } from './generated/schema'; import { Bytes, store } from '@graphprotocol/graph-ts'; export function handlePermissionRevoked(event: PermissionRevoked): void { const account = Account.load(event.params.accountId.toString()); - const permissions = AccountPermissionUsers.load( + const permissions = AccountPermissionUser.load( event.params.accountId.toString().concat('-').concat(event.params.user.toHex()) ); if (account !== null && permissions !== null) { @@ -18,7 +18,7 @@ export function handlePermissionRevoked(event: PermissionRevoked): void { // remove the entity from the store if (newState.length === 0) { store.remove( - 'AccountPermissionUsers', + 'AccountPermissionUser', event.params.accountId.toString().concat('-').concat(event.params.user.toHex()) ); const newAccountIdsState: string[] = []; diff --git a/protocol/synthetix/subgraph/mainnet/schema.graphql b/protocol/synthetix/subgraph/mainnet/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/mainnet/schema.graphql +++ b/protocol/synthetix/subgraph/mainnet/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/optimism-mainnet/generated/schema.ts b/protocol/synthetix/subgraph/optimism-mainnet/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/optimism-mainnet/generated/schema.ts +++ b/protocol/synthetix/subgraph/optimism-mainnet/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/optimism-mainnet/schema.graphql b/protocol/synthetix/subgraph/optimism-mainnet/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/optimism-mainnet/schema.graphql +++ b/protocol/synthetix/subgraph/optimism-mainnet/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/sepolia/generated/schema.ts b/protocol/synthetix/subgraph/sepolia/generated/schema.ts index bfcd54a20b..c1021e220b 100644 --- a/protocol/synthetix/subgraph/sepolia/generated/schema.ts +++ b/protocol/synthetix/subgraph/sepolia/generated/schema.ts @@ -1174,7 +1174,7 @@ export class Account extends Entity { } } -export class AccountPermissionUsers extends Entity { +export class AccountPermissionUser extends Entity { constructor(id: string) { super(); this.set('id', Value.fromString(id)); @@ -1182,24 +1182,24 @@ export class AccountPermissionUsers extends Entity { save(): void { let id = this.get('id'); - assert(id != null, 'Cannot save AccountPermissionUsers entity without an ID'); + assert(id != null, 'Cannot save AccountPermissionUser entity without an ID'); if (id) { assert( id.kind == ValueKind.STRING, - `Entities of type AccountPermissionUsers must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` + `Entities of type AccountPermissionUser must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); - store.set('AccountPermissionUsers', id.toString(), this); + store.set('AccountPermissionUser', id.toString(), this); } } - static loadInBlock(id: string): AccountPermissionUsers | null { - return changetype( - store.get_in_block('AccountPermissionUsers', id) + static loadInBlock(id: string): AccountPermissionUser | null { + return changetype( + store.get_in_block('AccountPermissionUser', id) ); } - static load(id: string): AccountPermissionUsers | null { - return changetype(store.get('AccountPermissionUsers', id)); + static load(id: string): AccountPermissionUser | null { + return changetype(store.get('AccountPermissionUser', id)); } get id(): string { diff --git a/protocol/synthetix/subgraph/sepolia/schema.graphql b/protocol/synthetix/subgraph/sepolia/schema.graphql index ff091e980b..61bc44863f 100644 --- a/protocol/synthetix/subgraph/sepolia/schema.graphql +++ b/protocol/synthetix/subgraph/sepolia/schema.graphql @@ -104,10 +104,10 @@ type Account @entity { created_at_block: BigInt! updated_at: BigInt! updated_at_block: BigInt! - permissions: [AccountPermissionUsers!] + permissions: [AccountPermissionUser!] } -type AccountPermissionUsers @entity { +type AccountPermissionUser @entity { "NFT token id + user address" id: ID! address: Bytes! diff --git a/protocol/synthetix/subgraph/subgraph.arbitrum-mainnet.yaml b/protocol/synthetix/subgraph/subgraph.arbitrum-mainnet.yaml index e06f33a73e..f1bd6f47c0 100644 --- a/protocol/synthetix/subgraph/subgraph.arbitrum-mainnet.yaml +++ b/protocol/synthetix/subgraph/subgraph.arbitrum-mainnet.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.arbitrum-sepolia.yaml b/protocol/synthetix/subgraph/subgraph.arbitrum-sepolia.yaml index 5929c240a2..a1bcf7eac3 100644 --- a/protocol/synthetix/subgraph/subgraph.arbitrum-sepolia.yaml +++ b/protocol/synthetix/subgraph/subgraph.arbitrum-sepolia.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.base-mainnet-andromeda.yaml b/protocol/synthetix/subgraph/subgraph.base-mainnet-andromeda.yaml index d1a50a0357..c9b7ec93a4 100644 --- a/protocol/synthetix/subgraph/subgraph.base-mainnet-andromeda.yaml +++ b/protocol/synthetix/subgraph/subgraph.base-mainnet-andromeda.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.base-sepolia-andromeda.yaml b/protocol/synthetix/subgraph/subgraph.base-sepolia-andromeda.yaml index 834e9941b3..d6c4ed2a99 100644 --- a/protocol/synthetix/subgraph/subgraph.base-sepolia-andromeda.yaml +++ b/protocol/synthetix/subgraph/subgraph.base-sepolia-andromeda.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.mainnet.yaml b/protocol/synthetix/subgraph/subgraph.mainnet.yaml index 5ff651aec4..6de1d7b6b0 100644 --- a/protocol/synthetix/subgraph/subgraph.mainnet.yaml +++ b/protocol/synthetix/subgraph/subgraph.mainnet.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.optimism-mainnet.yaml b/protocol/synthetix/subgraph/subgraph.optimism-mainnet.yaml index 1058393eeb..fb2889c9bc 100644 --- a/protocol/synthetix/subgraph/subgraph.optimism-mainnet.yaml +++ b/protocol/synthetix/subgraph/subgraph.optimism-mainnet.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.optimism-sepolia.yaml b/protocol/synthetix/subgraph/subgraph.optimism-sepolia.yaml index 56a85a0f73..f7f0f4b0a8 100644 --- a/protocol/synthetix/subgraph/subgraph.optimism-sepolia.yaml +++ b/protocol/synthetix/subgraph/subgraph.optimism-sepolia.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/subgraph.sepolia.yaml b/protocol/synthetix/subgraph/subgraph.sepolia.yaml index 94d5f26256..1cf0350672 100644 --- a/protocol/synthetix/subgraph/subgraph.sepolia.yaml +++ b/protocol/synthetix/subgraph/subgraph.sepolia.yaml @@ -22,7 +22,7 @@ dataSources: - MarketManagerModule - CollateralType - AccountModule - - AccountPermissionUsers + - AccountPermissionUser - VaultModule - Position - IssueUSDModule diff --git a/protocol/synthetix/subgraph/tests/handlePermissionGranted.ts b/protocol/synthetix/subgraph/tests/handlePermissionGranted.ts index ac60d6a1d2..60455d6e49 100644 --- a/protocol/synthetix/subgraph/tests/handlePermissionGranted.ts +++ b/protocol/synthetix/subgraph/tests/handlePermissionGranted.ts @@ -11,22 +11,22 @@ export default function test(): void { const newPermissionGrantedEvent = createPermissionGrantedEvent(1, address, 1234, now + 1000, now); handleAccountCreated(newAccountCreatedEvent); handlePermissionGranted(newPermissionGrantedEvent); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'id', `1-${address}`); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'id', `1-${address}`); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'permissions', `[${Bytes.fromByteArray(Bytes.fromI64(1234)).toHex()}]` ); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'address', address); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'account', '1'); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'address', address); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'account', '1'); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'created_at', (now + 1000).toString() ); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'created_at_block', now.toString()); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'created_at_block', now.toString()); assert.fieldEquals('Account', '1', 'permissions', `[1-${address}]`); assert.fieldEquals('Account', '1', 'created_at', now.toString()); assert.fieldEquals('Account', '1', 'created_at_block', (now - 1000).toString()); @@ -42,7 +42,7 @@ export default function test(): void { ); handlePermissionGranted(newPermissionGrantedEvent2); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'permissions', `[${Bytes.fromByteArray(Bytes.fromI64(1234)).toHex()}, ${Bytes.fromByteArray( @@ -52,13 +52,13 @@ export default function test(): void { assert.fieldEquals('Account', '1', 'updated_at_block', (now + 1000).toString()); assert.fieldEquals('Account', '1', 'updated_at', (now + 2000).toString()); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'updated_at_block', (now + 1000).toString() ); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'updated_at', (now + 2000).toString() diff --git a/protocol/synthetix/subgraph/tests/handlePermissionRevoked.ts b/protocol/synthetix/subgraph/tests/handlePermissionRevoked.ts index b06faacee2..e4ee56d5b2 100644 --- a/protocol/synthetix/subgraph/tests/handlePermissionRevoked.ts +++ b/protocol/synthetix/subgraph/tests/handlePermissionRevoked.ts @@ -31,23 +31,23 @@ export default function test(): void { now + 2000 ); handlePermissionRevoked(newPermissionRevokedEvent); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'address', address); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'address', address); assert.fieldEquals('Account', '1', 'permissions', `[1-${address}]`); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'created_at', (now + 1000).toString() ); - assert.fieldEquals('AccountPermissionUsers', `1-${address}`, 'created_at_block', now.toString()); + assert.fieldEquals('AccountPermissionUser', `1-${address}`, 'created_at_block', now.toString()); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'updated_at', (now + 3000).toString() ); assert.fieldEquals( - 'AccountPermissionUsers', + 'AccountPermissionUser', `1-${address}`, 'updated_at_block', (now + 2000).toString() @@ -57,7 +57,7 @@ export default function test(): void { assert.fieldEquals('Account', '1', 'updated_at', (now + 3000).toString()); assert.fieldEquals('Account', '1', 'updated_at_block', (now + 2000).toString()); assert.notInStore( - 'AccountPermissionUsers', + 'AccountPermissionUser', Bytes.fromByteArray(ByteArray.fromHexString(Address.fromString(address).toHex())).toString() ); }