-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add infinity referrals logic. DevOps can specified if on specific lvl…
… user can get infinity referral code
- Loading branch information
Showing
16 changed files
with
303 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
log: | ||
level: debug | ||
disable_sentry: true | ||
|
||
db: | ||
url: postgres://auth:auth@geo-auth-db:5432/auth?sslmode=disable | ||
|
||
listener: | ||
addr: :80 | ||
|
||
jwt: | ||
secret_key: 0xbcb14d08dc1472b80f49eaf72f0873ac314a7146083bbf3694df8c3238949f2ec0971427f5509382a2812c700e541e328cd6ec65a1383c3ca435cdf55862dc4b | ||
access_expiration_time: 1h | ||
refresh_expiration_time: 72h | ||
|
||
cookies: | ||
domain: "*" | ||
secure: true | ||
same_site: 4 | ||
|
||
auth_verifier: | ||
verification_key_path: "./auth_verification_key.json" | ||
disabled: true | ||
|
||
passport_verifier: | ||
verification_key_path: "./passport_verification_key.json" | ||
allowed_age: 18 | ||
allowed_identity_timestamp: 1715698750 | ||
|
||
root_verifier: | ||
rpc: https://rpc.evm.node1.mainnet-beta.rarimo.com:443 | ||
contract: 0x59123B0D0f95EB23183879f476B6939cEFd2cF3B | ||
request_timeout: 10s | ||
|
||
sig_verifier: | ||
verification_key: "bcb14d08dc1472b80f49eaf72f0873ac314a7146083bbf3694df8c3238949f2ec0971427f5509382a2812c700e541e328cd6ec65a1383c3ca435cdf55862dc4b" | ||
|
||
points: | ||
admin: 0x8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 | ||
url: http://geo-points | ||
default_verified: true | ||
disabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
log: | ||
level: debug | ||
disable_sentry: true | ||
|
||
db: | ||
url: postgres://points:points@geo-points-db:5432/points?sslmode=disable | ||
|
||
listener: | ||
addr: :80 | ||
|
||
event_types: | ||
types: | ||
- name: passport_scan | ||
title: Points for passport scan | ||
reward: 10 | ||
description: Get points for scan passport and share data | ||
short_description: Short description | ||
frequency: one-time | ||
action_url: https://... | ||
logo: https://... | ||
auto_claim: true | ||
- name: free_weekly | ||
title: Free weekly points | ||
reward: 1 | ||
frequency: weekly | ||
description: Get free points every week by visiting the platform and claiming your reward | ||
short_description: Short description | ||
- name: be_referred | ||
title: Referral welcome bonus | ||
reward: 1 | ||
frequency: one-time | ||
description: Be referred by a friend and get a welcome bonus | ||
short_description: Short description | ||
no_auto_open: true | ||
- name: referral_common | ||
reward: 1 | ||
frequency: one-time | ||
title: Refer new users | ||
short_description: Refer friends and get a reward for each friend who verifies the passport | ||
description: Refer friends and get a reward for each friend who verifies the passport | ||
- name: referral_specific | ||
title: Refer user {:did} | ||
reward: 1 | ||
frequency: unlimited | ||
description: The user {:did} has verified the passport. Claim the reward! | ||
short_description: Short description | ||
no_auto_open: true | ||
auto_claim: true | ||
- name: meetup_participation | ||
title: Prove your participation by scanning QR code | ||
reward: 5 | ||
frequency: unlimited | ||
description: Prove your participation by scanning QR code | ||
short_description: Short description | ||
auto_claim: true | ||
qr_code_value: "aawdiojawndgawjhkdla" | ||
|
||
levels: | ||
levels: | ||
- lvl: 1 | ||
threshold: 0 | ||
referrals: 10 | ||
- lvl: 2 | ||
threshold: 10 | ||
infinity: true | ||
|
||
auth: | ||
addr: http://geo-auth | ||
|
||
verifier: | ||
verification_key_path: "./verification_key.json" | ||
allowed_age: 18 | ||
allowed_identity_timestamp: 1715698750 | ||
|
||
root_verifier: | ||
rpc: https://rpc.evm.node1.mainnet-beta.rarimo.com:443 | ||
contract: 0x59123B0D0f95EB23183879f476B6939cEFd2cF3B | ||
request_timeout: 10s | ||
|
||
sig_verifier: | ||
verification_key: "bcb14d08dc1472b80f49eaf72f0873ac314a7146083bbf3694df8c3238949f2ec0971427f5509382a2812c700e541e328cd6ec65a1383c3ca435cdf55862dc4b" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
type: object | ||
required: | ||
- id | ||
- status | ||
properties: | ||
id: | ||
type: string | ||
description: Referral code itself, unique identifier | ||
example: "bDSCcQB8Hhk" | ||
status: | ||
type: string | ||
description: | | ||
Status of the code, belonging to this user (referrer): | ||
1. infinity: the code have unlimited usage count and user can get points for each user who scanned passport | ||
2. active: the code is not used yet by another user (referee) | ||
3. awaiting: the code is used by referee who has scanned passport, but the referrer hasn't yet | ||
4. rewarded: the code is used, both referee and referrer have scanned passports | ||
5. consumed: the code is used by referee who has not scanned passport yet | ||
The list is sorted by priority. E.g. if the referee has scanned passport, | ||
but referrer not, the status would be `consumed`. If both not scann passport yet | ||
status would be `awaiting`. | ||
enum: | ||
- infinity | ||
- active | ||
- awaiting | ||
- rewarded | ||
- consumed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.