Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.3.1 #156

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
cde806b
Remove unused migration. (#111)
FiberMan Oct 27, 2022
0eef7d2
Add M2 review comments
bidzyyys Oct 21, 2022
764f40c
USE ORML dependencies from github instead of local version
vayesy Nov 2, 2022
b023d59
fix: rm warnings
2075 Nov 11, 2022
41fbf3c
M2 review fixes (#115)
FiberMan Dec 13, 2022
328330e
feat: update member state (#119)
2075 Dec 16, 2022
e6b8f77
feat: battlepass (#120)
FiberMan Dec 16, 2022
41fbc95
Allow users to join to prime type org (#121)
vayesy Dec 19, 2022
6f4762a
Create Battlepass pallete
FiberMan Dec 15, 2022
d4dd5e7
Add Battlepass activation, refactor.
FiberMan Dec 22, 2022
03fcd97
Merge pull request #122 from gamedaoco/227-create-battlepass-pallet
FiberMan Dec 22, 2022
faa8262
Update lib.rs (#123)
vayesy Dec 29, 2022
6246e36
add levels and rewards to battlepass. (#124)
FiberMan Jan 13, 2023
a91178e
Unit tests for Battlepass (#125)
FiberMan Jan 18, 2023
f3af19a
Add wallet for battlepass Bot
FiberMan Jan 19, 2023
ce6f30f
Merge pull request #126 from gamedaoco/add-wallet-for-battlepass-bot
FiberMan Jan 19, 2023
54cb69b
feat: change root_or_governance for approval
Jan 24, 2023
f913a35
feat: benchmarks for battlepass
FiberMan Feb 6, 2023
8e2e446
feat: bump substrate version from 0.9.28 to 0.9.36
FiberMan Feb 13, 2023
5623c56
Merge pull request #128 from gamedaoco/bump-substrate-to-0.9.36
FiberMan Feb 13, 2023
d45eb36
Merge pull request #127 from gamedaoco/create-benchmarks-for-battlepass
FiberMan Feb 13, 2023
c7754eb
Add extrinsic descriptions for Battlepass.
FiberMan Feb 15, 2023
59a6327
feat: Update Battlepass and Reward (#130)
FiberMan Feb 16, 2023
ee732d9
feat:tests for update_battlepass and update_reward
FiberMan Feb 16, 2023
78c2a3c
feat: new benchmarks for battlepass.
FiberMan Feb 17, 2023
7a04187
feat: extend bot privileges
FiberMan Feb 20, 2023
4e320d8
feat: claim battlepass by bot
FiberMan Feb 21, 2023
d5370b7
feat: add, remove levels by bot
FiberMan Feb 22, 2023
a76d996
update benchmarks
FiberMan Feb 22, 2023
a73a97f
feat: use unique NFT IDs
FiberMan Feb 23, 2023
a81ee0c
Merge pull request #135 from gamedaoco/unique-nfts
FiberMan Feb 23, 2023
b840d41
feat: remove ability to claim battlepass for self
FiberMan Feb 23, 2023
fc13b31
allows non org members to participate in battlepass
vayesy Feb 23, 2023
d0d85f2
finish tests, update weights
FiberMan Feb 24, 2023
6dcd13d
allows root account to add bot account to the battlepass
vayesy Feb 24, 2023
ffbff31
Correctly validate `add_bot` caller
vayesy Feb 25, 2023
b899aff
fix: update_battlepass should update any number of fields
FiberMan Feb 25, 2023
8435fcb
Merge pull request #139 from gamedaoco/fix-update-battlepass
FiberMan Feb 26, 2023
4747549
Remove RMRK
FiberMan Feb 28, 2023
96e6755
fix: should create battlepass if there is active one
FiberMan Feb 28, 2023
68ca89c
feat: add option for name and cid (#142)
2075 Mar 6, 2023
d084aca
feat: bump substrate version from 0.9.36 to 0.9.38 (#141)
FiberMan Mar 9, 2023
ac9e413
Revert "feat: bump substrate version from 0.9.36 to 0.9.38 (#141)" (#…
vayesy Mar 9, 2023
09f9165
Update substrate v36 to v38 (#145)
vayesy Mar 9, 2023
0e8b48d
fix: update_reward should update any number of fields (#146)
FiberMan Mar 13, 2023
a58aba0
feat: allow bot to update the battlepass
FiberMan Mar 14, 2023
c6cca4d
Merge pull request #113 from gamedaoco/release-1.2.0
vayesy Mar 15, 2023
2cc4c03
feat: use provided CID as a metadata for NFT.
FiberMan Mar 16, 2023
87c0101
Merge pull request #147 from gamedaoco/update-nft-metadata
vayesy Mar 17, 2023
5fd528e
Merge pull request #149 from gamedaoco/release-1.3.0
vayesy Mar 17, 2023
dcab08a
address comments from SBP3 review
FiberMan Mar 22, 2023
95fd935
Substrate upgrade 0.9.38 to 0.9.39
FiberMan Apr 14, 2023
e0d0bf2
Substrate upgrade 0.9.39 to 0.9.40
FiberMan Apr 14, 2023
73f2988
remove deprecated macros
FiberMan Apr 15, 2023
5782cfc
Merge pull request #150 from gamedaoco/sbp-m3-review
FiberMan Apr 15, 2023
827e662
Merge pull request #151 from gamedaoco/substrate-upgrade-0.9.38-to-0.…
FiberMan Apr 15, 2023
0b6262a
replace pallet_uniques with pallet_nfts (#152)
FiberMan Apr 25, 2023
f8175c2
fix(battlepass): update permissions (#153)
2075 May 10, 2023
9e65ed7
feat: update creates, readme
May 14, 2024
7dfcc39
feat: bump to polkadot + orml v0.9.43 (#155)
2075 May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# gamedao-protocol
# GAMEDAO PROTOCOL

GameDAO Protocol is a toolbox to enable setup and operation of unstoppable on chain collectives. It offers governance via proposals for members of a collective, helping to notarize and enforce decisions, e.g. treasury spending. Collectives can also fundraise through the protocol, enabling them to kickstart their efforts.

### Copyright

(c) GameDAO AG
69 changes: 69 additions & 0 deletions battlepass/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[package]
name = "gamedao-battlepass"
version = "1.3.0"
authors = ["zero.io","gamedao.co"]
repository = "https://github.com/gamedaoco/gamedao-protocol"
edition = "2018"
license = "GPL-3.0-or-later"
description = "BattlePass pallet provides functionality to create, manage and participate in battlepasses."

[dependencies]
serde = { version = "1.0.143", default-features = false }
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-storage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features=false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true }

pallet-nfts = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }

orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.43", default-features = false }

gamedao-control = { package = "gamedao-control", path = "../control", default-features = false }
gamedao-traits = { package = "gamedao-traits", path = "../traits", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.43" }
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }

pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.43", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.43", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.43", default-features = false }

[features]
default = ['std']
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"gamedao-traits/runtime-benchmarks",
"gamedao-control/runtime-benchmarks",
"pallet-nfts/runtime-benchmarks"
]
std = [
"serde/std",
'codec/std',
"scale-info/std",

"frame-support/std",
"frame-system/std",
"frame-benchmarking/std",

"sp-std/std",

"pallet-balances/std",

"orml-traits/std",
"orml-tokens/std",
"orml-currencies/std",

"pallet-nfts/std",

"gamedao-control/std",
"gamedao-traits/std",
]
try-runtime = ["frame-support/try-runtime"]
142 changes: 142 additions & 0 deletions battlepass/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# BattlePass Beta



## Definitions + Dictionary

- Guild -> A group of people gaming together.
also Clan, Team, Crew, Squad, Party

- BattlePass (BP) -> A subscription based engagement protocol for gaming guilds

- Quest (Q) -> A group of tasks, bounties, etc on related games and media, like discord, twitter, twitch, Fortnite, CS, ... resulting in receiving points (XP,REP,TRUST,...) upon verifiable completion of its parts.

- Quest Progress (QP) -> ( NonBinary / Float ) Fulfilled 0...1 of Quest Q

- Points (P) -> Named individually in a guild, reference score based on the following

- XP -> Experience Points based on tasks fulfilled in context of a Quest and BattlePass, may reset each season

- REP -> Reputation Points based on street cred of a user on global level

- TRUST -> Trust level based on verifiable credentials, e.g. connect twitter, discord, twitch, web3name, etc

- Level (L) -> achieved by collecting points

- Achievement ->
1 NFT proof of achievement
2 this enables account controller to redeem a reward
3 to mint an achievement we use a template struct defining ->
a. data struct for the immutable nft part / configuration
b. data struct for the im/mutable payload part


## Overview

BattlePass is a subscription based engagement protocol for gaming guilds. It enables claiming and dropping rewards based on completing quests. These achievements are based on verifiable activity and contribute to xp, rep, trust in SENSE.


## BattlePass for DAOs

1. It can be invoked by a DAO through staking (1000) GAME token on the protocol treasury.

2. Staking automatically enables the BattlePass section in a DAO.

3. The DAO invoking wishing to enable BattlePass needs verified credentials and be in good standing:
- (XP) > (100)
- (REP) > (100)
- (TRUST) > (100)
- MEMBERS > 10

BattlePass starts operating immediately when the staking deposit has been transferred. To make proper use of it, some defaults are in place to make it work:

- By default a BattlePass utilizes xp,rep,trust in relation to a DAO

- therefore a DAO specific map for xp,rep,trust has to be setup on DAO creation

- a BP operates in seasons. a season is by default 100 days based on the respective blocktime of the host chain this results with 6s blocktime in in 10 * 60 * 24 = 14400 blocks per day and 144000 blocks per season.

- after a season has finished, a new season starts, resetting the achieved score

- a user subscribes for a BP over one to n seasons

- a user collects points during the season based on their verifiable activity in games, on socials, etc

- based on a score table, user is allowed to claim rewards from a level L and can use points P to claim rewards up to level L

- P are calculated based on a formula like:

*** DRAFT ***

P =
MAP *
( 1 * subscription_mul ) + -> local
0 * ( -> activated?
1 +
XP( season ) * -> local
( 1 + REP / 100 ) * -> global
( 1 + TRUST * 100 ) -> global
)

- where MAP is the individual mapping for achievements / levels, etc

everybody can play, but only with a subscription you get the multiplier to make real progress into the claimable scores

*** DRAFT ***

- rewards will be delivered as nft based collectable, like
- proof of achievement
- proof of participation
- ticket
- collectable
...

- DAO needs to create a reward map based on a
score_threshold ST,
a reward object R,
a price in points P:

{ ST , ( R , P ) }

example: 1000, ( item_drop_dragonball_nft, 0 )

## BattlePass for gamers and creators

Battlepass provides the following functions:

0. Signup with discord **and** wallet

1. Connecting the following social accounts to start collecting points
- discord -> 1st poc e2e
- twitter -> 2nd due to relevance
- twitch -> tbd
- polkadot compatible wallet -> talisman preferred
- suggestions welcome

2. One-time or subscription payment for a Battlepass settled through PSP in FIAT or directly via stablecoin (USDT)

3. Browsing the rewards showing
- xp bar
- cta to join if not joined
- levels and/or required points to claim reward x
- enabling claim button when score is sufficient

4. Browsing Quests and Quest Progress


## Pallet

### Sense

map global ( season, xp , rep, trust )
map local ( season, xp , rep, trust )

### BattlePass

### Control



###

© 2022 GameDAO AG
Loading