Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions protocol/synthetix/subgraph/arbitrum-mainnet/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
4 changes: 2 additions & 2 deletions protocol/synthetix/subgraph/arbitrum-mainnet/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
18 changes: 9 additions & 9 deletions protocol/synthetix/subgraph/arbitrum-sepolia/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
4 changes: 2 additions & 2 deletions protocol/synthetix/subgraph/arbitrum-sepolia/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
18 changes: 9 additions & 9 deletions protocol/synthetix/subgraph/mainnet/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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[] = [];
Expand Down
4 changes: 2 additions & 2 deletions protocol/synthetix/subgraph/mainnet/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
18 changes: 9 additions & 9 deletions protocol/synthetix/subgraph/optimism-mainnet/generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,32 +1174,32 @@ 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));
}

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<AccountPermissionUsers | null>(
store.get_in_block('AccountPermissionUsers', id)
static loadInBlock(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(
store.get_in_block('AccountPermissionUser', id)
);
}

static load(id: string): AccountPermissionUsers | null {
return changetype<AccountPermissionUsers | null>(store.get('AccountPermissionUsers', id));
static load(id: string): AccountPermissionUser | null {
return changetype<AccountPermissionUser | null>(store.get('AccountPermissionUser', id));
}

get id(): string {
Expand Down
4 changes: 2 additions & 2 deletions protocol/synthetix/subgraph/optimism-mainnet/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
Loading