├── .dockerignore ├── .editorconfig ├── .env.sample ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yaml │ └── feature-request.yaml ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── PR-CI.yaml.disabled │ ├── gcp-deploy-frontend.yaml │ ├── gcp-deploy-pr.yaml │ └── gcp-undeploy.yaml ├── .gitignore ├── .graphqlconfig ├── .husky ├── .gitignore └── pre-commit ├── .lintstagedrc.json ├── .node-version ├── .nvmrc ├── .prettierignore ├── .prettierrc.cjs ├── .vscode └── settings.json ├── .yarnrc.yml ├── LICENSE ├── README.md ├── docker-compose.yml ├── docker ├── backend │ └── Dockerfile ├── discord-bot │ └── Dockerfile └── frontend │ └── Dockerfile ├── eslint.config.js ├── guides ├── BACKEND.md ├── C4.md ├── CONTRIBUTING.md ├── CUSTOM_BLOCK.md ├── DESCRIPTIVE_C4.MD ├── FRONTEND.md ├── README.md └── architecture.svg ├── hasura ├── Dockerfile ├── clear-xp.mjs ├── config.yaml ├── metadata │ ├── actions.graphql │ ├── actions.yaml │ ├── allow_list.yaml │ ├── cron_triggers.yaml │ ├── functions.yaml │ ├── network.yaml │ ├── query_collections.yaml │ ├── remote_schemas.yaml │ ├── tables.yaml │ └── version.yaml ├── migrations │ ├── 1575910000000_init │ │ └── up.sql │ ├── 1595681063913_insert_seed_data │ │ └── up.sql │ ├── 1597557008749_sourcecred-migration │ │ ├── down.sql │ │ └── up.sql │ ├── 1597563241280_player-ranks │ │ ├── down.sql │ │ └── up.sql │ ├── 1597818654956_alter_table_public_Account_drop_constraint_Account_identifier_type_player_key │ │ ├── down.sql │ │ └── up.sql │ ├── 1597822038999_alter_table_public_Player_add_column_created_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1597822046056_alter_table_public_Player_add_column_updated_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1598418750227_add_skill_categories │ │ ├── down.sql │ │ └── up.sql │ ├── 1598420094363_add_skills │ │ └── up.sql │ ├── 1602297882653_account-type-table │ │ ├── down.sql │ │ └── up.sql │ ├── 1602298657385_enneagram-type-table │ │ ├── down.sql │ │ └── up.sql │ ├── 1602389597441_update-skills │ │ └── up.sql │ ├── 1602392593424_create-me-view │ │ ├── down.sql │ │ └── up.sql │ ├── 1602808981811_add_player_type │ │ ├── down.sql │ │ └── up.sql │ ├── 1602811082541_alter_table_public_Player_add_column_availability_hours │ │ ├── down.sql │ │ └── up.sql │ ├── 1605730139833_create_table_public_guild_player │ │ ├── down.sql │ │ └── up.sql │ ├── 1605829703638_alter_table_public_Player_add_column_tz │ │ ├── down.sql │ │ └── up.sql │ ├── 1607539990954_alter_table_public_Guild_add_column_description │ │ ├── down.sql │ │ └── up.sql │ ├── 1607540645353_update_guild_tyles │ │ └── up.sql │ ├── 1607541858765_create_table_public_guild_account │ │ ├── down.sql │ │ └── up.sql │ ├── 1608424869168_update_guild_table │ │ ├── down.sql │ │ └── up.sql │ ├── 1608450255714_add_guildname_column │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366056194_rename_table_public_Player │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366115237_rename_table_public_Skill │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366185785_rename_table_public_Player_Skill │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366236771_rename_table_public_PlayerType │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366692966_rename_table_public_Guild │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366718077_rename_table_public_Account │ │ ├── down.sql │ │ └── up.sql │ ├── 1609366750413_rename_table_public_Player_Rank │ │ ├── down.sql │ │ └── up.sql │ ├── 1609960864949_alter_table_public_player_drop_column_timezone │ │ ├── down.sql │ │ └── up.sql │ ├── 1609965105543_player_table_consistent_column_names │ │ ├── down.sql │ │ └── up.sql │ ├── 1612970700332_quests │ │ ├── down.sql │ │ └── up.sql │ ├── 1613085907468_add_metafam_discord │ │ ├── down.sql │ │ └── up.sql │ ├── 1614278149225_lowercase_player_username │ │ └── up.sql │ ├── 1614710766234_alter_table_public_player_add_check_constraint_username_is_valid │ │ ├── down.sql │ │ └── up.sql │ ├── 1615312118803_move_discord_ids │ │ ├── down.sql │ │ └── up.sql │ ├── 1615328641179_add_guild_status │ │ ├── down.sql │ │ └── up.sql │ ├── 1615534737144_lowercase_player_ethereum_address │ │ └── up.sql │ ├── 1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid │ │ ├── down.sql │ │ └── up.sql │ ├── 1615594547538_guild_add_discord_metadata_jsonb │ │ ├── down.sql │ │ └── up.sql │ ├── 1615614610171_add_metafam_rank_role_ids │ │ ├── down.sql │ │ └── up.sql │ ├── 1616096764854_move_metafam_discord_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1616101057636_create-mtg-color-table │ │ ├── down.sql │ │ └── up.sql │ ├── 1616124361730_drop-enneagram-table │ │ ├── down.sql │ │ └── up.sql │ ├── 1617071740377_guild_separate_discord_invite_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1617733060076_add_guild_discord_ids │ │ └── up.sql │ ├── 1619844206488_guilds_add_twitter_and_github_urls │ │ ├── down.sql │ │ └── up.sql │ ├── 1622090276691_require_player_ethaddress │ │ ├── down.sql │ │ └── up.sql │ ├── 1623037326884_create_guild_metadata_table │ │ ├── down.sql │ │ └── up.sql │ ├── 1623259967735_alter_table_public_player_drop_column_sc_identity_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1624277873142_insert_metacartel_ventures_data │ │ └── up.sql │ ├── 1624445797214_create_table_public_GuildPosition │ │ ├── down.sql │ │ └── up.sql │ ├── 1624445996962_alter_table_public_guild_add_column_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1624446029497_set_fk_public_guild_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1624473635605_seed_GuildPosition_and_set_guild_positions │ │ └── up.sql │ ├── 1625633004312_create_table_public_profile_cache │ │ ├── down.sql │ │ └── up.sql │ ├── 1625902075375_alter_table_public_profile_cache_add_column_last_checked_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1626447130608_alter_table_public_player_add_column_season_xp │ │ ├── down.sql │ │ └── up.sql │ ├── 1626453884524_alter_table_public_player_add_column_pronouns │ │ ├── down.sql │ │ └── up.sql │ ├── 1626583570730_populate_profile_cache │ │ ├── down.sql │ │ └── up.sql │ ├── 1626994599013_add_rank_to_skill_table │ │ └── up.sql │ ├── 1626996347721_modify_primarykey_public_player_skill │ │ ├── down.sql │ │ └── up.sql │ ├── 1626996361256_modify_primarykey_public_player_skill │ │ ├── down.sql │ │ └── up.sql │ ├── 1629170747964_alter_table_public_guild_add_column_membership_through_discord │ │ ├── down.sql │ │ └── up.sql │ ├── 1630635244186_create_table_public_PlayerRole │ │ ├── down.sql │ │ └── up.sql │ ├── 1630635736784_add_player_discord_roles │ │ └── up.sql │ ├── 1630636031527_create_table_public_player_role │ │ ├── down.sql │ │ └── up.sql │ ├── 1630636068495_drop_table_public_guild_account │ │ └── up.sql │ ├── 1631675618782_add_details_to_PlayerRole │ │ ├── down.sql │ │ └── up.sql │ ├── 1638233855361_set_fk_public_player_account_player_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1638256399268_alter_table_public_player_alter_column_availability_hours │ │ ├── down.sql │ │ └── up.sql │ ├── 1638333712988_alter_table_public_profile_cache_alter_column_country │ │ ├── down.sql │ │ └── up.sql │ ├── 1639455871385_rename_table_public_profile_cache │ │ ├── down.sql │ │ └── up.sql │ ├── 1639455903307_alter_table_public_profile_alter_column_background_image_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1639457137925_alter_table_public_profile_add_column_pronouns │ │ ├── down.sql │ │ └── up.sql │ ├── 1639457861149_alter_table_public_profile_add_column_background_image_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1639458378073_set_fk_public_profile_player_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1639458403546_alter_table_public_profile_add_unique_player_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1639458853392_alter_table_public_profile_add_column_username │ │ ├── down.sql │ │ └── up.sql │ ├── 1639476052965_alter_table_public_player_drop_column_pronouns │ │ ├── down.sql │ │ └── up.sql │ ├── 1639476452544_move_view_username_to_profile │ │ └── up.sql │ ├── 1639476534860_alter_table_public_player_drop_column_username │ │ ├── down.sql │ │ └── up.sql │ ├── 1640057892300_alter_table_public_profile_alter_column_image_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1640078300535_move_avaialable_hours_column_to_profile │ │ ├── down.sql │ │ └── up.sql │ ├── 1640183267176_move_time_zone_to_profile_table │ │ ├── down.sql │ │ └── up.sql │ ├── 1640506201289_move_color_mask_to_profile │ │ ├── down.sql │ │ └── up.sql │ ├── 1640517316534_case_insensitive_username_uniqueness │ │ ├── down.sql │ │ └── up.sql │ ├── 1640532625675_rename_table_public_player_type │ │ ├── down.sql │ │ └── up.sql │ ├── 1640532635456_alter_table_public_ExplorerType_alter_column_imageUrl │ │ ├── down.sql │ │ └── up.sql │ ├── 1640532806659_alter_table_public_profile_add_column_explorer_type_title │ │ ├── down.sql │ │ └── up.sql │ ├── 1640532883795_set_fk_public_profile_explorer_type_title │ │ ├── down.sql │ │ └── up.sql │ ├── 1640533703696_alter_table_public_profile_add_unique_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1641576381077_alter_table_public_player_add_column_profile_layout │ │ ├── down.sql │ │ └── up.sql │ ├── 1641640073308_create_table_public_quest_role │ │ └── up.sql │ ├── 1641944106670_alter_table_public_player_drop_column_player_type_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1642342313101_alter_table_public_quest_role_drop_constraint_quest_role_quest_id_key │ │ └── up.sql │ ├── 1642440758431_remove_eth_address_usernames │ │ └── up.sql │ ├── 1642635473840_alter_table_public_PlayerRole_add_column_basic │ │ └── up.sql │ ├── 1642777028373_add_player_roles │ │ └── up.sql │ ├── 1643682237699_alter_table_public_player_skill_add_unique_player_id_skill_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1644880076911_clear_profile_layouts │ │ └── up.sql │ ├── 1645298472918_create_table_public_dao │ │ ├── down.sql │ │ └── up.sql │ ├── 1645298885991_create_table_public_dao_player │ │ ├── down.sql │ │ └── up.sql │ ├── 1645304381138_move_guild_dao_addresses │ │ ├── down.sql │ │ └── up.sql │ ├── 1645305421648_alter_table_public_guild_drop_column_moloch_address │ │ ├── down.sql │ │ └── up.sql │ ├── 1645463938163_guarantee_players_exist_in_the_profile_table │ │ └── up.sql │ ├── 1645725664368_alter_table_public_dao_add_check_constraint_contract_address_is_valid │ │ ├── down.sql │ │ └── up.sql │ ├── 1647440669863_update_PlayerRole │ │ └── up.sql │ ├── 1650213538515_adds_mww_account_type │ │ ├── down.sql │ │ └── up.sql │ ├── 1654912862034_alter_table_public_guild_add_column_show_discord_announcements │ │ ├── down.sql │ │ └── up.sql │ ├── 1658632037425_alter_table_public_dao_add_unique_contract_address_network │ │ ├── down.sql │ │ └── up.sql │ ├── 1664444070962_alter_table_public_player_add_column_dashboard_layout │ │ ├── down.sql │ │ └── up.sql │ ├── 1665058675979_alter_table_public_guild_add_column_profile_layout │ │ ├── down.sql │ │ └── up.sql │ ├── 1666752566691_alter_table_public_guild_drop_column_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1666753166581_alter_table_public_guild_add_column_sort_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1668735029980_alter_table_public_quest_add_column_image │ │ ├── down.sql │ │ └── up.sql │ ├── 1676052460627_alter_table_public_player_add_column_ceramic_profile_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1677180693792_alter_table_public_profile_add_check_constraint_no_periods_in_username │ │ └── up.sql │ ├── 1691747987091_add_dework_to_account_type │ │ ├── down.sql │ │ └── up.sql │ ├── 1691995935355_modify_primarykey_public_player_account │ │ ├── down.sql │ │ └── up.sql │ ├── 1692017802834_alter_table_public_player_account_add_unique_type_player_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1694533856915_create_table_public_xp │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534028362_create_table_public_token │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534075417_alter_table_public_token_add_unique_address │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534090526_alter_table_public_token_alter_column_last_offset │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534103986_alter_table_public_token_alter_column_guild_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534276866_set_fk_public_xp_token_address │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534521995_create_table_public_balance │ │ ├── down.sql │ │ └── up.sql │ ├── 1694534639232_insert_seed_for_metafam │ │ ├── down.sql │ │ └── up.sql │ ├── 1694790224031_create_table_public_link │ │ ├── down.sql │ │ └── up.sql │ ├── 1694790348403_create_table_public_LinkType │ │ ├── down.sql │ │ └── up.sql │ ├── 1694790493159_insert_first_linktype │ │ ├── down.sql │ │ └── up.sql │ ├── 1694790536010_set_fk_public_link_type │ │ ├── down.sql │ │ └── up.sql │ ├── 1695821615820_copy_guild_urls_into_link_table │ │ ├── down.sql │ │ └── up.sql │ ├── 1695821815342_alter_table_public_guild_drop_column_discord_invite_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1695821839485_alter_table_public_guild_drop_column_github_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1695821850665_alter_table_public_guild_drop_column_twitter_url │ │ ├── down.sql │ │ └── up.sql │ ├── 1695829101657_alter_table_public_guild_metadata_alter_column_discord_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1696771380738_alter_table_public_guild_add_column_updated_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1697476299259_alter_table_public_token_add_column_multiplier │ │ ├── down.sql │ │ └── up.sql │ ├── 1697476304617_alter_table_public_token_add_column_created_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1697476310113_alter_table_public_token_add_column_updated_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1697478812713_alter_table_public_xp_add_column_created_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1697478824592_alter_table_public_xp_add_column_updated_at │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059045592_add_legitimacy_to_guild │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059090172_create_guild_legitimacy_table │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059148229_insert_into_guild_legitimacy_values │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059181446_set_up_fk_on_guild_legitimacy │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059226912_insert_into_player_column_membership_metadata │ │ ├── down.sql │ │ └── up.sql │ ├── 1698059323860_alter_table_public_guild_player_add_column_visible │ │ ├── down.sql │ │ └── up.sql │ ├── 1698081953289_alter_table_public_token_alter_column_last_offset │ │ ├── down.sql │ │ └── up.sql │ ├── 1698237245255_insert_into_public_QuestStatus │ │ ├── down.sql │ │ └── up.sql │ ├── 1699627208220_alter_table_public_guild_player_add_unique_guild_id_player_id │ │ ├── down.sql │ │ └── up.sql │ ├── 1700812865781_alter_table_public_guild_player_add_column_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1700986294802_alter_table_public_dao_player_add_column_position │ │ ├── down.sql │ │ └── up.sql │ ├── 1702557346495_create_table_public_pinned_questchains │ │ ├── down.sql │ │ └── up.sql │ ├── 1702557439510_alter_table_public_pinned_questchains_alter_column_id │ │ ├── down.sql │ │ └── up.sql │ └── 1706189348084_alter_table_public_quest_add_column_reward │ │ ├── down.sql │ │ └── up.sql └── seed-db.mjs ├── lerna.json ├── package.json ├── packages ├── @types │ ├── @orbisclub__orbis-sdk │ │ └── index.d.ts │ ├── @walletconnect__web3-provider │ │ └── index.d.ts │ ├── js-base64 │ │ └── index.d.ts │ ├── sourcecred │ │ └── index.d.ts │ └── spacetime-informal │ │ └── index.d.ts ├── backend │ ├── README.md │ ├── codegen.ts │ ├── eslint.config.js │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── config.ts │ │ ├── handlers │ │ │ ├── actions │ │ │ │ ├── composeDB │ │ │ │ │ ├── cacheHelper.ts │ │ │ │ │ ├── linkProfileNode │ │ │ │ │ │ └── handler.ts │ │ │ │ │ ├── routes.ts │ │ │ │ │ ├── updatePlayerFromComposeDB.ts │ │ │ │ │ └── updateSingleProfile │ │ │ │ │ │ └── handler.ts │ │ │ │ ├── guild │ │ │ │ │ ├── discord │ │ │ │ │ │ └── oauthHandler.ts │ │ │ │ │ ├── routes.ts │ │ │ │ │ ├── saveGuildHandler.ts │ │ │ │ │ ├── saveGuildLayoutHandler.ts │ │ │ │ │ └── sync.ts │ │ │ │ ├── player │ │ │ │ │ └── syncBalances.ts │ │ │ │ ├── quests │ │ │ │ │ ├── createCompletion │ │ │ │ │ │ ├── createCompletion.ts │ │ │ │ │ │ └── handler.ts │ │ │ │ │ ├── createQuest │ │ │ │ │ │ ├── createQuest.ts │ │ │ │ │ │ ├── handler.ts │ │ │ │ │ │ └── permissions.ts │ │ │ │ │ ├── routes.ts │ │ │ │ │ └── updateCompletion │ │ │ │ │ │ ├── handler.ts │ │ │ │ │ │ └── updateCompletion.ts │ │ │ │ └── routes.ts │ │ │ ├── auth-webhook │ │ │ │ ├── handler.ts │ │ │ │ └── users.ts │ │ │ ├── graphql │ │ │ │ ├── mutations │ │ │ │ │ ├── dao.ts │ │ │ │ │ ├── guild.ts │ │ │ │ │ ├── player.ts │ │ │ │ │ ├── quest.ts │ │ │ │ │ └── token.ts │ │ │ │ └── queries │ │ │ │ │ ├── dao.ts │ │ │ │ │ ├── guild.ts │ │ │ │ │ ├── player.ts │ │ │ │ │ ├── quest.ts │ │ │ │ │ └── token.ts │ │ │ ├── remote-schemas │ │ │ │ ├── resolvers │ │ │ │ │ ├── balancerPolygon │ │ │ │ │ │ ├── queries.ts │ │ │ │ │ │ └── resolver.ts │ │ │ │ │ ├── brightId │ │ │ │ │ │ └── resolver.ts │ │ │ │ │ ├── daohaus │ │ │ │ │ │ ├── queries.ts │ │ │ │ │ │ └── resolver.ts │ │ │ │ │ ├── discord │ │ │ │ │ │ └── resolver.ts │ │ │ │ │ └── seedGraph │ │ │ │ │ │ ├── queries.ts │ │ │ │ │ │ └── resolver.ts │ │ │ │ ├── routes.ts │ │ │ │ ├── schema.ts │ │ │ │ ├── typeDefs.ts │ │ │ │ └── types │ │ │ │ │ └── uuid.ts │ │ │ ├── routes.ts │ │ │ └── triggers │ │ │ │ ├── cacheComposeDBProfile.ts │ │ │ │ ├── handler.ts │ │ │ │ ├── playerRankUpdated.ts │ │ │ │ ├── playerRoleChanged.ts │ │ │ │ └── types.ts │ │ ├── index.ts │ │ ├── lib │ │ │ ├── abis │ │ │ │ └── ERC20.json │ │ │ ├── apiHelpers.ts │ │ │ ├── balancerPolygonClient.ts │ │ │ ├── daoHausClient.ts │ │ │ ├── ethereum.ts │ │ │ ├── hasuraClient.ts │ │ │ ├── rankHelpers.ts │ │ │ └── seedGraphClient.ts │ │ └── types.ts │ ├── tests │ │ ├── handlers │ │ │ └── remote-schemas │ │ │ │ └── resolvers │ │ │ │ └── daohaus │ │ │ │ └── resolver.test.ts │ │ └── lib │ │ │ ├── daoHausClient.test.ts │ │ │ └── rankHelpers.test.ts │ ├── tsconfig-paths-resolver.mjs │ └── tsconfig.json ├── design-system │ ├── README.md │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── BoxedNextImage.tsx │ │ ├── ConfirmModal.tsx │ │ ├── Field.tsx │ │ ├── LoadingState.tsx │ │ ├── MarkdownEditor │ │ │ ├── MarkdownEditor.tsx │ │ │ └── index.tsx │ │ ├── MarkdownViewer │ │ │ ├── MarkdownViewer.tsx │ │ │ └── index.tsx │ │ ├── MetaBox.tsx │ │ ├── MetaButton.tsx │ │ ├── MetaFilterSelect.tsx │ │ ├── MetaHeading.tsx │ │ ├── MetaSecondaryButton.tsx │ │ ├── MetaTag.tsx │ │ ├── MetaTile.tsx │ │ ├── MultiSelect.tsx │ │ ├── ResponsiveText.tsx │ │ ├── SVG.tsx │ │ ├── SelectSearch.tsx │ │ ├── SelectTimeZone.tsx │ │ ├── StatusedSubmitButton.tsx │ │ ├── ViewAllButton.tsx │ │ ├── compatibilityHelpers.ts │ │ ├── icons │ │ │ ├── BrightIdIcon.tsx │ │ │ ├── CalendarAddIcon.tsx │ │ │ ├── ChainIcon.tsx │ │ │ ├── ChevronRight.tsx │ │ │ ├── Dashboard.tsx │ │ │ ├── DropDownIcon.tsx │ │ │ ├── EthereumIcon.tsx │ │ │ ├── FiltersIcon.tsx │ │ │ ├── GnosisIcon.tsx │ │ │ ├── Icon3box.tsx │ │ │ ├── LogOut.tsx │ │ │ ├── MeetWithWalletIcon.tsx │ │ │ ├── MenuArrow.tsx │ │ │ ├── MetaMaskIcon.tsx │ │ │ ├── PolygonIcon.tsx │ │ │ ├── Profile.tsx │ │ │ ├── XDaiIcon.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── theme │ │ │ ├── colors.ts │ │ │ ├── index.ts │ │ │ ├── menu.ts │ │ │ └── texts.ts │ │ └── typography.tsx │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── discord-bot │ ├── .env.sample │ ├── README.md │ ├── codegen.yml │ ├── eslint.config.js │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── auth.ts │ │ ├── bot.ts │ │ ├── config.ts │ │ ├── discord │ │ │ └── commands │ │ │ │ └── help.ts │ │ ├── graphql │ │ │ ├── client.ts │ │ │ └── queries.ts │ │ ├── index.ts │ │ ├── start.ts │ │ ├── types.ts │ │ └── utils.ts │ └── tsconfig.json ├── utils │ ├── .gitignore │ ├── bin │ │ ├── balances-to-csv.mjs │ │ ├── clear-gcloud-artifact-registry.sh │ │ ├── create-model.mjs │ │ ├── divide-assets.google-app-script.js │ │ ├── safe-balances.mjs │ │ └── test-retrieval.mjs │ ├── eslint.config.js │ ├── jest.config.js │ ├── package.json │ ├── schema │ │ ├── README.md │ │ ├── extended-profile.json5 │ │ ├── separate-models │ │ │ ├── user-profile-1.graphql │ │ │ ├── user-profile-2.graphql │ │ │ ├── user-profile-composite-1.json │ │ │ ├── user-profile-composite-2.json │ │ │ ├── user-profile-composite.json │ │ │ ├── user-profile-definition-1.json │ │ │ ├── user-profile-definition-2.json │ │ │ └── user-profile-definition.json │ │ ├── user-profile-composite.json │ │ ├── user-profile-definition.json │ │ └── user-profile.graphql │ ├── src │ │ ├── ExtendedProfileModel.json │ │ ├── arrayHelpers.ts │ │ ├── colorHelpers.ts │ │ ├── composeDB │ │ │ ├── fields.ts │ │ │ └── utils.ts │ │ ├── constants.ts │ │ ├── did │ │ │ └── index.ts │ │ ├── discordHelpers.ts │ │ ├── ethereumHelper.ts │ │ ├── extendedProfileTypes.ts │ │ ├── graphql │ │ │ └── composeDBDefinition.ts │ │ ├── imageHelpers.ts │ │ ├── index.ts │ │ ├── linkHelpers.ts │ │ ├── numbers.ts │ │ ├── promiseHelpers.ts │ │ ├── rankHelpers.ts │ │ └── xpHelpers.ts │ ├── tests │ │ └── lib │ │ │ └── xpHelpers.test.ts │ └── tsconfig.json └── web │ ├── README.md │ ├── assets │ ├── 404-bg.svg │ ├── Back.svg │ ├── Loader.svg │ ├── Skip.svg │ ├── academy │ │ ├── Building-on-optimism.png │ │ ├── best-dao-contributor.png │ │ ├── best-dao-contributor.webp │ │ ├── biases.png │ │ ├── biases.webp │ │ ├── bridgebuilder.png │ │ ├── bridgebuilder.webp │ │ ├── builder.png │ │ ├── builder.webp │ │ ├── buildingonop.webp │ │ ├── coordinape.png │ │ ├── coordinape.webp │ │ ├── creatorgame.png │ │ ├── creatorgame.webp │ │ ├── daos.png │ │ ├── daos.webp │ │ ├── daosummoner.png │ │ ├── daosummoner.webp │ │ ├── daowriter.png │ │ ├── daowriter.webp │ │ ├── dapps.png │ │ ├── dapps.webp │ │ ├── defi.png │ │ ├── defi.webp │ │ ├── designer.png │ │ ├── designer.webp │ │ ├── effective-meeting-runner.png │ │ ├── effective-meeting-runner.webp │ │ ├── ethereum.png │ │ ├── ethereum.webp │ │ ├── gameb.png │ │ ├── gameb.webp │ │ ├── goodquests.png │ │ ├── goodquests.webp │ │ ├── guilder.png │ │ ├── guilder.webp │ │ ├── impact-networks.png │ │ ├── impact-networks.webp │ │ ├── imposter.png │ │ ├── imposter.webp │ │ ├── journaling.png │ │ ├── journaling.webp │ │ ├── master-tabs.png │ │ ├── master-tabs.webp │ │ ├── memedriven.png │ │ ├── memedriven.webp │ │ ├── metacrisis.png │ │ ├── metacrisis.webp │ │ ├── metamodernist.png │ │ ├── metamodernist.webp │ │ ├── moloch.png │ │ ├── moloch.webp │ │ ├── nfts.png │ │ ├── nfts.webp │ │ ├── patron.png │ │ ├── patron.webp │ │ ├── play-twitter.png │ │ ├── play-twitter.webp │ │ ├── playbook-writer.png │ │ ├── playbook-writer.webp │ │ ├── player.png │ │ ├── player.webp │ │ ├── riteofpassage.png │ │ ├── riteofpassage.webp │ │ ├── team.png │ │ ├── team.webp │ │ ├── time.png │ │ ├── time.webp │ │ ├── web3builder.png │ │ └── web3builder.webp │ ├── animocto.svg │ ├── attribution │ │ ├── coingecko-logo-text.png │ │ └── coingecko-logo-text.webp │ ├── avatar-placeholder.svg │ ├── avatar.png │ ├── baby_octo.png │ ├── baby_octo.webp │ ├── colors │ │ ├── Ambition.svg │ │ ├── Balance.svg │ │ ├── Chaos.svg │ │ ├── Justice.svg │ │ └── Wisdom.svg │ ├── custom-markdown-editor.scss │ ├── decentralized-factory_1100x1079.webp │ ├── discord.svg │ ├── file-open-icon.svg │ ├── generic-user-icon.svg │ ├── graphics │ │ └── octo-avatar.svg │ ├── guild-background-full.jpeg │ ├── guild-background-small.jpeg │ ├── guilds-sun_800x800.png │ ├── guilds-sun_800x800.webp │ ├── guilds-sunless_384x449.webp │ ├── integrationLogos │ │ └── deworkLogo.png │ ├── landing │ │ ├── build-background.png │ │ ├── build-background.webp │ │ ├── card-background.png │ │ ├── card-background.webp │ │ ├── external-link-icon.png │ │ ├── external-link-icon.webp │ │ ├── guilds.png │ │ ├── guilds.webp │ │ ├── patrons.png │ │ ├── patrons.webp │ │ ├── players.png │ │ ├── players.webp │ │ ├── pretty │ │ │ ├── bubble-large.svg │ │ │ └── bubble-small.svg │ │ ├── revolution-background.webp │ │ ├── sections │ │ │ ├── section-1-2xl.jpg │ │ │ ├── section-1-4xl.jpg │ │ │ ├── section-1-lg.jpg │ │ │ ├── section-1.jpg │ │ │ ├── section-1.png │ │ │ ├── section-1.sm.jpg │ │ │ ├── section-1.sm.png │ │ │ ├── section-1.sm.webp │ │ │ ├── section-1.webp │ │ │ ├── section-2-2xl.jpg │ │ │ ├── section-2-4xl.jpg │ │ │ ├── section-2-lg.jpg │ │ │ ├── section-2.jpg │ │ │ ├── section-2.sm.jpg │ │ │ ├── section-3-2xl.jpg │ │ │ ├── section-3-3xl.jpg │ │ │ ├── section-3-lg.jpg │ │ │ ├── section-3.jpg │ │ │ ├── section-3.sm.jpg │ │ │ ├── section-4-2xl.jpg │ │ │ ├── section-4-3xl.jpg │ │ │ ├── section-4-lg.jpg │ │ │ ├── section-4.jpg │ │ │ ├── section-4.sm.jpg │ │ │ ├── section-5.png │ │ │ ├── section-5.sm.jpg │ │ │ ├── section-5.sm.png │ │ │ ├── section-5.sm.webp │ │ │ ├── section-5.webp │ │ │ ├── section-6-rerender-001-1600.png │ │ │ ├── section-6-rerender-001-1600.webp │ │ │ ├── section-6-rerender-001.jpg │ │ │ ├── section-6-rerender-001.png │ │ │ ├── section-6-rerender-001.webp │ │ │ ├── section-6.png │ │ │ ├── section-6.webp │ │ │ ├── section-7.png │ │ │ └── section-7.webp │ │ └── together-background.webp │ ├── login-background.jpg │ ├── logo-small.png │ ├── logo-tiny.gif │ ├── logo.png │ ├── logo.webp │ ├── main-background.jpg │ ├── manifesto.jpg │ ├── menu.svg │ ├── menuIcon │ │ ├── alliances.svg │ │ ├── asketh.svg │ │ ├── discord.svg │ │ ├── events.svg │ │ ├── forum.svg │ │ ├── guilds.svg │ │ ├── invest.svg │ │ ├── learn.svg │ │ ├── metagamewiki.svg │ │ ├── metaradio.svg │ │ ├── patrons.svg │ │ ├── playbooks.svg │ │ ├── players.svg │ │ ├── quests.svg │ │ ├── raids.svg │ │ ├── roles.svg │ │ ├── seedearned.svg │ │ ├── seeds.svg │ │ ├── thegreathouses.svg │ │ ├── welcometometagame.svg │ │ ├── xpearned.svg │ │ └── youtube.svg │ ├── metagame.png │ ├── metagame.webp │ ├── modal-bg.png │ ├── modal-bg.webp │ ├── new_logo_svg.svg │ ├── nft-common-tier_600x600.jpg │ ├── nft-epic-tier_600x600.jpg │ ├── nft-rare-tier_600x600.jpg │ ├── no-players-found.svg │ ├── octopus.png │ ├── octopus.webp │ ├── patron │ │ ├── checkmark.png │ │ ├── checkmark.webp │ │ ├── patron-circle.png │ │ ├── patron-circle.webp │ │ ├── patron-mage.png │ │ ├── patron-mage.webp │ │ ├── seed-diagram.png │ │ ├── seed-diagram.webp │ │ ├── seed.png │ │ └── seed.webp │ ├── patrons-sun_800x820.png │ ├── patrons-sun_800x820.webp │ ├── pin.svg │ ├── playbooks │ │ ├── P1.png │ │ ├── P10.png │ │ ├── P11.png │ │ ├── P12.png │ │ ├── P13.png │ │ ├── P14.png │ │ ├── P15.png │ │ ├── P16.png │ │ ├── P2.png │ │ ├── P3.png │ │ ├── P4.png │ │ ├── P5.png │ │ ├── P6.png │ │ ├── P7.png │ │ ├── P8.png │ │ └── P9.png │ ├── player-background-full.jpg │ ├── player-background-small.jpg │ ├── player-profile-icon.svg │ ├── players-sun_800x822.png │ ├── players-sun_800x822.webp │ ├── players.png │ ├── players.webp │ ├── quests │ │ ├── baby_octo.png │ │ ├── baby_octo.webp │ │ ├── bridge.png │ │ ├── bridge.webp │ │ ├── builders.png │ │ ├── builders.webp │ │ ├── design.png │ │ ├── design.webp │ │ ├── octopus.png │ │ ├── octopus.webp │ │ ├── patron.png │ │ ├── patron.webp │ │ ├── quest.png │ │ ├── quest.webp │ │ ├── rogue.png │ │ ├── rogue.webp │ │ ├── space_octo.png │ │ └── space_octo.webp │ ├── raids │ │ ├── Inkeeping.png │ │ ├── Inkeeping.webp │ │ ├── MetaMedia.png │ │ ├── MetaMedia.webp │ │ ├── MetaOS.png │ │ └── MetaOS.webp │ ├── search-icon.svg │ ├── seed-icon.svg │ ├── seed.svg │ ├── seeds-flowchart.png │ ├── seeds-flowchart.webp │ ├── seeds │ │ ├── WaterDrops1.png │ │ ├── WaterDrops2.png │ │ ├── WaterDrops3.png │ │ ├── WaterDrops4.png │ │ ├── WaterDrops5.png │ │ ├── background.png │ │ ├── balancer-plant.png │ │ ├── balancer-trade.png │ │ └── plant.svg │ ├── share.svg │ ├── social.png │ ├── social.webp │ ├── thinking-emoji_400x400.webp │ ├── triangle.svg │ ├── xp-star.svg │ └── young-plant.webp │ ├── codegen.ts │ ├── components │ ├── Carousel │ │ ├── CarouselContext.tsx │ │ ├── Item.tsx │ │ ├── Slider.tsx │ │ ├── Track.tsx │ │ └── index.tsx │ ├── ConnectToProgress.tsx │ ├── ConnectedPage.tsx │ ├── Container.tsx │ ├── Dashboard │ │ ├── Calendar.tsx │ │ ├── DashboardSection.tsx │ │ ├── LatestContent.tsx │ │ ├── LatestContentTabs │ │ │ ├── Listen.tsx │ │ │ ├── Read.tsx │ │ │ └── Watch.tsx │ │ ├── Leaderboard.tsx │ │ ├── LeaderboardLink.tsx │ │ ├── QuestChainsPinned.tsx │ │ ├── QuestCompletionItem.tsx │ │ ├── QuestsCompleted.tsx │ │ ├── QuestsCreated.tsx │ │ ├── Seed.tsx │ │ └── config.ts │ ├── EditProfileModal.tsx │ ├── EditableGridLayout.tsx │ ├── Forms │ │ └── Field.tsx │ ├── Guild │ │ ├── GuildForm.tsx │ │ ├── GuildList.tsx │ │ ├── GuildNotFound.tsx │ │ ├── GuildSection.tsx │ │ ├── GuildTile.tsx │ │ ├── Section │ │ │ ├── GuildAnnouncements.tsx │ │ │ ├── GuildHero.tsx │ │ │ ├── GuildLinks.tsx │ │ │ ├── GuildPlayer.tsx │ │ │ ├── GuildPlayers.tsx │ │ │ ├── Links │ │ │ │ ├── AddGuildLink.tsx │ │ │ │ └── EditGuildLink.tsx │ │ │ └── config.ts │ │ └── UnverifiedGuildForm.tsx │ ├── GuildSearchBar.tsx │ ├── JoinButton.tsx │ ├── Landing │ │ ├── Build.tsx │ │ ├── Cards.tsx │ │ ├── Game.tsx │ │ ├── Intro.tsx │ │ ├── JoinUs.tsx │ │ ├── LandingConnectButton.tsx │ │ ├── LandingFooter.tsx │ │ ├── LandingHeader.tsx │ │ ├── LandingNextButton.tsx │ │ ├── Onboard.tsx │ │ ├── OnboardingGame │ │ │ ├── Chiev.tsx │ │ │ ├── Rain.tsx │ │ │ ├── gameTypes.ts │ │ │ ├── index.tsx │ │ │ ├── metagame-onboarding-game.json │ │ │ └── nft.ts │ │ ├── OnboardingGuidance │ │ │ └── index.tsx │ │ ├── Signup │ │ │ ├── Cards.tsx │ │ │ ├── data.ts │ │ │ └── index.tsx │ │ ├── StartButton.tsx │ │ ├── animations.tsx │ │ └── landingSection.ts │ ├── Link.tsx │ ├── MegaMenu │ │ ├── DesktopMenuItem.tsx │ │ ├── DesktopNavLinks.tsx │ │ ├── DesktopPlayerStats.tsx │ │ ├── MegaMenuFooter.tsx │ │ ├── MegaMenuHeader.tsx │ │ ├── XPSeedsBalance.tsx │ │ └── index.tsx │ ├── Patron │ │ ├── Join │ │ │ ├── BecomePatron.tsx │ │ │ ├── LeagueCardItem.tsx │ │ │ ├── PerksCard.tsx │ │ │ ├── PerksGrid.tsx │ │ │ ├── PerksHeader.tsx │ │ │ ├── RankedLeagues.tsx │ │ │ ├── WateringSeeds.tsx │ │ │ ├── WhatsTheProduct.tsx │ │ │ └── WhoArePatrons.tsx │ │ ├── PatronList.tsx │ │ └── PatronRank.tsx │ ├── Player │ │ ├── ColorBar.tsx │ │ ├── Filter │ │ │ ├── AdjascentTimeZonePlayers.tsx │ │ │ ├── DesktopFilters.tsx │ │ │ ├── MobileFilters.tsx │ │ │ ├── PlayerFilter.tsx │ │ │ ├── PlayerTileSkeleton.tsx │ │ │ ├── PlayersLoading.tsx │ │ │ └── PlayersNotFound.tsx │ │ ├── PlayerAvatar.tsx │ │ ├── PlayerContacts.tsx │ │ ├── PlayerGuild.tsx │ │ ├── PlayerList.tsx │ │ ├── PlayerProfilePicture.tsx │ │ ├── PlayerProfilePictureRound.tsx │ │ ├── PlayerRank.tsx │ │ ├── PlayerSection.tsx │ │ ├── PlayerStart.tsx │ │ ├── PlayerTile.tsx │ │ ├── PlayerTileMemberships.tsx │ │ ├── Profile │ │ │ ├── ComposeDBPromptModal.tsx │ │ │ ├── EditAvatarImage.tsx │ │ │ ├── EditBackgroundImage.tsx │ │ │ ├── EditDescription.tsx │ │ │ ├── Label.tsx │ │ │ └── MeetWithWalletProfileEdition.tsx │ │ └── Section │ │ │ ├── Attestations.tsx │ │ │ ├── LinkIcon.tsx │ │ │ ├── Links.tsx │ │ │ ├── MembershipModals │ │ │ ├── AddPlayerGuild.tsx │ │ │ └── GuildListing.tsx │ │ │ ├── PlayerAchievements.tsx │ │ │ ├── PlayerBrightId.tsx │ │ │ ├── PlayerCompletedQuests.tsx │ │ │ ├── PlayerDework.tsx │ │ │ ├── PlayerEAS.tsx │ │ │ ├── PlayerGallery.tsx │ │ │ ├── PlayerHero.tsx │ │ │ ├── PlayerHeroTile.tsx │ │ │ ├── PlayerLinks.tsx │ │ │ ├── PlayerLinks │ │ │ ├── AddPlayerLink.tsx │ │ │ ├── EditPlayerLink.tsx │ │ │ └── PlayerMemberships.tsx │ │ │ ├── PlayerPersonalityType.tsx │ │ │ ├── PlayerRoles.tsx │ │ │ ├── PlayerSkills.tsx │ │ │ ├── PlayerType.tsx │ │ │ └── config.ts │ ├── Quest │ │ ├── CompletionForm.tsx │ │ ├── QuestArticleCss.tsx │ │ ├── QuestCompletions.tsx │ │ ├── QuestCompletionsItem.tsx │ │ ├── QuestDetails.tsx │ │ ├── QuestDetailsDescription.tsx │ │ ├── QuestDetailsHeader.tsx │ │ ├── QuestDetailsImage.tsx │ │ ├── QuestDetailsRequirementsRewards.tsx │ │ ├── QuestFilter.tsx │ │ ├── QuestForm.tsx │ │ ├── QuestList.tsx │ │ ├── QuestListDescriptionCss.tsx │ │ ├── QuestTags.tsx │ │ ├── QuestTile.tsx │ │ ├── QuestTileImage.tsx │ │ ├── Roles.tsx │ │ └── Skills.tsx │ ├── QuestChain │ │ ├── MintNFTTile.tsx │ │ ├── QuestChainDisplay.tsx │ │ ├── QuestHeading.tsx │ │ ├── QuestTile.tsx │ │ ├── UploadProof.tsx │ │ └── UploadProofButton.tsx │ ├── RenderOnViewportEntry.tsx │ ├── RoundImage.tsx │ ├── SearchFilters.tsx │ ├── Section │ │ ├── AddBoxSection.tsx │ │ ├── CustomTextSection.tsx │ │ ├── EmbeddedUrlSection.tsx │ │ └── ProfileSection.tsx │ ├── Seeds │ │ ├── Plant.tsx │ │ ├── Trade.tsx │ │ └── Water.tsx │ ├── Seo.tsx │ ├── Setup │ │ ├── SetupAvailability.tsx │ │ ├── SetupDescription.tsx │ │ ├── SetupDeworkURL.tsx │ │ ├── SetupDone.tsx │ │ ├── SetupHeader.tsx │ │ ├── SetupName.tsx │ │ ├── SetupPersonalityType.tsx │ │ ├── SetupPlayerLinks.tsx │ │ ├── SetupPlayerType.tsx │ │ ├── SetupProfile.tsx │ │ ├── SetupProfilePicture.tsx │ │ ├── SetupRoles.tsx │ │ ├── SetupSkills.tsx │ │ ├── SetupTimeZone.tsx │ │ └── WizardPane.tsx │ ├── SignInButton.tsx │ ├── SocialLinks.tsx │ ├── SquareImage.tsx │ └── SwitchNetworkButton.tsx │ ├── config.ts │ ├── contexts │ ├── ComposeDBContext.tsx │ ├── GameContext.tsx │ ├── PlayerHydrationContext.tsx │ ├── SetupContext.tsx │ └── Web3Context.tsx │ ├── contracts │ ├── BulkDisbursableNFTs.abi.ts │ ├── HubFacet.abi.ts │ ├── QuestChains.instance.abi.json │ ├── erc20.abi.ts │ ├── meTokensFactory.abi.ts │ └── meTokensRegistry.abi.ts │ ├── eslint.config.js │ ├── graphql │ ├── client.ts │ ├── composeDB │ │ ├── mutations │ │ │ └── profile.ts │ │ └── queries │ │ │ └── profile.ts │ ├── fragments.ts │ ├── getDeworkUsername.ts │ ├── getMe.ts │ ├── getMemberships.ts │ ├── getPatrons.ts │ ├── getPlayer.ts │ ├── getPlayers.ts │ ├── getQuest.ts │ ├── getQuests.ts │ ├── mutations │ │ ├── createQuest.ts │ │ ├── createQuestCompletion.ts │ │ ├── dework.ts │ │ ├── guild.ts │ │ ├── idxCache.ts │ │ ├── player.ts │ │ ├── updateQuest.ts │ │ └── updateQuestCompletion.ts │ ├── queries │ │ ├── enums │ │ │ ├── getExplorerTypes.ts │ │ │ ├── getPersonalityInfo.ts │ │ │ ├── getRoles.ts │ │ │ └── getSkills.ts │ │ ├── guild.ts │ │ └── player.ts │ └── types.ts │ ├── lib │ ├── LoggingErrorBoundary.tsx │ ├── auth.ts │ ├── errors.ts │ ├── hooks │ │ ├── alchemy.ts │ │ ├── balances.ts │ │ ├── brightId.ts │ │ ├── ceramic │ │ │ ├── useComposeDB.ts │ │ │ ├── useComputeComposeDBImageMetadata.ts │ │ │ ├── useGetOwnProfileFromComposeDB.ts │ │ │ ├── useGetPlayerProfileFromComposeDB.ts │ │ │ ├── usePlayerSetupSaveToComposeDB.ts │ │ │ └── useSaveToComposeDB.ts │ │ ├── index.ts │ │ ├── player │ │ │ ├── players.ts │ │ │ ├── usePlayerName.ts │ │ │ └── usePlayerURL.ts │ │ ├── questChains │ │ │ ├── index.ts │ │ │ ├── useLatestQuestChainData.ts │ │ │ ├── useLatestQuestStatusesForUserAndChainData.ts │ │ │ ├── useUserProgress.ts │ │ │ └── useUserStatus.ts │ │ ├── quests.ts │ │ ├── useBoundingRect.ts │ │ ├── useBoxHeights.ts │ │ ├── useCalendar.ts │ │ ├── useCopyToClipboard.ts │ │ ├── useDelay.ts │ │ ├── useDropFiles.tsx │ │ ├── useEAS.ts │ │ ├── useEthersProvider.ts │ │ ├── useFirstViewportEntry.ts │ │ ├── useGasless.ts │ │ ├── useImageReader.ts │ │ ├── useInputText.tsx │ │ ├── useIsSticky.tsx │ │ ├── useMotionDetector.ts │ │ ├── useOnScreen.tsx │ │ ├── useProfileImageOnload.ts │ │ ├── useRefresh.ts │ │ ├── useUser.ts │ │ ├── useW3.ts │ │ └── useWeb3.ts │ ├── ironSession.ts │ └── store.ts │ ├── next-env.d.ts │ ├── next.config.mjs │ ├── package.json │ ├── pages │ ├── 404.tsx │ ├── _app.tsx │ ├── _document.tsx │ ├── academy │ │ ├── [questchain].tsx │ │ └── index.tsx │ ├── api │ │ ├── alchemy-multichain-client.ts │ │ ├── alchemy.ts │ │ ├── events.ts │ │ ├── feed.ts │ │ ├── integrations │ │ │ └── meetwithwallet │ │ │ │ └── [address].ts │ │ ├── logout.ts │ │ ├── me.ts │ │ ├── metadata.ts │ │ ├── nonce.ts │ │ ├── verify.ts │ │ └── w3up-client.ts │ ├── community │ │ ├── events.tsx │ │ └── index.tsx │ ├── dashboard.tsx │ ├── guild │ │ └── [guildname] │ │ │ ├── edit.tsx │ │ │ └── index.tsx │ ├── guilds.tsx │ ├── join │ │ ├── guild │ │ │ ├── [guildname].tsx │ │ │ ├── auth.tsx │ │ │ └── start.tsx │ │ └── patron │ │ │ └── index.tsx │ ├── me.tsx │ ├── onboarding │ │ ├── guide.tsx │ │ └── index.tsx │ ├── patrons.tsx │ ├── player │ │ └── [username].tsx │ ├── players.tsx │ ├── profile │ │ └── setup │ │ │ ├── availability.tsx │ │ │ ├── complete.tsx │ │ │ ├── description.tsx │ │ │ ├── name.tsx │ │ │ ├── personalityType.tsx │ │ │ ├── profilePicture.tsx │ │ │ ├── roles.tsx │ │ │ ├── skills.tsx │ │ │ └── timeZone.tsx │ ├── quest │ │ ├── [id].tsx │ │ ├── [id] │ │ │ ├── complete.tsx │ │ │ └── edit.tsx │ │ └── create.tsx │ ├── quests.tsx │ ├── search │ │ ├── guilds.tsx │ │ ├── patrons.tsx │ │ ├── players.tsx │ │ └── quests.tsx │ ├── seeds.tsx │ ├── signup │ │ └── index.tsx │ └── start.tsx │ ├── public │ ├── assets │ │ ├── MG-share-image_octopus-in-space.jpg │ │ ├── QuestsDefaultImage_900x900.jpg │ │ ├── guilds.png │ │ ├── landing-social.jpg │ │ ├── logo.png │ │ ├── octopus.png │ │ ├── roles │ │ │ ├── artist.svg │ │ │ ├── builder.svg │ │ │ ├── designer.svg │ │ │ ├── innkeeper.svg │ │ │ ├── patron.svg │ │ │ ├── shiller.svg │ │ │ └── writer.svg │ │ └── seed-logo-smol_46x46.png │ └── metagame.ico │ ├── tsconfig.json │ └── utils │ ├── GlobalSearch.ts │ ├── LatestContentHelpers.ts │ ├── boxTypes.ts │ ├── daoHelpers.ts │ ├── dashboardHelpers.ts │ ├── dateHelpers.ts │ ├── dework.ts │ ├── ensHelpers.ts │ ├── errorHandler.ts │ ├── formatHelpers.ts │ ├── guidanceData.ts │ ├── imageHelpers.ts │ ├── layoutHelpers.ts │ ├── mathHelper.ts │ ├── menuIcons.ts │ ├── menuLinks.ts │ ├── metamask.ts │ ├── networks.ts │ ├── objectHelpers.ts │ ├── patronHelpers.ts │ ├── playerHelpers.ts │ ├── questChains.ts │ ├── questHelpers.ts │ ├── roleHelpers.ts │ ├── setupOptions.tsx │ ├── skillHelpers.ts │ ├── stringHelpers.ts │ ├── types.ts │ └── walletOptions.ts ├── render.yaml ├── schema.graphql ├── tokenlog.json ├── tsconfig.base.json ├── tsconfig.eslint.json ├── tsconfig.json └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | packages/**/node_modules/ 3 | packages/**/dist/ 4 | packages/**/build/ 5 | npm-debug.log 6 | **/.env* 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | [*] 3 | indent_style = space 4 | indent_size = 2 5 | end_of_line = lf 6 | insert_final_newline = true 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest a new feature 3 | labels: ["feature request"] 4 | body: 5 | - type: textarea 6 | id: feature 7 | attributes: 8 | label: What would you like to be added? 9 | validations: 10 | required: true 11 | 12 | - type: textarea 13 | id: reason 14 | attributes: 15 | label: Why is this needed? 16 | validations: 17 | required: true 18 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / # default location of `.github/workflows` 5 | schedule: 6 | interval: daily 7 | ignore: 8 | - dependency-name: '*' 9 | update-types: [version-update:semver-patch] 10 | -------------------------------------------------------------------------------- /.graphqlconfig: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MetaGame GraphQL Schema", 3 | "schemaPath": "./schema.graphql", 4 | "extensions": { 5 | "endpoints": { 6 | "Hasura Dev": { 7 | "url": "http://localhost:8080/v1/graphql", 8 | "headers": { 9 | "user-agent": "JS GraphQL" 10 | }, 11 | "introspect": false 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | yarn precommit 3 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.{ts,tsx,js,jsx}": ["eslint --fix", "prettier --write"], 3 | "*.{json,yml,md}": "prettier --write" 4 | } 5 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/iron 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/dist 3 | node_modules/ 4 | 5 | # No npm allowed 6 | package-lock.json 7 | 8 | # IDE 9 | .idea 10 | 11 | # next.js 12 | .next/ 13 | 14 | # Hasura config 15 | hasura/** 16 | 17 | # build files 18 | build 19 | autogen 20 | dist 21 | out/ 22 | 23 | # Coverage directory used by testing tools 24 | **/coverage 25 | **/jest-coverage 26 | **/reports 27 | 28 | # misc 29 | .DS_Store 30 | .env 31 | .env.local 32 | .env.development.local 33 | .env.test.local 34 | .env.production.local 35 | 36 | schema.graphql 37 | -------------------------------------------------------------------------------- /.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 80, 3 | singleQuote: true, 4 | trailingComma: 'all', 5 | arrowParens: 'always', 6 | // semi: false, 7 | overrides: [ 8 | { 9 | files: '*.yaml', 10 | options: { 11 | singleQuote: false, 12 | }, 13 | }, 14 | ], 15 | }; 16 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "githubPullRequests.ignoredPullRequestBranches": [ 3 | "develop" 4 | ], 5 | "typescript.tsdk": "node_modules/typescript/lib" 6 | } 7 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | preferInteractive: true 4 | 5 | progressBarStyle: simba 6 | 7 | checksumBehavior: update -------------------------------------------------------------------------------- /guides/README.md: -------------------------------------------------------------------------------- 1 | # MyMeta Development Guides 2 | 3 |  4 | 5 | - [Contributions Guide](CONTRIBUTING.md) 6 | - [Frontend](FRONTEND.md) 7 | - [Backend](BACKEND.md) 8 | - [Collective Code Construction Contract (C4)](C4.md) 9 | - [C4 With Discussion](DESCRIPTIVE_C4.MD) 10 | -------------------------------------------------------------------------------- /hasura/config.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | endpoint: http://localhost:8080 3 | admin_secret: metagame_secret 4 | api_paths: 5 | query: v1/query 6 | graphql: v1/graphql 7 | config: v1alpha1/config 8 | pg_dump: v1alpha1/pg_dump 9 | version: v1/version 10 | metadata_directory: metadata 11 | migrations_directory: migrations 12 | seeds_directory: seeds 13 | actions: 14 | kind: synchronous 15 | handler_webhook_baseurl: '{{ACTION_BASE_ENDPOINT}}' 16 | -------------------------------------------------------------------------------- /hasura/metadata/allow_list.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /hasura/metadata/functions.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /hasura/metadata/network.yaml: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /hasura/metadata/query_collections.yaml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /hasura/metadata/remote_schemas.yaml: -------------------------------------------------------------------------------- 1 | - name: backend 2 | definition: 3 | url_from_env: REMOTE_SCHEMA_ENDPOINT 4 | timeout_seconds: 60 5 | -------------------------------------------------------------------------------- /hasura/metadata/version.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | -------------------------------------------------------------------------------- /hasura/migrations/1595681063913_insert_seed_data/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "Guild" (id, type, identifier, name, logo) VALUES ('cd01cac9-abcd-42c3-908f-b8b0368eeef3', 'ARAGON', '0xd21cf378e2e40bda4597594738bb35e9ccc97da7', 'MetaFam', 'https://metagame.wtf/static/f3f97018016dd123ab7a9d6f8aaecc04/9911c/logo.png'); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1597557008749_sourcecred-migration/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Account" drop constraint "Account_identifier_type_key"; 3 | alter table "public"."Account" add constraint "Account_identifier_key" unique ("identifier"); 4 | 5 | ALTER TABLE "public"."Player" DROP COLUMN "scIdentityId"; 6 | 7 | ALTER TABLE "public"."Player" ALTER COLUMN "ethereum_address" SET NOT NULL; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1597557008749_sourcecred-migration/up.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."Player" 3 | ALTER COLUMN "ethereum_address" 4 | DROP NOT NULL 5 | ; 6 | 7 | ALTER TABLE "public"."Player" 8 | ADD COLUMN "scIdentityId" 9 | Text NULL UNIQUE 10 | ; 11 | 12 | ALTER TABLE "public"."Account" 13 | DROP CONSTRAINT "Account_identifier_unique_key"; 14 | ALTER TABLE "public"."Account" 15 | ADD CONSTRAINT "Account_identifier_type_key" 16 | UNIQUE ("identifier", "type") 17 | ; 18 | -------------------------------------------------------------------------------- /hasura/migrations/1597563241280_player-ranks/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Player" drop constraint "Player_rank_fkey"; 3 | 4 | ALTER TABLE "public"."Player" DROP COLUMN "rank"; 5 | 6 | DROP TABLE "public"."Player_Rank"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1597563241280_player-ranks/up.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE "public"."Player_Rank"("rank" text NOT NULL, PRIMARY KEY ("rank") ); 3 | 4 | INSERT INTO "Player_Rank" (rank) VALUES 5 | ('DIAMOND'), 6 | ('PLATINUM'), 7 | ('GOLD'), 8 | ('SILVER'), 9 | ('BRONZE'); 10 | 11 | ALTER TABLE "public"."Player" ADD COLUMN "rank" text NULL; 12 | 13 | alter table "public"."Player" 14 | add constraint "Player_rank_fkey" 15 | foreign key ("rank") 16 | references "public"."Player_Rank" 17 | ("rank") on update restrict on delete restrict; 18 | -------------------------------------------------------------------------------- /hasura/migrations/1597818654956_alter_table_public_Account_drop_constraint_Account_identifier_type_player_key/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Account" add constraint "Account_type_player_id_key" unique ("type", "player_id"); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1597818654956_alter_table_public_Account_drop_constraint_Account_identifier_type_player_key/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Account" drop constraint "Account_identifier_type_player_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1597822038999_alter_table_public_Player_add_column_created_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" DROP COLUMN "created_at"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1597822038999_alter_table_public_Player_add_column_created_at/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" ADD COLUMN "created_at" timestamptz NULL DEFAULT now(); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1597822046056_alter_table_public_Player_add_column_updated_at/down.sql: -------------------------------------------------------------------------------- 1 | DROP TRIGGER IF EXISTS "set_public_Player_updated_at" ON "public"."Player"; 2 | ALTER TABLE "public"."Player" DROP COLUMN "updated_at"; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1598418750227_add_skill_categories/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Skill" drop constraint "Skill_category_fkey"; 3 | 4 | ALTER TABLE "public"."Skill" DROP COLUMN "category"; 5 | 6 | DROP TABLE "public"."SkillCategory"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1602297882653_account-type-table/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Account" drop constraint "Account_type_fkey"; 3 | 4 | ALTER TABLE "public"."Account" ALTER COLUMN "type" TYPE USER-DEFINED; 5 | 6 | DROP TABLE "public"."AccountType"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1602297882653_account-type-table/up.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE "public"."AccountType"("type" text NOT NULL, PRIMARY KEY ("type") ); 3 | INSERT INTO "AccountType" (type) VALUES 4 | ('ETHEREUM'), 5 | ('DISCORD'), 6 | ('GITHUB'), 7 | ('TWITTER'), 8 | ('DISCOURSE'); 9 | 10 | ALTER TABLE "public"."Account" ALTER COLUMN "type" TYPE text; 11 | 12 | alter table "public"."Account" 13 | add constraint "Account_type_fkey" 14 | foreign key ("type") 15 | references "public"."AccountType" 16 | ("type") on update restrict on delete restrict; 17 | -------------------------------------------------------------------------------- /hasura/migrations/1602298657385_enneagram-type-table/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Player" drop constraint "Player_enneagram_fkey"; 3 | 4 | ALTER TABLE "public"."Player" ALTER COLUMN "enneagram" TYPE USER-DEFINED; 5 | 6 | DROP TABLE "public"."EnneagramType"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1602392593424_create-me-view/down.sql: -------------------------------------------------------------------------------- 1 | DROP VIEW "public"."me"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1602392593424_create-me-view/up.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE VIEW "public"."me" AS 2 | SELECT "Player".id, 3 | "Player".username, 4 | "Player".ethereum_address 5 | FROM "Player"; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1602808981811_add_player_type/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."Player" drop constraint "Player_playerTypeId_fkey"; 3 | 4 | ALTER TABLE "public"."Player" DROP COLUMN "playerTypeId"; 5 | 6 | DROP TABLE "public"."PlayerType"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1602811082541_alter_table_public_Player_add_column_availability_hours/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" DROP COLUMN "availability_hours"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1602811082541_alter_table_public_Player_add_column_availability_hours/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" ADD COLUMN "availability_hours" integer NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1605730139833_create_table_public_guild_player/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."guild_player"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1605730139833_create_table_public_guild_player/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."guild_player"("guild_id" uuid NOT NULL, "player_id" uuid NOT NULL, PRIMARY KEY ("guild_id","player_id") , FOREIGN KEY ("guild_id") REFERENCES "public"."Guild"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("player_id") REFERENCES "public"."Player"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("guild_id", "player_id")); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1605829703638_alter_table_public_Player_add_column_tz/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" DROP COLUMN "tz"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1605829703638_alter_table_public_Player_add_column_tz/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Player" ADD COLUMN "tz" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1607539990954_alter_table_public_Guild_add_column_description/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Guild" DROP COLUMN "description"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1607539990954_alter_table_public_Guild_add_column_description/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."Guild" ADD COLUMN "description" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1607540645353_update_guild_tyles/up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "Guild"; 2 | DELETE FROM "GuildType"; 3 | 4 | INSERT INTO "GuildType" ("name") VALUES 5 | ('PROJECT'), 6 | ('SERVICE'), 7 | ('RESEARCH'), 8 | ('SOCIAL'), 9 | ('FUNDING'); 10 | -------------------------------------------------------------------------------- /hasura/migrations/1607541858765_create_table_public_guild_account/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."guild_account"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1607541858765_create_table_public_guild_account/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."guild_account"("guild_id" uuid NOT NULL, "type" text NOT NULL, "identifier" text NOT NULL, PRIMARY KEY ("guild_id","type") , FOREIGN KEY ("guild_id") REFERENCES "public"."Guild"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("type") REFERENCES "public"."AccountType"("type") ON UPDATE restrict ON DELETE restrict, UNIQUE ("type", "identifier")); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1608424869168_update_guild_table/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."Guild" DROP COLUMN "website_url"; 3 | 4 | ALTER TABLE "public"."Guild" DROP COLUMN "discord_invite_url"; 5 | 6 | ALTER TABLE "public"."Guild" DROP COLUMN "moloch_address"; 7 | 8 | ALTER TABLE "public"."Guild" DROP COLUMN "join_button_url"; 9 | 10 | ALTER TABLE "public"."Guild" ADD COLUMN "identifier" text; 11 | ALTER TABLE "public"."Guild" ALTER COLUMN "identifier" DROP NOT NULL; 12 | 13 | COMMENT ON COLUMN "public"."Guild"."type" IS E''; 14 | -------------------------------------------------------------------------------- /hasura/migrations/1608424869168_update_guild_table/up.sql: -------------------------------------------------------------------------------- 1 | 2 | COMMENT ON COLUMN "public"."Guild"."type" IS E'The area of focus for the guild (e.g. funding, project, etc)'; 3 | 4 | ALTER TABLE "public"."Guild" DROP COLUMN "identifier" CASCADE; 5 | 6 | 7 | ALTER TABLE "public"."Guild" ADD COLUMN "join_button_url" text NULL; 8 | 9 | ALTER TABLE "public"."Guild" ADD COLUMN "moloch_address" text NULL; 10 | 11 | ALTER TABLE "public"."Guild" ADD COLUMN "discord_invite_url" text NULL; 12 | 13 | ALTER TABLE "public"."Guild" ADD COLUMN "website_url" text NULL; 14 | -------------------------------------------------------------------------------- /hasura/migrations/1608450255714_add_guildname_column/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."Guild" ALTER COLUMN "guildname" DROP NOT NULL; 3 | COMMENT ON COLUMN "public"."Guild"."guildname" IS E''; 4 | 5 | ALTER TABLE "public"."Guild" DROP COLUMN "guildname"; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1608450255714_add_guildname_column/up.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."Guild" ADD COLUMN "guildname" text NULL UNIQUE; 3 | 4 | ALTER TABLE "public"."Guild" ALTER COLUMN "guildname" SET NOT NULL; 5 | COMMENT ON COLUMN "public"."Guild"."guildname" IS E'Unique friendly identifier for the Guild (used in URL)'; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1609366056194_rename_table_public_Player/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" rename to "Player"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366056194_rename_table_public_Player/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Player" rename to "player"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366115237_rename_table_public_Skill/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."skill" rename to "Skill"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366115237_rename_table_public_Skill/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Skill" rename to "skill"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366185785_rename_table_public_Player_Skill/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_skill" rename to "Player_Skill"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366185785_rename_table_public_Player_Skill/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Player_Skill" rename to "player_skill"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366236771_rename_table_public_PlayerType/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_type" rename to "PlayerType"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366236771_rename_table_public_PlayerType/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."PlayerType" rename to "player_type"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366692966_rename_table_public_Guild/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" rename to "Guild"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366692966_rename_table_public_Guild/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Guild" rename to "guild"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366718077_rename_table_public_Account/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_account" rename to "Account"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366718077_rename_table_public_Account/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Account" rename to "player_account"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366750413_rename_table_public_Player_Rank/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."PlayerRank" rename to "Player_Rank"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609366750413_rename_table_public_Player_Rank/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."Player_Rank" rename to "PlayerRank"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609960864949_alter_table_public_player_drop_column_timezone/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "timezone" int4; 2 | ALTER TABLE "public"."player" ALTER COLUMN "timezone" DROP NOT NULL; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1609960864949_alter_table_public_player_drop_column_timezone/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "timezone" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1609965105543_player_table_consistent_column_names/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."player" rename column "timezone" to "tz"; 3 | 4 | alter table "public"."player" rename column "player_type_id" to "playerTypeId"; 5 | 6 | alter table "public"."player" rename column "sc_identity_id" to "scIdentityId"; 7 | 8 | alter table "public"."player" rename column "total_xp" to "totalXp"; 9 | -------------------------------------------------------------------------------- /hasura/migrations/1609965105543_player_table_consistent_column_names/up.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."player" rename column "totalXp" to "total_xp"; 3 | 4 | alter table "public"."player" rename column "scIdentityId" to "sc_identity_id"; 5 | 6 | alter table "public"."player" rename column "playerTypeId" to "player_type_id"; 7 | 8 | alter table "public"."player" rename column "tz" to "timezone"; 9 | -------------------------------------------------------------------------------- /hasura/migrations/1613085907468_add_metafam_discord/down.sql: -------------------------------------------------------------------------------- 1 | DELETE from guild_account ga WHERE ga.guild_id = 'f94b7cd4-cf29-4251-baa5-eaacab98a719' AND ga.type = 'DISCORD'; -------------------------------------------------------------------------------- /hasura/migrations/1614278149225_lowercase_player_username/up.sql: -------------------------------------------------------------------------------- 1 | UPDATE player SET username=lower(username); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1614710766234_alter_table_public_player_add_check_constraint_username_is_valid/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" drop constraint "username_is_valid"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1614710766234_alter_table_public_player_add_check_constraint_username_is_valid/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" add constraint "username_is_valid" check (username ~ '^[a-z0-9-](_(?!(\.|_))|\.(?!(_|\.))|[a-z0-9-]){0,40}[a-z0-9-]$'); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1615312118803_move_discord_ids/down.sql: -------------------------------------------------------------------------------- 1 | 2 | INSERT INTO player_account (player_id, type, identifier) 3 | SELECT id, 'DISCORD', discord_id FROM player WHERE discord_id IS NOT NULL; 4 | 5 | UPDATE player SET discord_id = NULL; 6 | 7 | ALTER TABLE "public"."guild" DROP COLUMN "discord_id"; 8 | 9 | ALTER TABLE "public"."player" DROP COLUMN "discord_id"; 10 | -------------------------------------------------------------------------------- /hasura/migrations/1615312118803_move_discord_ids/up.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."player" ADD COLUMN "discord_id" text NULL UNIQUE; 3 | 4 | ALTER TABLE "public"."guild" ADD COLUMN "discord_id" text NULL UNIQUE; 5 | 6 | UPDATE player p 7 | SET discord_id = pa.identifier 8 | FROM player_account pa 9 | WHERE pa.player_id = p.id AND pa.type = 'DISCORD'; 10 | 11 | DELETE FROM player_account WHERE type = 'DISCORD'; 12 | -------------------------------------------------------------------------------- /hasura/migrations/1615328641179_add_guild_status/down.sql: -------------------------------------------------------------------------------- 1 | 2 | alter table "public"."guild" drop constraint "guild_status_fkey"; 3 | 4 | 5 | ALTER TABLE "public"."guild" DROP COLUMN "status"; 6 | 7 | DROP TABLE "public"."GuildStatus"; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1615328641179_add_guild_status/up.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | CREATE TABLE "public"."GuildStatus"("status" text NOT NULL, PRIMARY KEY ("status") , UNIQUE ("status")); 4 | 5 | INSERT INTO "public"."GuildStatus" (status) VALUES ('ACTIVE'), ('PENDING'), ('INACTIVE'); 6 | ALTER TABLE "public"."guild" ADD COLUMN "status" text NOT NULL DEFAULT 'ACTIVE'; 7 | 8 | alter table "public"."guild" 9 | add constraint "guild_status_fkey" 10 | foreign key ("status") 11 | references "public"."GuildStatus" 12 | ("status") on update restrict on delete restrict; 13 | -------------------------------------------------------------------------------- /hasura/migrations/1615534737144_lowercase_player_ethereum_address/up.sql: -------------------------------------------------------------------------------- 1 | UPDATE player SET ethereum_address=lower(ethereum_address) WHERE ethereum_address IS NOT NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" drop constraint "ethereum_address_is_valid"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1615534770163_alter_table_public_player_add_check_constraint_ethereum_address_is_valid/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" add constraint "ethereum_address_is_valid" check (ethereum_address ~ '^0x([a-z0-9-]{40})$'::text); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1615594547538_guild_add_discord_metadata_jsonb/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."guild" ADD COLUMN "discord_invite_url" text; 3 | 4 | UPDATE guild SET discord_invite_url = discord_metadata ->> 'invite_url'; 5 | 6 | ALTER TABLE "public"."guild" DROP COLUMN "discord_metadata"; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1615594547538_guild_add_discord_metadata_jsonb/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild ADD COLUMN discord_metadata jsonb NULL; 2 | 3 | UPDATE public.guild 4 | SET discord_metadata = ( 5 | '{"inviteUrl": "' || discord_invite_url || '"}' 6 | )::jsonb 7 | ; 8 | 9 | ALTER TABLE public.guild DROP COLUMN discord_invite_url CASCADE; 10 | -------------------------------------------------------------------------------- /hasura/migrations/1615614610171_add_metafam_rank_role_ids/down.sql: -------------------------------------------------------------------------------- 1 | UPDATE guild 2 | SET discord_metadata = discord_metadata - 'rankRoleIds' 3 | WHERE guild.guildname = 'metafam'; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1615614610171_add_metafam_rank_role_ids/up.sql: -------------------------------------------------------------------------------- 1 | UPDATE guild 2 | SET discord_metadata = jsonb_set( 3 | discord_metadata, 4 | '{rankRoleIds}', 5 | '{"DIAMOND": "659518696506785802", "PLATINUM": "659519668553252864", "GOLD": "659519940159602746", "SILVER": "665574957094535199", "BRONZE": "675569758682480661"}' 6 | ) 7 | WHERE guild.guildname = 'metafam'; 8 | 9 | UPDATE guild 10 | SET discord_metadata = jsonb_set( 11 | discord_metadata, 12 | '{membershipRoleIds}', 13 | '["681296328956968983", "771329952691650600"]' 14 | ) 15 | WHERE guild.guildname = 'metafam'; 16 | -------------------------------------------------------------------------------- /hasura/migrations/1616096764854_move_metafam_discord_id/down.sql: -------------------------------------------------------------------------------- 1 | insert into guild_account (guild_id, type, identifier) VALUES 2 | ('f94b7cd4-cf29-4251-baa5-eaacab98a719', 'DISCORD', '629411177947987986'); 3 | 4 | UPDATE guild 5 | SET discord_id = NULL 6 | WHERE id = 'f94b7cd4-cf29-4251-baa5-eaacab98a719'; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1616096764854_move_metafam_discord_id/up.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM guild_account 2 | WHERE guild_id = 'f94b7cd4-cf29-4251-baa5-eaacab98a719' AND type = 'DISCORD'; 3 | 4 | UPDATE guild 5 | SET discord_id = '629411177947987986' 6 | WHERE id = 'f94b7cd4-cf29-4251-baa5-eaacab98a719'; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1616101057636_create-mtg-color-table/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player 2 | DROP CONSTRAINT player_color_mask_fkey 3 | ; 4 | 5 | ALTER TABLE public.player 6 | DROP COLUMN color_mask 7 | ; 8 | 9 | DROP TABLE public."ColorAspect"; -------------------------------------------------------------------------------- /hasura/migrations/1616124361730_drop-enneagram-table/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player 2 | DROP CONSTRAINT "Player_enneagram_fkey" 3 | ; 4 | 5 | ALTER TABLE public.player 6 | DROP COLUMN enneagram 7 | ; 8 | 9 | DROP TABLE public."EnneagramType"; 10 | -------------------------------------------------------------------------------- /hasura/migrations/1617071740377_guild_separate_discord_invite_url/down.sql: -------------------------------------------------------------------------------- 1 | UPDATE "public"."guild" 2 | SET discord_metadata = jsonb_set(discord_metadata, '{inviteUrl}', '"' || discord_invite_url || '"'); 3 | 4 | ALTER TABLE "public"."guild" DROP COLUMN "discord_invite_url" CASCADE; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1617071740377_guild_separate_discord_invite_url/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "discord_invite_url" text; 2 | 3 | UPDATE guild SET discord_invite_url = discord_metadata ->> 'inviteUrl'; 4 | 5 | UPDATE guild SET discord_metadata = discord_metadata - 'inviteUrl'; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1619844206488_guilds_add_twitter_and_github_urls/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."guild" DROP COLUMN "github_url"; 3 | 4 | ALTER TABLE "public"."guild" DROP COLUMN "twitter_url"; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1619844206488_guilds_add_twitter_and_github_urls/up.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."guild" ADD COLUMN "twitter_url" text NULL; 3 | 4 | ALTER TABLE "public"."guild" ADD COLUMN "github_url" text NULL; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1623037326884_create_guild_metadata_table/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."guild_metadata"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1623259967735_alter_table_public_player_drop_column_sc_identity_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "sc_identity_id" text; 2 | ALTER TABLE "public"."player" ALTER COLUMN "sc_identity_id" DROP NOT NULL; 3 | ALTER TABLE "public"."player" ADD CONSTRAINT Player_scIdentityId_key UNIQUE (sc_identity_id); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1623259967735_alter_table_public_player_drop_column_sc_identity_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "sc_identity_id" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624445797214_create_table_public_GuildPosition/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."GuildPosition"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624445797214_create_table_public_GuildPosition/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."GuildPosition"("position" text NOT NULL, PRIMARY KEY ("position") , UNIQUE ("position")); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624445996962_alter_table_public_guild_add_column_position/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "position"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624445996962_alter_table_public_guild_add_column_position/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "position" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624446029497_set_fk_public_guild_position/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" drop constraint "guild_position_fkey"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1624446029497_set_fk_public_guild_position/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" 2 | add constraint "guild_position_fkey" 3 | foreign key ("position") 4 | references "public"."GuildPosition" 5 | ("position") on update cascade on delete restrict; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1624473635605_seed_GuildPosition_and_set_guild_positions/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "public"."GuildPosition" (position) VALUES ('EXTERNAL'); 2 | INSERT INTO "public"."GuildPosition" (position) VALUES ('INTERNAL'); 3 | 4 | UPDATE "public"."guild" SET position = 'EXTERNAL'; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1625633004312_create_table_public_profile_cache/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile_cache 2 | DROP CONSTRAINT profile_cache_player_id_fkey 3 | ; 4 | 5 | DROP TABLE public.profile_cache; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1625902075375_alter_table_public_profile_cache_add_column_last_checked_at/down.sql: -------------------------------------------------------------------------------- 1 | DROP TRIGGER IF EXISTS set_public_profile_cache_last_checked_at 2 | ON public.profile_cache 3 | ; 4 | ALTER TABLE public.profile_cache 5 | DROP COLUMN last_checked_at 6 | ; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1626447130608_alter_table_public_player_add_column_season_xp/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "season_xp"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626447130608_alter_table_public_player_add_column_season_xp/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "season_xp" numeric NOT NULL DEFAULT 0; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626453884524_alter_table_public_player_add_column_pronouns/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "pronouns"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626453884524_alter_table_public_player_add_column_pronouns/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "pronouns" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626583570730_populate_profile_cache/down.sql: -------------------------------------------------------------------------------- 1 | SELECT 1; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626583570730_populate_profile_cache/up.sql: -------------------------------------------------------------------------------- 1 | -- The profile cache relies on there being an entry for every player 2 | -- (when checking for expired profiles, only the cache table is queried). 3 | -- A trigger will add entries for new players as they are added, this 4 | -- creates the entries for the existing players. 5 | INSERT INTO profile_cache (player_id, last_checked_at) 6 | SELECT id, NULL FROM player 7 | ; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1626994599013_add_rank_to_skill_table/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE player_skill ADD COLUMN rank INTEGER DEFAULT NULL; 2 | ALTER TABLE player_skill ADD COLUMN id UUID DEFAULT public.gen_random_uuid() NOT NULL; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1626996347721_modify_primarykey_public_player_skill/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_skill" 2 | add constraint "Player_Skill_unique_key" 3 | primary key ( "skill_id", "player_id" ); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1626996347721_modify_primarykey_public_player_skill/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_skill" drop constraint "Player_Skill_unique_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626996361256_modify_primarykey_public_player_skill/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_skill" drop constraint "player_skill_pkey"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1626996361256_modify_primarykey_public_player_skill/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_skill" 2 | add constraint "player_skill_pkey" 3 | primary key ( "id" ); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1629170747964_alter_table_public_guild_add_column_membership_through_discord/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "membership_through_discord"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1629170747964_alter_table_public_guild_add_column_membership_through_discord/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "membership_through_discord" boolean NOT NULL DEFAULT false; 2 | 3 | -- update metafam row 4 | UPDATE guild SET membership_through_discord = true WHERE discord_id = '629411177947987986'; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1630635244186_create_table_public_PlayerRole/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."PlayerRole"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1630635244186_create_table_public_PlayerRole/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."PlayerRole"("role" text NOT NULL, "label" text NOT NULL, PRIMARY KEY ("role") , UNIQUE ("role")); 2 | 3 | INSERT INTO "public"."PlayerRole" (role, label) 4 | VALUES ('PATRON', 'Patron'), ('BUILDER', 'Builder'), ('ARTIST', 'Artist'), ('SHILLER', 'Shiller'), ('INNKEEPER', 'Innkeeper'), ('DESIGNER', 'Designer'), ('WRITER', 'Writer'); 5 | 6 | -------------------------------------------------------------------------------- /hasura/migrations/1630635736784_add_player_discord_roles/up.sql: -------------------------------------------------------------------------------- 1 | UPDATE guild_metadata 2 | SET discord_metadata = jsonb_set(discord_metadata, '{playerRoles}', '{"PATRON": "771329952691650600", "BUILDER": "764735856157655051", "ARTIST": "764735862461431808", "SHILLER": "764735870464557056", "INNKEEPER": "764736391937916949", "DESIGNER": "790300196771856444", "WRITER": "790300765641768971"}') 3 | WHERE guild_id = (SELECT id FROM guild WHERE guildname = 'metafam'); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1630636031527_create_table_public_player_role/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."player_role"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1630636031527_create_table_public_player_role/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."player_role"("player_id" uuid NOT NULL, "role" text NOT NULL, "rank" integer NOT NULL, PRIMARY KEY ("player_id","role") , FOREIGN KEY ("player_id") REFERENCES "public"."player"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("role") REFERENCES "public"."PlayerRole"("role") ON UPDATE restrict ON DELETE restrict); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1630636068495_drop_table_public_guild_account/up.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."guild_account"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1631675618782_add_details_to_PlayerRole/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE "public"."PlayerRole" DROP COLUMN "description"; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1638233855361_set_fk_public_player_account_player_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_account 2 | DROP CONSTRAINT player_account_player_id_fkey, 3 | ADD CONSTRAINT player_account_player_id_fkey 4 | FOREIGN KEY (player_id) 5 | REFERENCES public.player(id) 6 | ON UPDATE NO ACTION 7 | ON DELETE CASCADE 8 | ; 9 | -------------------------------------------------------------------------------- /hasura/migrations/1638233855361_set_fk_public_player_account_player_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_account 2 | DROP CONSTRAINT player_account_player_id_fkey, 3 | ADD CONSTRAINT player_account_player_id_fkey 4 | FOREIGN KEY (player_id) 5 | REFERENCES public.player(id) 6 | ON UPDATE NO ACTION ON DELETE NO ACTION 7 | ; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1638256399268_alter_table_public_player_alter_column_availability_hours/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" rename column "available_hours" to "availability_hours"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1638256399268_alter_table_public_player_alter_column_availability_hours/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" rename column "availability_hours" to "available_hours"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1638333712988_alter_table_public_profile_cache_alter_column_country/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile_cache" rename column "country_code" to "country"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1638333712988_alter_table_public_profile_cache_alter_column_country/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile_cache" rename column "country" to "country_code"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639455871385_rename_table_public_profile_cache/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" rename to "profile_cache"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639455871385_rename_table_public_profile_cache/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile_cache" rename to "profile"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639455903307_alter_table_public_profile_alter_column_background_image_url/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" rename column "banner_image_url" to "background_image_url"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639455903307_alter_table_public_profile_alter_column_background_image_url/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" rename column "background_image_url" to "banner_image_url"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639457137925_alter_table_public_profile_add_column_pronouns/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player 2 | ADD COLUMN IF NOT EXISTS pronouns text NULL 3 | ; 4 | 5 | UPDATE player 6 | SET pronouns = profile.pronouns 7 | FROM profile 8 | WHERE profile.player_id = player.id 9 | AND player.pronouns IS NULL 10 | ; 11 | 12 | ALTER TABLE public.profile 13 | DROP COLUMN pronouns 14 | ; 15 | -------------------------------------------------------------------------------- /hasura/migrations/1639457137925_alter_table_public_profile_add_column_pronouns/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD COLUMN IF NOT EXISTS pronouns text NULL 3 | ; 4 | 5 | -- A “pronouns” field was previously added to the root player table 6 | UPDATE profile 7 | SET pronouns = player.pronouns 8 | FROM player 9 | WHERE profile.player_id = player.id 10 | AND profile.pronouns IS NULL 11 | ; 12 | -------------------------------------------------------------------------------- /hasura/migrations/1639457861149_alter_table_public_profile_add_column_background_image_url/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."profile" DROP COLUMN "background_image_url"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639457861149_alter_table_public_profile_add_column_background_image_url/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."profile" ADD COLUMN "background_image_url" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639458378073_set_fk_public_profile_player_id/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" drop constraint "profile_player_id_fkey", 2 | add constraint "profile_cache_player_id_fkey" 3 | foreign key ("player_id") 4 | references "public"."player" 5 | ("id") 6 | on update cascade 7 | on delete cascade; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1639458378073_set_fk_public_profile_player_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" drop constraint "profile_cache_player_id_fkey", 2 | add constraint "profile_player_id_fkey" 3 | foreign key ("player_id") 4 | references "public"."player" 5 | ("id") on update cascade on delete cascade; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1639458403546_alter_table_public_profile_add_unique_player_id/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" drop constraint "profile_player_id_key"; 2 | alter table "public"."profile" add constraint "profile_player_id_key" unique ("player_id"); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1639458403546_alter_table_public_profile_add_unique_player_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" drop constraint "profile_cache_player_id_key"; 2 | alter table "public"."profile" add constraint "profile_player_id_key" unique ("player_id"); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1639458853392_alter_table_public_profile_add_column_username/down.sql: -------------------------------------------------------------------------------- 1 | UPDATE player 2 | SET username = profile.username 3 | FROM profile 4 | WHERE profile.player_id = player.id 5 | AND player.username IS NULL 6 | ; 7 | 8 | ALTER TABLE public.profile 9 | DROP COLUMN username 10 | ; 11 | -------------------------------------------------------------------------------- /hasura/migrations/1639458853392_alter_table_public_profile_add_column_username/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD COLUMN IF NOT EXISTS username text NULL UNIQUE 3 | ; 4 | 5 | -- A “username” field was previously added to the root player table 6 | UPDATE profile 7 | SET username = player.username 8 | FROM player 9 | WHERE profile.player_id = player.id 10 | AND profile.username IS NULL 11 | ; 12 | -------------------------------------------------------------------------------- /hasura/migrations/1639476052965_alter_table_public_player_drop_column_pronouns/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "pronouns" text; 2 | ALTER TABLE "public"."player" ALTER COLUMN "pronouns" DROP NOT NULL; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1639476052965_alter_table_public_player_drop_column_pronouns/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "pronouns" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1639476452544_move_view_username_to_profile/up.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE VIEW public.me AS 2 | SELECT player.id, 3 | profile.username, 4 | player.ethereum_address 5 | FROM player 6 | JOIN profile 7 | ON player.id = profile.player_id; 8 | -------------------------------------------------------------------------------- /hasura/migrations/1639476534860_alter_table_public_player_drop_column_username/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "username" text; 2 | ALTER TABLE "public"."player" ALTER COLUMN "username" DROP NOT NULL; 3 | ALTER TABLE "public"."player" ADD CONSTRAINT Player_username_unique_key UNIQUE (username); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1639476534860_alter_table_public_player_drop_column_username/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "username" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1640057892300_alter_table_public_profile_alter_column_image_url/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" rename column "profile_image_url" to "image_url"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1640057892300_alter_table_public_profile_alter_column_image_url/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" rename column "image_url" to "profile_image_url"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1640078300535_move_avaialable_hours_column_to_profile/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE public.player 3 | ADD COLUMN IF NOT EXISTS available_hours integer NULL 4 | ; 5 | 6 | UPDATE player 7 | SET available_hours = profile.available_hours 8 | FROM profile 9 | WHERE profile.player_id = player.id 10 | AND player.available_hours IS NULL 11 | ; 12 | 13 | ALTER TABLE public.profile 14 | DROP COLUMN available_hours 15 | ; 16 | -------------------------------------------------------------------------------- /hasura/migrations/1640078300535_move_avaialable_hours_column_to_profile/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD COLUMN IF NOT EXISTS available_hours integer NULL 3 | ; 4 | 5 | -- needed once b/c down migration partially failed 6 | ALTER TABLE public.player 7 | ADD COLUMN IF NOT EXISTS available_hours integer NULL 8 | ; 9 | 10 | UPDATE profile 11 | SET available_hours = player.available_hours 12 | FROM player 13 | WHERE profile.player_id = player.id 14 | AND profile.available_hours IS NULL 15 | ; 16 | 17 | ALTER TABLE public.player 18 | DROP COLUMN IF EXISTS available_hours CASCADE 19 | ; 20 | -------------------------------------------------------------------------------- /hasura/migrations/1640183267176_move_time_zone_to_profile_table/down.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE public.player 3 | ADD COLUMN IF NOT EXISTS timezone integer NULL 4 | ; 5 | 6 | UPDATE player 7 | SET timezone = profile.time_zone 8 | FROM profile 9 | WHERE profile.player_id = player.id 10 | AND player.timezone IS NULL 11 | ; 12 | 13 | ALTER TABLE public.profile 14 | DROP COLUMN IF EXISTS time_zone 15 | ; 16 | -------------------------------------------------------------------------------- /hasura/migrations/1640183267176_move_time_zone_to_profile_table/up.sql: -------------------------------------------------------------------------------- 1 | 2 | ALTER TABLE public.profile 3 | ADD COLUMN IF NOT EXISTS time_zone text NULL 4 | ; 5 | 6 | ALTER TABLE public.player 7 | ADD COLUMN IF NOT EXISTS timezone integer NULL 8 | ; 9 | 10 | UPDATE profile 11 | SET time_zone = player.timezone 12 | FROM player 13 | WHERE profile.player_id = player.id 14 | AND profile.time_zone IS NULL 15 | ; 16 | 17 | ALTER TABLE public.player 18 | DROP COLUMN IF EXISTS timezone CASCADE 19 | ; 20 | -------------------------------------------------------------------------------- /hasura/migrations/1640517316534_case_insensitive_username_uniqueness/down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX username_insensitive_unique_idx; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1640517316534_case_insensitive_username_uniqueness/up.sql: -------------------------------------------------------------------------------- 1 | CREATE UNIQUE INDEX username_insensitive_unique_idx 2 | ON profile(LOWER(username)) 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532625675_rename_table_public_player_type/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public."ExplorerType" 2 | RENAME TO player_type 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532625675_rename_table_public_player_type/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_type 2 | RENAME TO "ExplorerType" 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532635456_alter_table_public_ExplorerType_alter_column_imageUrl/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public."ExplorerType" 2 | RENAME COLUMN image_url TO "imageUrl" 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532635456_alter_table_public_ExplorerType_alter_column_imageUrl/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public."ExplorerType" 2 | RENAME COLUMN "imageUrl" TO image_url 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532806659_alter_table_public_profile_add_column_explorer_type_title/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | DROP COLUMN IF EXISTS explorer_type_title 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532806659_alter_table_public_profile_add_column_explorer_type_title/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD COLUMN IF NOT EXISTS explorer_type_title text NULL 3 | ; 4 | 5 | UPDATE profile 6 | SET explorer_type_title = "ExplorerType".title 7 | FROM player, "ExplorerType" 8 | WHERE profile.player_id = player.id 9 | AND player.player_type_id = "ExplorerType".id 10 | AND profile.explorer_type_title IS NULL 11 | ; 12 | -------------------------------------------------------------------------------- /hasura/migrations/1640532883795_set_fk_public_profile_explorer_type_title/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | DROP CONSTRAINT profile_explorer_type_title_fkey 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640532883795_set_fk_public_profile_explorer_type_title/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD CONSTRAINT profile_explorer_type_title_fkey 3 | FOREIGN KEY (explorer_type_title) 4 | REFERENCES public."ExplorerType"(title) 5 | ON UPDATE cascade ON DELETE restrict 6 | ; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1640533703696_alter_table_public_profile_add_unique_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | DROP CONSTRAINT profile_id_key 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1640533703696_alter_table_public_profile_add_unique_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.profile 2 | ADD CONSTRAINT profile_id_key UNIQUE (id) 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1641576381077_alter_table_public_player_add_column_profile_layout/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "profile_layout"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1641576381077_alter_table_public_player_add_column_profile_layout/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "profile_layout" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1641640073308_create_table_public_quest_role/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."quest_role"("quest_id" UUID NOT NULL, "role" text NOT NULL, "rank" integer, PRIMARY KEY ("quest_id","role") , FOREIGN KEY ("quest_id") REFERENCES "public"."quest"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("role") REFERENCES "public"."PlayerRole"("role") ON UPDATE restrict ON DELETE restrict, UNIQUE ("quest_id")); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1641944106670_alter_table_public_player_drop_column_player_type_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "player_type_id" int4; 2 | ALTER TABLE "public"."player" ALTER COLUMN "player_type_id" DROP NOT NULL; 3 | ALTER TABLE "public"."player" ADD CONSTRAINT Player_playerTypeId_fkey FOREIGN KEY (player_type_id) REFERENCES "public"."ExplorerType" (id) ON DELETE restrict ON UPDATE cascade; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1641944106670_alter_table_public_player_drop_column_player_type_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "player_type_id" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1642342313101_alter_table_public_quest_role_drop_constraint_quest_role_quest_id_key/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."quest_role" drop constraint "quest_role_quest_id_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1642440758431_remove_eth_address_usernames/up.sql: -------------------------------------------------------------------------------- 1 | UPDATE public.profile 2 | SET username = NULL 3 | WHERE username ~* '^0x[0-9a-z]{40}$' 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1642635473840_alter_table_public_PlayerRole_add_column_basic/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."PlayerRole" ADD COLUMN "basic" boolean NULL DEFAULT true; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1642777028373_add_player_roles/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "public"."PlayerRole" (role, label, description, basic) 2 | VALUES ('BRIDGEBUILDING', 'Bridgebuilding', 'All about fostering connections and enabling the flow of people & resources between different organizations.', false), 3 | ('VIDEOMAKING', 'Videomaking', 'As the name suggests - it''s about production of videos no matter the kind: educational, entertaining, or both.', false), 4 | ('RAINMAKING', 'Rainmaking', 'Making sure value is recognized & project tokens get bought or liquidity added by long term holders.', false); 5 | -------------------------------------------------------------------------------- /hasura/migrations/1643682237699_alter_table_public_player_skill_add_unique_player_id_skill_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_skill 2 | DROP CONSTRAINT player_skill_player_id_skill_id_key 3 | ; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1643682237699_alter_table_public_player_skill_add_unique_player_id_skill_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_skill 2 | ADD CONSTRAINT player_skill_player_id_skill_id_key 3 | UNIQUE (player_id, skill_id) 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1644880076911_clear_profile_layouts/up.sql: -------------------------------------------------------------------------------- 1 | -- shortened the names of some variables and the old versions 2 | -- need to be removed 3 | UPDATE public.player 4 | SET profile_layout = NULL 5 | ; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1645298472918_create_table_public_dao/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."dao"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1645298472918_create_table_public_dao/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."dao" ( 2 | "id" uuid NOT NULL DEFAULT gen_random_uuid(), 3 | "contract_address" text NOT NULL, 4 | "network" text NOT NULL DEFAULT 'mainnet', 5 | "label" text NULL, 6 | "url" text NULL, 7 | "guild_id" uuid NULL, 8 | PRIMARY KEY ("id"), 9 | FOREIGN KEY ("guild_id") REFERENCES "public"."guild"("id") ON UPDATE no action ON DELETE cascade, 10 | UNIQUE ("id"), 11 | UNIQUE ("contract_address") 12 | ); 13 | -------------------------------------------------------------------------------- /hasura/migrations/1645298885991_create_table_public_dao_player/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."dao_player"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1645298885991_create_table_public_dao_player/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."dao_player" ( 2 | "dao_id" uuid NOT NULL, 3 | "player_id" uuid NOT NULL, 4 | "visible" boolean NULL, 5 | PRIMARY KEY ("dao_id","player_id"), 6 | FOREIGN KEY ("dao_id") REFERENCES "public"."dao"("id") ON UPDATE restrict ON DELETE cascade, 7 | FOREIGN KEY ("player_id") REFERENCES "public"."player"("id") ON UPDATE restrict ON DELETE cascade 8 | ); 9 | -------------------------------------------------------------------------------- /hasura/migrations/1645304381138_move_guild_dao_addresses/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM dao WHERE guild_id IS NOT NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1645304381138_move_guild_dao_addresses/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO dao(contract_address, network, guild_id) 2 | SELECT moloch_address, 'mainnet', id FROM guild WHERE moloch_address IS NOT NULL; 3 | 4 | UPDATE dao SET network = 'xdai' WHERE contract_address IN ('0x30c9aa17fc30e4c23a65680a35b33e8f3b4198a2', '0x5219ffb88175588510e9752A1ecaA3cd217ca783'); 5 | -------------------------------------------------------------------------------- /hasura/migrations/1645305421648_alter_table_public_guild_drop_column_moloch_address/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "moloch_address" text; 2 | ALTER TABLE "public"."guild" ALTER COLUMN "moloch_address" DROP NOT NULL; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1645305421648_alter_table_public_guild_drop_column_moloch_address/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "moloch_address" CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1645463938163_guarantee_players_exist_in_the_profile_table/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO profile (player_id) 2 | SELECT id FROM player 3 | WHERE id NOT IN ( 4 | SELECT player_id FROM profile 5 | ) 6 | ; 7 | -------------------------------------------------------------------------------- /hasura/migrations/1645725664368_alter_table_public_dao_add_check_constraint_contract_address_is_valid/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."dao" drop constraint "contract_address_is_valid"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1645725664368_alter_table_public_dao_add_check_constraint_contract_address_is_valid/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."dao" add constraint "contract_address_is_valid" check (contract_address ~ '^0x([a-z0-9-]{40})$'::text); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1650213538515_adds_mww_account_type/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "AccountType" WHERE type = 'MEETWITHWALLET'; -------------------------------------------------------------------------------- /hasura/migrations/1650213538515_adds_mww_account_type/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "AccountType" 2 | (type) VALUES ('MEETWITHWALLET') 3 | ON CONFLICT DO NOTHING -- allow multiple runs 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1654912862034_alter_table_public_guild_add_column_show_discord_announcements/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "show_discord_announcements"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1654912862034_alter_table_public_guild_add_column_show_discord_announcements/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "show_discord_announcements" boolean NOT NULL DEFAULT true; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1658632037425_alter_table_public_dao_add_unique_contract_address_network/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."dao" drop constraint "dao_contract_address_network_key"; 2 | alter table "public"."dao" add constraint "dao_contract_address_key" unique ("contract_address"); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1658632037425_alter_table_public_dao_add_unique_contract_address_network/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."dao" drop constraint "dao_contract_address_key"; 2 | alter table "public"."dao" add constraint "dao_contract_address_network_key" unique ("contract_address", "network"); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1664444070962_alter_table_public_player_add_column_dashboard_layout/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "dashboard_layout"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1664444070962_alter_table_public_player_add_column_dashboard_layout/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "dashboard_layout" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1665058675979_alter_table_public_guild_add_column_profile_layout/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "profile_layout"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1665058675979_alter_table_public_guild_add_column_profile_layout/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "profile_layout" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1666752566691_alter_table_public_guild_drop_column_position/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "position" text; 2 | ALTER TABLE "public"."guild" ALTER COLUMN "position" DROP NOT NULL; 3 | ALTER TABLE "public"."guild" ADD CONSTRAINT guild_position_fkey FOREIGN KEY (position) REFERENCES "public"."GuildPosition" (position) ON DELETE restrict ON UPDATE cascade; 4 | -------------------------------------------------------------------------------- /hasura/migrations/1666752566691_alter_table_public_guild_drop_column_position/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "position" CASCADE; 2 | DROP TABLE "public"."GuildPosition"; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1666753166581_alter_table_public_guild_add_column_sort_position/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" DROP COLUMN "sort_position"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1666753166581_alter_table_public_guild_add_column_sort_position/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."guild" ADD COLUMN "sort_position" integer NULL UNIQUE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1668735029980_alter_table_public_quest_add_column_image/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."quest" DROP COLUMN "image"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1668735029980_alter_table_public_quest_add_column_image/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."quest" ADD COLUMN "image" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1676052460627_alter_table_public_player_add_column_ceramic_profile_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" DROP COLUMN "ceramic_profile_id"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1676052460627_alter_table_public_player_add_column_ceramic_profile_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."player" ADD COLUMN "ceramic_profile_id" text NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1677180693792_alter_table_public_profile_add_check_constraint_no_periods_in_username/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."profile" drop constraint if exists "no_periods_in_username"; 2 | update profile set username = null where username like '%.%'; 3 | alter table "public"."profile" add constraint "no_periods_in_username" check (username ~ '^[A-Za-z0-9_-]+$'::text); -------------------------------------------------------------------------------- /hasura/migrations/1691747987091_add_dework_to_account_type/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "AccountType" WHERE type = 'DEWORK'; -------------------------------------------------------------------------------- /hasura/migrations/1691747987091_add_dework_to_account_type/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "AccountType" 2 | (type) VALUES ('DEWORK') 3 | ON CONFLICT DO NOTHING -- allow multiple runs 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1691995935355_modify_primarykey_public_player_account/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_account" drop constraint "player_account_pkey"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1691995935355_modify_primarykey_public_player_account/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_account" 2 | add constraint "player_account_pkey" 3 | primary key ( "type", "player_id", "identifier" ); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1692017802834_alter_table_public_player_account_add_unique_type_player_id/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player_account" drop constraint "player_account_type_player_id_key"; 2 | alter table "public"."player_account" add constraint "player_account_identifier_type_key" unique ("identifier", "type"); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1692017802834_alter_table_public_player_account_add_unique_type_player_id/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.player_account 2 | DROP CONSTRAINT "Account_identifier_type_key" 3 | ; 4 | 5 | ALTER TABLE public.player_account 6 | DROP CONSTRAINT IF EXISTS player_account_type_player_id_key 7 | ; 8 | ALTER TABLE public.player_account 9 | ADD CONSTRAINT player_account_type_player_id_key 10 | UNIQUE ("type", "player_id") 11 | ; 12 | -------------------------------------------------------------------------------- /hasura/migrations/1694533856915_create_table_public_xp/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."xp"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694533856915_create_table_public_xp/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."xp" ("player_id" uuid NOT NULL, "balance" float8 NOT NULL, "token_address" text NOT NULL, "id" uuid NOT NULL DEFAULT gen_random_uuid(), "initial" float8 DEFAULT 0, "seasonal_balance" float8 DEFAULT 0, PRIMARY KEY ("id") , FOREIGN KEY ("player_id") REFERENCES "public"."player"("id") ON UPDATE no action ON DELETE no action, UNIQUE ("player_id", "token_address")); 2 | CREATE EXTENSION IF NOT EXISTS pgcrypto; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1694534028362_create_table_public_token/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."token"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534075417_alter_table_public_token_add_unique_address/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" drop constraint "token_address_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534075417_alter_table_public_token_add_unique_address/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" add constraint "token_address_key" unique ("address"); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534090526_alter_table_public_token_alter_column_last_offset/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" add constraint "token_last_offset_key" unique ("last_offset"); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534090526_alter_table_public_token_alter_column_last_offset/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" drop constraint "token_last_offset_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534103986_alter_table_public_token_alter_column_guild_id/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" drop constraint "token_guild_id_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534103986_alter_table_public_token_alter_column_guild_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" add constraint "token_guild_id_key" unique ("guild_id"); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534276866_set_fk_public_xp_token_address/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."xp" drop constraint "xp_token_address_fkey"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534276866_set_fk_public_xp_token_address/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."xp" 2 | add constraint "xp_token_address_fkey" 3 | foreign key ("token_address") 4 | references "public"."token" 5 | ("address") on update no action on delete no action; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1694534521995_create_table_public_balance/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."balance"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694534521995_create_table_public_balance/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."balance" ("player_address" text NOT NULL, "token_address" text NOT NULL, "amount" float8 NOT NULL, "id" uuid NOT NULL DEFAULT gen_random_uuid(), "executed_at" timestamptz NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("token_address") REFERENCES "public"."token"("address") ON UPDATE no action ON DELETE no action, UNIQUE ("token_address", "player_address", "executed_at")); 2 | CREATE EXTENSION IF NOT EXISTS pgcrypto; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1694534639232_insert_seed_for_metafam/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- INSERT INTO xp(initial, player_id, token_address, balance) (SELECT total_xp, id, '0xEAeCC18198a475c921B24b8A6c1C1f0f5F3F7EA0', 0 FROM player); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1694534639232_insert_seed_for_metafam/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO xp( 2 | initial, 3 | player_id, 4 | token_address, 5 | balance 6 | ) ( 7 | SELECT 8 | total_xp, 9 | id, 10 | '0xEAeCC18198a475c921B24b8A6c1C1f0f5F3F7EA0', 11 | 0 12 | FROM player 13 | ); 14 | -------------------------------------------------------------------------------- /hasura/migrations/1694790224031_create_table_public_link/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."link"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694790224031_create_table_public_link/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."link" ( 2 | "name" text, "url" text, 3 | "type" text, 4 | "id" uuid NOT NULL DEFAULT gen_random_uuid(), 5 | "player_id" uuid, 6 | "guild_id" uuid, 7 | PRIMARY KEY ("id"), 8 | FOREIGN KEY ("player_id") REFERENCES "public"."player"("id") 9 | ON UPDATE restrict ON DELETE restrict, 10 | FOREIGN KEY ("guild_id") REFERENCES "public"."guild"("id") 11 | ON UPDATE restrict ON DELETE restrict, 12 | UNIQUE ("id") 13 | ); 14 | CREATE EXTENSION IF NOT EXISTS pgcrypto; 15 | -------------------------------------------------------------------------------- /hasura/migrations/1694790348403_create_table_public_LinkType/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."LinkType"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694790348403_create_table_public_LinkType/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."LinkType" ( 2 | "type" text NOT NULL, 3 | "description" text, 4 | PRIMARY KEY ("type"), 5 | UNIQUE ("type") 6 | ); 7 | -------------------------------------------------------------------------------- /hasura/migrations/1694790493159_insert_first_linktype/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "LinkType"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694790493159_insert_first_linktype/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "LinkType" (type, description) VALUES 2 | ('DISCORD', 'Discord'), 3 | ('TWITTER', 'Twitter'), 4 | ('LENSTER', 'Lenster'), 5 | ('FARCASTER', 'Farcaster'), 6 | ('GITHUB', 'GitHub'), 7 | ('TELEGRAM', 'Telegram'), 8 | ('YOUTUBE', 'YouTube'), 9 | ('OTHER', 'Other'); 10 | -------------------------------------------------------------------------------- /hasura/migrations/1694790536010_set_fk_public_link_type/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.link DROP CONSTRAINT link_type_fkey; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1694790536010_set_fk_public_link_type/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."link" 2 | add constraint "link_type_fkey" 3 | foreign key ("type") 4 | references "public"."LinkType" 5 | ("type") on update restrict on delete restrict; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1695821615820_copy_guild_urls_into_link_table/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM link; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1695821615820_copy_guild_urls_into_link_table/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO link(type, guild_id, url, name) (SELECT 'TWITTER', id, twitter_url, 'Twitter' FROM guild WHERE twitter_url is not null); 2 | INSERT INTO link(type, guild_id, url, name) (SELECT 'DISCORD', id, discord_invite_url, 'Discord' FROM guild WHERE discord_invite_url is not null); 3 | INSERT INTO link(type, guild_id, url, name) (SELECT 'GITHUB', id, github_url, 'GitHub' FROM guild WHERE github_url is not null); 4 | -------------------------------------------------------------------------------- /hasura/migrations/1695821815342_alter_table_public_guild_drop_column_discord_invite_url/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild ALTER COLUMN discord_invite_url DROP NOT NULL; 2 | ALTER TABLE public.guild ADD COLUMN discord_invite_url text; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1695821815342_alter_table_public_guild_drop_column_discord_invite_url/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" drop column "discord_invite_url" cascade; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1695821839485_alter_table_public_guild_drop_column_github_url/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild ALTER COLUMN github_url DROP NOT NULL; 2 | ALTER TABLE public.guild ADD COLUMN github_url text; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1695821839485_alter_table_public_guild_drop_column_github_url/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild DROP COLUMN github_url CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1695821850665_alter_table_public_guild_drop_column_twitter_url/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild ALTER COLUMN twitter_url DROP NOT NULL; 2 | ALTER TABLE public.guild ADD COLUMN twitter_url text; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1695821850665_alter_table_public_guild_drop_column_twitter_url/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" drop column "twitter_url" cascade; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1695829101657_alter_table_public_guild_metadata_alter_column_discord_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild_metadata ALTER COLUMN discord_id SET NOT NULL; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1695829101657_alter_table_public_guild_metadata_alter_column_discord_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild_metadata" alter column "discord_id" drop not null; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1696771380738_alter_table_public_guild_add_column_updated_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild DROP COLUMN updated_at CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1696771380738_alter_table_public_guild_add_column_updated_at/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.guild 2 | ADD COLUMN updated_at timestamptz 3 | NULL DEFAULT now() 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1697476299259_alter_table_public_token_add_column_multiplier/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.token DROP COLUMN multiplier CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1697476299259_alter_table_public_token_add_column_multiplier/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" add column "multiplier" float8 2 | not null default '1'; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1697476304617_alter_table_public_token_add_column_created_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.token DROP COLUMN created_at CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1697476304617_alter_table_public_token_add_column_created_at/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.token 2 | ADD COLUMN created_at timestamptz 3 | NULL DEFAULT now() 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1697476310113_alter_table_public_token_add_column_updated_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.token DROP COLUMN updated_at CASCADE; 2 | DROP TRIGGER IF EXISTS set_current_timestamp_updated_at 3 | ON public.token 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1697478812713_alter_table_public_xp_add_column_created_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.xp DROP COLUMN created_at CASCADE; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1697478812713_alter_table_public_xp_add_column_created_at/up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.xp 2 | ADD COLUMN created_at timestamptz 3 | NOT NULL DEFAULT now() 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1697478824592_alter_table_public_xp_add_column_updated_at/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE public.xp DROP COLUMN updated_at CASCADE; 2 | DROP TRIGGER IF EXISTS set_current_timestamp_updated_at 3 | ON public.xp 4 | ; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1698059045592_add_legitimacy_to_guild/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."guild" add column "legitimacy" text 4 | -- null default 'VERIFIED'; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1698059045592_add_legitimacy_to_guild/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" add column "legitimacy" text 2 | null default 'VERIFIED'; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1698059090172_create_guild_legitimacy_table/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."GuildLegitimacy"; -------------------------------------------------------------------------------- /hasura/migrations/1698059090172_create_guild_legitimacy_table/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."GuildLegitimacy" ("value" text, "comment" Text, PRIMARY KEY ("value") ); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1698059148229_insert_into_guild_legitimacy_values/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "public"."GuildLegitimacy" WHERE "value" = 'VERIFIED'; -------------------------------------------------------------------------------- /hasura/migrations/1698059148229_insert_into_guild_legitimacy_values/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "public"."GuildLegitimacy"("comment", "value") VALUES (E'If metagame has approved this guild', E'VERIFIED'); 2 | INSERT INTO "public"."GuildLegitimacy"("comment", "value") VALUES (E'If user adds guild to metagame', E'UNVERIFIED'); 3 | -------------------------------------------------------------------------------- /hasura/migrations/1698059181446_set_up_fk_on_guild_legitimacy/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" drop constraint "guild_legitimacy_fkey"; -------------------------------------------------------------------------------- /hasura/migrations/1698059181446_set_up_fk_on_guild_legitimacy/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild" 2 | add constraint "guild_legitimacy_fkey" 3 | foreign key ("legitimacy") 4 | references "public"."GuildLegitimacy" 5 | ("value") on update restrict on delete cascade; 6 | -------------------------------------------------------------------------------- /hasura/migrations/1698059226912_insert_into_player_column_membership_metadata/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."player" add column "membership_metadata" jsonb 4 | -- null; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1698059226912_insert_into_player_column_membership_metadata/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."player" add column "membership_metadata" jsonb 2 | null; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1698059323860_alter_table_public_guild_player_add_column_visible/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."guild_player" add column "visible" boolean 4 | -- not null default 'true'; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1698059323860_alter_table_public_guild_player_add_column_visible/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild_player" add column "visible" boolean 2 | not null default 'true'; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1698081953289_alter_table_public_token_alter_column_last_offset/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" rename column "last_block_height" to "last_offset"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1698081953289_alter_table_public_token_alter_column_last_offset/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."token" rename column "last_offset" to "last_block_height"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1698237245255_insert_into_public_QuestStatus/down.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM "public"."QuestStatus" WHERE "status" = 'ARCHIVED'; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1698237245255_insert_into_public_QuestStatus/up.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO "public"."QuestStatus"("status") VALUES (E'ARCHIVED'); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1699627208220_alter_table_public_guild_player_add_unique_guild_id_player_id/down.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild_player" drop constraint "guild_player_guild_id_player_id_key"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1699627208220_alter_table_public_guild_player_add_unique_guild_id_player_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild_player" add constraint "guild_player_guild_id_player_id_key" unique ("guild_id", "player_id"); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1700812865781_alter_table_public_guild_player_add_column_position/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."guild_player" add column "position" integer 4 | -- null; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1700812865781_alter_table_public_guild_player_add_column_position/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."guild_player" add column "position" integer 2 | null; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1700986294802_alter_table_public_dao_player_add_column_position/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."dao_player" add column "position" integer 4 | -- null; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1700986294802_alter_table_public_dao_player_add_column_position/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."dao_player" add column "position" integer 2 | null; 3 | -------------------------------------------------------------------------------- /hasura/migrations/1702557346495_create_table_public_pinned_questchains/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "public"."pinned_questchains"; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1702557346495_create_table_public_pinned_questchains/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE "public"."pinned_questchains" ("player_id" uuid NOT NULL, "questchain_id" text NOT NULL, "id" uuid NOT NULL, PRIMARY KEY ("player_id","questchain_id") , FOREIGN KEY ("player_id") REFERENCES "public"."player"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));COMMENT ON TABLE "public"."pinned_questchains" IS E'questchains pinned to a specific user\'s profile'; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1702557439510_alter_table_public_pinned_questchains_alter_column_id/down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "public"."pinned_questchains" ALTER COLUMN "id" drop default; 2 | -------------------------------------------------------------------------------- /hasura/migrations/1702557439510_alter_table_public_pinned_questchains_alter_column_id/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."pinned_questchains" alter column "id" set default gen_random_uuid(); 2 | -------------------------------------------------------------------------------- /hasura/migrations/1706189348084_alter_table_public_quest_add_column_reward/down.sql: -------------------------------------------------------------------------------- 1 | -- Could not auto-generate a down migration. 2 | -- Please write an appropriate down migration for the SQL below: 3 | -- alter table "public"."quest" add column "reward" integer 4 | -- null default '0'; 5 | -------------------------------------------------------------------------------- /hasura/migrations/1706189348084_alter_table_public_quest_add_column_reward/up.sql: -------------------------------------------------------------------------------- 1 | alter table "public"."quest" add column "reward" integer 2 | null default '0'; 3 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "npmClient": "yarn", 3 | "version": "independent" 4 | } 5 | -------------------------------------------------------------------------------- /packages/@types/@orbisclub__orbis-sdk/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@orbisclub/orbis-sdk'; 2 | -------------------------------------------------------------------------------- /packages/@types/@walletconnect__web3-provider/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@walletconnect/web3-provider'; 2 | -------------------------------------------------------------------------------- /packages/@types/js-base64/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'js-base64'; 2 | -------------------------------------------------------------------------------- /packages/@types/spacetime-informal/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'spacetime-informal' { 2 | export function find(tz: string): string; 3 | 4 | export function display(geo: string): DisplayFormat; 5 | 6 | export function version(): string; 7 | 8 | export interface DisplayFormat { 9 | iana: string; 10 | standard: TimeZoneInfo; 11 | daylight: TimeZoneInfo; 12 | } 13 | 14 | export interface TimeZoneInfo { 15 | name: string; 16 | abbrev: string; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/backend/jest.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | testEnvironment: 'node', 3 | preset: 'ts-jest', 4 | moduleDirectories: ['node_modules', 'src'], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/backend/src/handlers/actions/composeDB/routes.ts: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | 3 | import { asyncHandlerWrapper } from '#lib/apiHelpers'; 4 | import linkProfileNode from '#handlers/actions/composeDB/linkProfileNode/handler'; 5 | import updateSingleProfileHandler from '#handlers/actions/composeDB/updateSingleProfile/handler'; 6 | 7 | export const routes = express.Router(); 8 | 9 | routes.post('/linkProfileNode', asyncHandlerWrapper(linkProfileNode)); 10 | routes.post( 11 | '/updateCachedProfile', 12 | asyncHandlerWrapper(updateSingleProfileHandler), 13 | ); 14 | -------------------------------------------------------------------------------- /packages/backend/src/handlers/graphql/queries/dao.ts: -------------------------------------------------------------------------------- 1 | export const DaoQueries = /* GraphQL */ ` 2 | query GetPlayerDaos($ethereumAddress: String) { 3 | dao_player( 4 | where: { Player: { ethereumAddress: { _eq: $ethereumAddress } } } 5 | ) { 6 | daoId 7 | playerId 8 | Dao { 9 | contractAddress 10 | network 11 | } 12 | } 13 | } 14 | 15 | query GetDaosByAddress($contractAddress: [String!]) { 16 | dao(where: { contractAddress: { _in: $contractAddress } }) { 17 | id 18 | contractAddress 19 | network 20 | } 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /packages/backend/src/handlers/remote-schemas/resolvers/balancerPolygon/queries.ts: -------------------------------------------------------------------------------- 1 | export const GetPoolTokenData = /* GraphQL */ ` 2 | query GetPoolTokenData($address: Bytes!) { 3 | pools(where: { address: $address }) { 4 | id 5 | totalShares 6 | tokens { 7 | id 8 | symbol 9 | balance 10 | token { 11 | id 12 | symbol 13 | latestUSDPrice 14 | } 15 | } 16 | } 17 | } 18 | `; 19 | -------------------------------------------------------------------------------- /packages/backend/src/handlers/remote-schemas/routes.ts: -------------------------------------------------------------------------------- 1 | import express, { Application } from 'express'; 2 | import { graphqlHTTP } from 'express-graphql'; 3 | 4 | import { schema } from './schema.js'; 5 | 6 | export const remoteSchemaRoutes = express.Router(); 7 | 8 | remoteSchemaRoutes.use( 9 | '/graphql', 10 | graphqlHTTP({ 11 | schema, 12 | graphiql: true, 13 | }) as Application, 14 | ); 15 | -------------------------------------------------------------------------------- /packages/backend/src/lib/balancerPolygonClient.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLClient } from 'graphql-request'; 2 | 3 | import { CONFIG } from '../config.js'; 4 | import { getSdk } from './autogen/balancer-sdk.js'; 5 | 6 | export const balancerPolygonGraphClient = getSdk( 7 | new GraphQLClient(CONFIG.balancerPolygonGraphURL), 8 | ); 9 | -------------------------------------------------------------------------------- /packages/backend/src/lib/ethereum.ts: -------------------------------------------------------------------------------- 1 | import { getContract, PublicClient } from 'viem'; 2 | 3 | import ERC20_ABI from './abis/ERC20.json' assert { type: 'json' }; 4 | 5 | export const getERC20Contract = ( 6 | contractAddress: `0x${string}`, 7 | client: PublicClient 8 | ) => ( 9 | getContract({ 10 | address: contractAddress, 11 | abi: ERC20_ABI, 12 | client, 13 | }) 14 | ) 15 | -------------------------------------------------------------------------------- /packages/backend/src/lib/seedGraphClient.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLClient } from 'graphql-request'; 2 | 3 | import { CONFIG } from '../config.js'; 4 | import { getSdk } from './autogen/seedgraph-sdk.js'; 5 | 6 | export const seedGraphClient = getSdk(new GraphQLClient(CONFIG.seedGraphURL)); 7 | -------------------------------------------------------------------------------- /packages/backend/src/types.ts: -------------------------------------------------------------------------------- 1 | export type PlayerMembershipGuildType = 'guild' | 'dao'; 2 | 3 | export interface PlayerMembershipMetadata { 4 | guildType: PlayerMembershipGuildType; 5 | guildId: string; 6 | position: number; 7 | } 8 | -------------------------------------------------------------------------------- /packages/backend/tests/lib/daoHausClient.test.ts: -------------------------------------------------------------------------------- 1 | import { getClient } from '../../src/lib/daoHausClient'; 2 | 3 | describe('daoHausClient', () => { 4 | it('should throw error for unknown chain', () => { 5 | expect(() => getClient('garbage')).toThrow(); 6 | }); 7 | 8 | it('should return a client when chain is configured', () => { 9 | expect(getClient('ethereum')).toBeDefined(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/design-system/eslint.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rules: { 3 | "no-unused-vars": "off", 4 | "@typescript-eslint/no-unused-vars": "warn" 5 | }, 6 | overrides: [ 7 | { 8 | "files": ["./src/**/*.{ts,tsx,js,jsx}", "./stories/**/*.{ts,tsx,js,jsx}"], 9 | "rules": { 10 | "no-console": "off" 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/src/LoadingState.tsx: -------------------------------------------------------------------------------- 1 | import type { CenterProps } from '@chakra-ui/react'; 2 | import { Center, Spinner } from '@chakra-ui/react'; 3 | import React from 'react'; 4 | 5 | export const LoadingState: React.FC< 6 | CenterProps & { 7 | color?: string; 8 | } 9 | > = ({ color = 'purple.500', ...props }) => ( 10 |