Skip to content

Commit 2e1de87

Browse files
committed
guide updates
1 parent 889a221 commit 2e1de87

2 files changed

Lines changed: 35 additions & 17 deletions

File tree

pages/hub/apps/guides/affiliate-ggr.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The GraphQL query used to retrieve the necessary data for calculating Pool Reven
1010

1111
```graphql
1212
query Bets {
13-
bets(
13+
v3Bets(
1414
where: {
1515
status_in: [Resolved, Canceled],
1616
affiliate: $affiliate
@@ -22,7 +22,7 @@ query Bets {
2222
odds
2323
amount
2424
payout
25-
_isFreebet
25+
isFreebet
2626
}
2727
}
2828
```
@@ -187,4 +187,4 @@ while (true) {
187187
}
188188
}
189189

190-
```
190+
```
Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
import { Callout } from 'components'
22

3-
## Getting Rewards to your Affiliate wallet
3+
# Getting Rewards to your Affiliate wallet
44

5-
To direct rewards to your wallet address, include it as the `affiliate` parameter in bet transactions. [Read about rewards distribution here](https://gem.azuro.org/knowledge-hub/how-azuro-works/reward-distribution).
5+
To direct rewards to your wallet address, include it as the `affiliate` parameter in [`bet order API`](https://api.onchainfeed.org/api/v1/public/gateway/docs#/Bet%20Public/BetController_createOrderOrdinar). [Read about rewards distribution here](https://gem.azuro.org/knowledge-hub/how-azuro-works/reward-distribution).
66

7-
```
7+
```ts {1, 10}
88
const AFFILIATE_ADDRESS = '0x...' // Your wallet address to earn rewards
99

10-
lp.bet(
11-
core,
12-
amount,
13-
deadline,
14-
{
15-
affiliate: AFFILIATE_ADDRESS,
16-
data,
17-
minOdds
18-
}
19-
)
10+
const signedBet = {
11+
environment: '...',
12+
bettor: '0x...',
13+
betOwner: '0x...',
14+
clientBetData: {
15+
clientData: {
16+
attention: '...'
17+
affiliate: AFFILIATE_ADDRESS
18+
core: '0x...'
19+
expiresAt: 23401293
20+
chainId: 137
21+
relayerFeeAmount: '...'
22+
isBetSponsored: false
23+
isFeeSponsored: false
24+
isSponsoredBetReturnable: false
25+
},
26+
bet: {...},
27+
},
28+
bettorSignature: '0x...',
29+
}
2030

31+
const response = await fetch('https://api.onchainfeed.org/api/v1/public/bet/orders/ordinar', {
32+
method: 'POST',
33+
headers: {
34+
'Accept': 'application/json',
35+
'Content-Type': 'application/json',
36+
},
37+
body: JSON.stringify(signedBet),
38+
})
2139
```
2240

2341
<Callout type="warning">
@@ -27,4 +45,4 @@ Double-check your affiliate address before proceeding. It's crucial to ensure ac
2745

2846
Being diligent will help prevent problems with bet calculations and reward distribution.
2947
If you have any uncertainties or need help, feel free to reach out to our support team.
30-
</Callout>
48+
</Callout>

0 commit comments

Comments
 (0)