Skip to content

Commit

Permalink
New beta realm (#718)
Browse files Browse the repository at this point in the history
**⚠️ This PR is base for Base Realm - all future commits and PRs
connected with adding this realm should be branched out of this one**

Resolves #711 

## **What has been done**
- Added new realm to the map
- Added "New realm" label to recent realm
- Added blinking animation to recent realm
- After clicking on realm, blinking animation and "New realm" label
disappears (data for all clicked realm is stored in `localStorage`
- Connected to contracts

![Zrzut ekranu 2023-11-21 o 14 22
37](https://github.com/tahowallet/dapp/assets/73061939/c6241847-4e75-4191-8cab-fa4d407b2a4d)
  • Loading branch information
jagodarybacka authored Nov 23, 2023
2 parents 963b48b + 17874a4 commit 9c439a9
Show file tree
Hide file tree
Showing 51 changed files with 769 additions and 182 deletions.
149 changes: 101 additions & 48 deletions src/assets/questline-data.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,112 @@
{
"realms": [
{
"realmId": "4",
"questlineName": "Transact on PGN",
"description": "Gitcoin is a community that focuses on incentivizing and supporting open-source development. Gitcoin aims to foster collaboration and sustainability within the open-source ecosystem by providing a marketplace for matching developers with projects and funding opportunitie and rewards for their contributions.",
"quests": [
{
"name": "Spend gas on PGN (Public Goods Network)—more gas is better!",
"description": "The more gas you use on PGN compared to other members of this realm in a week, the more of the weekly XP drop you will get. This means you can still get more XP if you execute fewer bigger transactions!"
}
]
"realms": [
{
"realmId": "4",
"questlineName": "Transact on PGN, human!",
"description": "Gitcoin is a community that focuses on incentivizing and supporting open-source development. Gitcoin aims to foster collaboration and sustainability within the open-source ecosystem by providing a marketplace for matching developers with projects and funding opportunities and rewards for their contributions.",
"quests": [
{
"id": "4_1",
"name": "Spend gas on PGN (Public Goods Network)—more gas is better!",
"description": "The more gas you use on PGN compared to other members of this realm in a week, the more of the weekly XP drop you will get. This means you can still get more XP if you execute fewer bigger transactions!"
},
{
"realmId": "7",
"questlineName": "Use your CyberWallet",
"description": "Cyberconnect is a Web3 social ecosystem that goes beyond likes and shares. It allows developers to create social applications where users have complete control over their digital identity, content, and connections ",
"quests": [
{
"name": "Spend gas using the CyberWallet associated with your address",
"description": "The more gas you use with your CyberWallet across networks compared to other members of this realm in a week, the more of the weekly XP drop you will get."
}
]
"id": "4_2",
"name": "Increase your Gitcoin Passport score",
"description": "The more you increase your Gitcoin Passport score in a week, the more of the weekly XP drop you will get.",
"isNew": true
}
]
},
{
"realmId": "7",
"questlineName": "Use your CyberWallet, collect essence, and mint W3ST",
"description": "Cyberconnect is a Web3 social ecosystem that goes beyond likes and shares. It allows developers to create social applications where users have complete control over their digital identity, content, and connections ",
"quests": [
{
"id": "7_1",
"name": "Spend gas using the CyberWallet associated with your address",
"description": "The more gas you use with your CyberWallet across networks compared to other members of this realm in a week, the more of the weekly XP drop you will get."
},
{
"realmId": "9",
"questlineName": "Transact on Arbitrum",
"description": "Arbitrum DAO is a decentralized autonomous organization (DAO) built on the Ethereum blockchain. At its core, the Arbitrum DAO is a community-driven governance mechanism that allows $ARB token holders to propose and vote on changes to the organization and the technologies it governs.",
"quests": [
{
"name": "Execute individual transactions on Arbitrum",
"description": "The more contract interactions you execute on Arbitrum compared to other members of this realm in a week, the more of the weekly XP drop you will get."
}
]
"id": "7_2",
"name": "Mint W3ST",
"description": "The more W3ST you mint, the more of the weekly XP drop you will get.",
"isNew": true
},
{
"realmId": "19",
"questlineName": "Eat your OATs",
"description": "Galxe is the largest web3 credential data network that is helping projects and developers to build robust decentralized products. Earn oat, NFTs, and tokens by contributing to your favorite Web3 communities.",
"quests": [
{
"name": "Claim OATs during the week",
"description": "The more OATs you claim across networks compared to other members of this realm in a week, the more of the weekly XP drop you will get."
}
]
"id": "7_3",
"name": "Collect post essence",
"description": "The more post essence you collect, the more of the weekly XP drop you will get.",
"isNew": true
}
]
},
{
"realmId": "8",
"questlineName": "Transact on Base",
"description": "Base is a secure, low-cost, builder-friendly Ethereum L2 built to bring the next billion users onchain. Base is incubated within Coinbase and plans to progressively decentralize in the years ahead. The Base Realm believes that decentralization is critical to creating an open, global cryptoeconomy that is accessible to everyone.",
"quests": [
{
"id": "8_1",
"name": "Interact with unique contracts on Base",
"description": "The more interactions you execute with different unique contracts on Base compared to other members of this realm in a week, the more of the weekly XP drop you will get."
}
]
},
{
"realmId": "9",
"questlineName": "Transact on Arbitrum---especially on Fluidity",
"description": "Arbitrum DAO is a decentralized autonomous organization (DAO) built on the Ethereum blockchain. At its core, the Arbitrum DAO is a community-driven governance mechanism that allows $ARB token holders to propose and vote on changes to the organization and the technologies it governs.",
"quests": [
{
"id": "9_1",
"name": "Interact with unique contracts on Arbitrum",
"description": "The more interactions you execute with different unique contracts on Arbitrum compared to other members of this realm in a week, the more of the weekly XP drop you will get."
},
{
"id": "9_2",
"name": "Earn fUSDC rewards using Fluidity",
"description": "The more fUSDC rewards you earn using Fluidity in a week, the more of the weekly XP drop you will get.",
"isNew": true
}
]
},
{
"realmId": "19",
"questlineName": "Eat your OATs, unless they're minty NFTs",
"description": "Galxe is the largest web3 credential data network that is helping projects and developers build robust decentralized products. Earn oat, NFTs, and tokens by contributing to your favorite Web3 communities.",
"quests": [
{
"id": "19_1",
"name": "Claim OATs during the week",
"description": "The more OATs you claim across networks compared to other members of this realm in a week, the more of the weekly XP drop you will get."
},
{
"id": "19_2",
"name": "Mint NFTs during the week using the Galxe space station",
"description": "The more NFTs you mint via a Galxe [`SpaceStation` contract](https://docs.galxe.com/developer/smart-contract/contracts/spacestation/), the more of the weekly XP drop you will get.",
"isNew": true
}
]
},
{
"realmId": "22",
"questlineName": "The bribes must flow, over the FraxFerry and far away",
"description": "Frax Finance is a protocol that issues decentralized stablecoins and the subprotocols to support them, creating a unique self-sufficient DeFi ecosystem",
"quests": [
{
"id": "22_1",
"name": "Claim bribes on Votemarket",
"description": "Earn $XP by voting for gauges and claiming bribes if available."
},
{
"realmId": "22",
"questlineName": "The bribes must flow",
"description": "Frax Finance is a protocol that issues decentralized stablecoins and the subprotocols to support them, creating a unique self-sufficient DeFi ecosystem",
"quests": [
{
"name": "Claim bribes on Votemarket",
"description": "Earn $XP by voting for gauges and claiming bribes if available."
}
]
"id": "22_2",
"name": "Bridge tokens using FraxFerry",
"description": "The more unique tokens you bridge over FraxFerry, the more of the weekly XP drop you will get.",
"isNew": true
}
]
]
}
]
}
6 changes: 6 additions & 0 deletions src/assets/xp-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
],
"leaderboard": "leaderboard.json"
},
"8": {
"rootFolder": "/assets/xp/base",
"claimsFolder": "/assets/xp/base/claims",
"xpGlossary": [],
"leaderboard": null
},
"9": {
"rootFolder": "/assets/xp/arbitrum",
"claimsFolder": "/assets/xp/arbitrum/claims",
Expand Down
Empty file added src/assets/xp/base/claims/.keep
Empty file.
1 change: 1 addition & 0 deletions src/redux-state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export * from "./selectors/claim"
export * from "./selectors/island"
export * from "./selectors/leaderboard"
export * from "./selectors/population"
export * from "./selectors/quest"
export * from "./selectors/realm"
export * from "./selectors/season"
export * from "./selectors/staking"
Expand Down
13 changes: 13 additions & 0 deletions src/redux-state/selectors/quest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable import/prefer-default-export */
import { createSelector } from "@reduxjs/toolkit"
import { selectRealmById } from "./realm"

export const hasNewQuests = createSelector(selectRealmById, (realmData) =>
realmData?.quests.some((quest) => quest.isNew)
)

export const selectNewQuestsByRealm = createSelector(
selectRealmById,
(realmData) =>
realmData?.quests ? realmData?.quests.filter((quest) => quest.isNew) : []
)
4 changes: 2 additions & 2 deletions src/redux-state/thunks/island.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
setRealmDisplayedPopulation,
} from "redux-state/slices/island"
import {
REALMS_WITH_CONTRACT_NAME,
REALMS_WITH_CONTRACT_ADDRESS,
TAHO_ADDRESS,
getQuestlineData,
} from "shared/constants"
Expand Down Expand Up @@ -60,7 +60,7 @@ export const initRealmsDataFromContracts = createDappAsyncThunk(
const realmData =
cachedRealmData ||
(await transactionService.read(getAllRealmsData, {
realms: REALMS_WITH_CONTRACT_NAME,
realms: REALMS_WITH_CONTRACT_ADDRESS,
}))

if (realmData !== null) {
Expand Down
Binary file added src/shared/assets/clouds/cloud-bottom-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/shared/assets/new-quest-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions src/shared/assets/new-quest-label.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions src/shared/assets/new-realm-label.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9c439a9

Please sign in to comment.