Skip to content

Commit 254a496

Browse files
authored
Merge pull request #84 from UniqueNetwork/release/v1.6.1
Release/v1.6.1
2 parents 8a0cf1b + 60161c0 commit 254a496

11 files changed

Lines changed: 128 additions & 264 deletions

docker/polkastats-backend/docker-compose.local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ services:
3030
# Hasura
3131
#
3232
graphql-engine:
33-
image: hasura/graphql-engine:latest
33+
image: hasura/graphql-engine:v2.2.0
3434
ports:
3535
- '8080:8080'
3636
depends_on:

docker/polkastats-backend/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727

2828

2929
graphql-engine:
30-
image: hasura/graphql-engine:latest
30+
image: hasura/graphql-engine:v2.2.0
3131
ports:
3232
- '8080:80'
3333
depends_on:

hasura/hasura_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":3,"sources":[{"name":"default","kind":"postgres","tables":[{"table":{"schema":"public","name":"SequelizeMeta"}},{"table":{"schema":"public","name":"account"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_height","timestamp","is_staking","account_id","available_balance","balances","free_balance","locked_balance","nonce"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"block"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","block_number_finalized","current_era","current_index","era_length","era_progress","session_length","session_progress","timestamp","is_election","is_epoch","new_accounts","num_transfers","session_per_era","spec_version","total_events","validator_count","block_author","block_author_name","block_hash","extrinsics_root","parent_hash","spec_name","state_root","total_issuance"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"collections"},"array_relationships":[{"name":"tokens","using":{"foreign_key_constraint_on":{"column":"collection_id","table":{"schema":"public","name":"tokens"}}}}],"select_permissions":[{"role":"anonymous","permission":{"columns":["collection_id","limits_accout_ownership","token_limit","owner_can_destroy","owner_can_trasfer","mode","schema_version","sponsorship_confirmed","token_prefix","limits_sponsore_data_rate","limits_sponsore_data_size","const_chain_schema","variable_on_chain_schema","description","name","offchain_schema","owner"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"event"}},{"table":{"schema":"public","name":"extrinsic"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","extrinsic_index","is_signed","signer","section","method","args","hash","doc","success","timestamp","amount","fee"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"system"}},{"table":{"schema":"public","name":"tokens"},"object_relationships":[{"name":"collection","using":{"foreign_key_constraint_on":"collection_id"}}],"select_permissions":[{"role":"anonymous","permission":{"columns":["id","token_id","owner","collection_id","data"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"total"}},{"table":{"schema":"public","name":"view_collections"},"select_permissions":[{"role":"anonymous","permission":{"columns":["collection_id","owner","name","description","offchain_schema","token_limit","token_prefix","collection_cover","type","mint_mode","limits_accout_ownership","limits_sponsore_data_size","limits_sponsore_data_rate","owner_can_trasfer","owner_can_destroy","schema_version","sponsorship_confirmed","const_chain_schema","tokens_count","holders_count","actions_count","date_of_creation"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_events"}},{"table":{"schema":"public","name":"view_extrinsic"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_index","block_number","from_owner","to_owner","hash","success","timestamp","method","section","amount","fee"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_holders"},"select_permissions":[{"role":"anonymous","permission":{"columns":["count","owner","collection_id"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_last_block"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","event_count","extrinsic_count","timestamp"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_tokens"},"select_permissions":[{"role":"anonymous","permission":{"columns":["token_id","collection_id","data","owner","image_path","token_prefix","collection_name","collection_description","collection_cover","date_of_creation"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_transfer"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_index","section","method","data"],"filter":{},"allow_aggregations":true}}]}],"configuration":{"connection_info":{"use_prepared_statements":true,"database_url":{"from_env":"HASURA_GRAPHQL_DATABASE_URL"},"isolation_level":"read-committed","pool_settings":{"connection_lifetime":600,"retries":1,"idle_timeout":180,"max_connections":2}}}}]}
1+
{"version":3,"sources":[{"name":"default","kind":"postgres","tables":[{"table":{"schema":"public","name":"SequelizeMeta"}},{"table":{"schema":"public","name":"account"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_height","timestamp","is_staking","account_id","available_balance","balances","free_balance","locked_balance","nonce"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"block"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","block_number_finalized","current_era","current_index","era_length","era_progress","session_length","session_progress","timestamp","is_election","is_epoch","new_accounts","num_transfers","session_per_era","spec_version","total_events","validator_count","block_author","block_author_name","block_hash","extrinsics_root","parent_hash","spec_name","state_root","total_issuance"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"collections"},"select_permissions":[{"role":"anonymous","permission":{"columns":["collection_id","owner","name","description","offchain_schema","token_limit","const_chain_schema","variable_on_chain_schema","limits_account_ownership","limits_sponsore_data_size","limits_sponsore_data_rate","owner_can_transfer","owner_can_destroy","sponsorship","schema_version","token_prefix","mode","mint_mode","date_of_creation"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"event"}},{"table":{"schema":"public","name":"extrinsic"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","extrinsic_index","is_signed","signer","section","method","args","hash","doc","success","timestamp","amount","fee"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"system"}},{"table":{"schema":"public","name":"tokens"},"select_permissions":[{"role":"anonymous","permission":{"columns":["id","token_id","owner","collection_id","data"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"total"}},{"table":{"schema":"public","name":"view_collections"},"select_permissions":[{"role":"anonymous","permission":{"columns":["actions_count","collection_id","date_of_creation","holders_count","limits_account_ownership","token_limit","tokens_count","mint_mode","owner_can_destroy","owner_can_transfer","schema_version","sponsorship","token_prefix","type","limits_sponsore_data_rate","limits_sponsore_data_size","const_chain_schema","collection_cover","description","name","offchain_schema","owner"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_events"}},{"table":{"schema":"public","name":"view_extrinsic"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_index","block_number","from_owner","to_owner","hash","success","timestamp","method","section","amount","fee"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_holders"},"select_permissions":[{"role":"anonymous","permission":{"columns":["count","owner","collection_id"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_last_block"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_number","event_count","extrinsic_count","timestamp"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_tokens"},"select_permissions":[{"role":"anonymous","permission":{"columns":["token_id","collection_id","data","owner","image_path","token_prefix","collection_name","collection_description","collection_cover","date_of_creation"],"filter":{},"allow_aggregations":true}}]},{"table":{"schema":"public","name":"view_transfer"},"select_permissions":[{"role":"anonymous","permission":{"columns":["block_index","section","method","data"],"filter":{},"allow_aggregations":true}}]}],"configuration":{"connection_info":{"use_prepared_statements":true,"database_url":{"from_env":"HASURA_GRAPHQL_DATABASE_URL"},"isolation_level":"read-committed","pool_settings":{"connection_lifetime":600,"retries":1,"idle_timeout":180,"max_connections":2}}}}]}

lib/collectionDB.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ async function get({
1717
'token_limit, owner',
1818
'const_chain_schema',
1919
'variable_on_chain_schema',
20-
'limits_accout_ownership',
20+
'limits_account_ownership',
2121
'limits_sponsore_data_size',
2222
'limits_sponsore_data_rate',
23-
'owner_can_trasfer',
23+
'owner_can_transfer',
2424
'owner_can_destroy',
25-
'sponsorship_confirmed',
25+
'sponsorship',
2626
'schema_version',
2727
'token_prefix',
2828
'mode',
@@ -67,7 +67,7 @@ function parseData (collection) {
6767
result.owner = collection.owner;
6868
result.name = collection.name;
6969
result.description = collection.description;
70-
result.sponsorship_confirmed = collection.sponsorshipConfirmed;
70+
result.sponsorship = collection.sponsorship;
7171
result.token_prefix = collection.tokenPrefix;
7272
result.mode = collection.mode;
7373
result.mint_mode = collection.mint_mode;
@@ -81,10 +81,10 @@ function parseData (collection) {
8181
function getLimits(collection) {
8282
const result = {};
8383
result.token_limit = collection.tokenLimit;
84-
result.limits_accout_ownership = collection.limitsAccoutOwnership;
84+
result.limits_account_ownership = collection.limitsAccountOwnership;
8585
result.limits_sponsore_data_size = collection.limitsSponsoreDataSize;
8686
result.limits_sponsore_data_rate = collection.limitsSponsoreDataRate;
87-
result.owner_can_trasfer = collection.ownerCanTrasfer;
87+
result.owner_can_transfer = collection.ownerCanTransfer;
8888
result.owner_can_destroy = collection.ownerCanDestroy;
8989
return result;
9090
}
@@ -122,12 +122,12 @@ async function add({
122122
'token_limit',
123123
'const_chain_schema',
124124
'variable_on_chain_schema',
125-
'limits_accout_ownership',
125+
'limits_account_ownership',
126126
'limits_sponsore_data_size',
127127
'limits_sponsore_data_rate',
128-
'owner_can_trasfer',
128+
'owner_can_transfer',
129129
'owner_can_destroy',
130-
'sponsorship_confirmed',
130+
'sponsorship',
131131
'schema_version',
132132
'token_prefix',
133133
'mode',
@@ -179,12 +179,12 @@ async function modify({
179179
'offchain_schema',
180180
'const_chain_schema',
181181
'variable_on_chain_schema',
182-
'limits_accout_ownership',
182+
'limits_account_ownership',
183183
'limits_sponsore_data_size',
184184
'limits_sponsore_data_rate',
185-
'owner_can_trasfer',
185+
'owner_can_transfer',
186186
'owner_can_destroy',
187-
'sponsorship_confirmed',
187+
'sponsorship',
188188
'schema_version',
189189
'token_prefix',
190190
'mode',

lib/collectionData.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function toObject (collection) {
2626

2727
function getSponsorship (collection) {
2828
const result = {};
29-
result.sponsorshipConfirmed = ('disabled' in collection.Sponsorship) ? null : JSON.stringify(collection.Sponsorship);
29+
result.sponsorship = ('disabled' in collection.Sponsorship) ? null : JSON.stringify(collection.Sponsorship);
3030
return result;
3131
}
3232

@@ -46,10 +46,10 @@ function getLimits (collection) {
4646
const limits = collection.Limits;
4747
const result = {};
4848
result.tokenLimit = limits.TokenLimit || 0;
49-
result.limitsAccoutOwnership = limits.AccountTokenOwnershipLimit || 0;
49+
result.limitsAccountOwnership = limits.AccountTokenOwnershipLimit || 0;
5050
result.limitsSponsoreDataSize = limits.SponsoredDataSize;
5151
result.limitsSponsoreDataRate = getSponsoredRateLimit(limits.SponsoredDataRateLimit);
52-
result.ownerCanTrasfer = limits.OwnerCanTransfer;
52+
result.ownerCanTransfer = limits.OwnerCanTransfer;
5353
result.ownerCanDestroy = limits.OwnerCanDestroy;
5454
return result;
5555
}

sequelize/migrations/20211025083527-hasura_schema.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

sequelize/migrations/20211025084727-hasura_tables.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

sequelize/migrations/20211025104414-hasura_metadata.js

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)