Skip to content

Commit

Permalink
feat: treasury grant phase 3 (#2552)
Browse files Browse the repository at this point in the history
* feat: treasury grant phase 3

* update data to display correct value

* change contract phase 3

* feat: update description for phase 3
  • Loading branch information
viet-nv authored Oct 31, 2024
1 parent e6323d5 commit 74438c7
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 12 deletions.
34 changes: 34 additions & 0 deletions src/pages/ElasticSnapshot/components/SelectTreasuryGrant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,40 @@ export default function SelectTreasuryGrant({ userHaveVestingData }: { userHaveV
</ul>
</Text>

<Text fontSize={14} color={theme.subText} lineHeight={1.5}>
<Info size={12} color="#58B5EE" />
<Text as="span" marginLeft="6px" color="#58B5EE">
Phase 3:
</Text>{' '}
The <b>Third Batch of Special Affected Users (total 11 wallets) including</b> who encountered specific issues
listed below and reported them through the{' '}
<b>Kyber Customer Support channel prior to the Phase 2 deadline.</b>
To be eligible for Phase 3 of the KyberSwap Grant Program, users must have strictly followed specific
processes and completed their reports before the Phase 2 deadline. This phase is exclusively available to
those who fulfilled all requirements within the given timeframe, and <b>
is not open for new applications
</b>{' '}
after the Phase 2 cutoff. Eligible cases include:
<ul>
<li>
Users whose KYC verification failed due to technical issues with the ZkMe system and passed the manual KYC
process
</li>

<li style={{ marginTop: '4px' }}>
Users who were unable to apply within Phase 2 due to ZkMe-related delays or errors.
</li>
<li style={{ marginTop: '4px' }}>
Users who experienced wallet security issues and requested to update to a new wallet for grant application
purposes.
</li>
</ul>
<Text>
All users eligible for Phase 3 have been notified of their eligibility directly through the KyberSwap
Customer Support channel.
</Text>
</Text>

<Text marginTop="1rem" fontSize={14} color={theme.subText} lineHeight="20px">
<Trans>
Total Amount includes all affected funds under Category 1, 2 & 4 and unrecovered funds under Category 3 & 5
Expand Down
8 changes: 4 additions & 4 deletions src/pages/ElasticSnapshot/data/phase3.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
{
"receiver": "0xee2147fcf090ce08095e65a3c9e193c459364d5b",
"oldAddress": "0xcc98cfdc5f5480d8dd0a0d0a7f80506eb30d5159",
"vestingAmount": 585721920000,
"value": 585721.92
"vestingAmount": 585805040000,
"value": 585805.04
},
{
"receiver": "0x00e6bc5f73ef330c5f553554dcec8a863db84a23",
"oldAddress": "0xd1bbca0dfde1f51ccd17e33de1a7ead48faa1d68",
"vestingAmount": 197918498300,
"value": 197918.5,
"vestingAmount": 185848210000,
"value": 185848.21,
"vestedAmount": 19657.410552
},
{
Expand Down
151 changes: 151 additions & 0 deletions src/pages/ElasticSnapshot/data/vesting/phase3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[
{
"claimData": {
"receiver": "0xee2147fcf090ce08095e65a3c9e193c459364d5b",
"vestingAmount": 585805040000,
"claimedAmount": 0,
"index": 0
},
"proof": [
"0x536db29d6ffa3655ddfc3d41eec4cf3b67536466f67a72b0f3deaec607304792",
"0x6b8cd97e3b174868d0d8070633df2147f3b51632e864bb911397d5bba6f86fd5",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0x00e6bc5f73ef330c5f553554dcec8a863db84a23",
"vestingAmount": 185848210000,
"claimedAmount": 19657410552,
"index": 1
},
"proof": [
"0x625629c1b3f29d041bf3a150423f3c0b1d82ea9c6e84e16a4e9636c051672a84",
"0xd2d83f740529822e74b88621c064ce28daf8861f5668e9a7ef9be108c2065f3a",
"0xacafbd834797f37c26a5859fc57a3b8c204bcafece7224a184e3c77797a1c9af"
]
},
{
"claimData": {
"receiver": "0x2130fd01026867a6c8dde24ad5e64f2e2dfce196",
"vestingAmount": 179477543200,
"claimedAmount": 0,
"index": 2
},
"proof": [
"0x511f70b6a17ca026c4d2d7a442508ee36b4b71dafd11633b76b7758e9ffca6dc",
"0x0a7a0e8d85d57986cba941a2b77a3387510bef732a0322c4e33bedabafdba7fc",
"0x471e7a4c933280a683baf4e751ad032092c482e75434054f3d6a76543fd74752",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0xcab9760e56bfd28803b41cac1e6616704aa5ecce",
"vestingAmount": 2375410000,
"claimedAmount": 174442519,
"index": 3
},
"proof": [
"0x4fdbdc2458926d579b4b3040f733c38e5ebd23ed7ec7d40c8987d99f0343a61d",
"0xa0b3d2ebb9c0db2bf0afdaefc0dc644095918ebdc26929b43bc76a39c4b363dd",
"0x471e7a4c933280a683baf4e751ad032092c482e75434054f3d6a76543fd74752",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0x87b1594e6e8b8fee7b14cd77a5c2324e31a7bcd4",
"vestingAmount": 1020780000,
"claimedAmount": 0,
"index": 4
},
"proof": [
"0xa151728400e6b6525fadc0f5246a88dac3d29148f5ef80bb6bf811e797f7d1a5",
"0x59a3b3aeb6fe52f70105734a7ad44e4fd570fb984a97d258d11829b81b940158",
"0xacafbd834797f37c26a5859fc57a3b8c204bcafece7224a184e3c77797a1c9af"
]
},
{
"claimData": {
"receiver": "0x4526b09df42775975a543e0e984172ab202b4ff8",
"vestingAmount": 627260000,
"claimedAmount": 0,
"index": 5
},
"proof": [
"0xb4b9f21cc947c14a69982b81a7b234c207f6e4a4653ac4b397d4fd7cde0f7425",
"0x59a3b3aeb6fe52f70105734a7ad44e4fd570fb984a97d258d11829b81b940158",
"0xacafbd834797f37c26a5859fc57a3b8c204bcafece7224a184e3c77797a1c9af"
]
},
{
"claimData": {
"receiver": "0x5da35491ff9d73e3f5ff0d3c6ed1ea5ab68770c0",
"vestingAmount": 167390000,
"claimedAmount": 0,
"index": 6
},
"proof": [
"0x10d0de53631a5d49ea16756f00a401712928ed66d1d9f3c88922d8cf28e11c68",
"0xd2bb1fba38258d3efe9e1f913c74bccf69f8bfce07c2bd9da1645ecf1714e260",
"0x6b8cd97e3b174868d0d8070633df2147f3b51632e864bb911397d5bba6f86fd5",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0x5119d8c206546c5361bb6317d7508d9bd4787c16",
"vestingAmount": 141810000,
"claimedAmount": 0,
"index": 7
},
"proof": [
"0x5e53ac9763e815531f1c75473e714904a993a3c390e669afd9c44eaf93b669d8",
"0x0a7a0e8d85d57986cba941a2b77a3387510bef732a0322c4e33bedabafdba7fc",
"0x471e7a4c933280a683baf4e751ad032092c482e75434054f3d6a76543fd74752",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0x6ef7173ba0552f8940dda4b5ea5ac48b17f8b8a2",
"vestingAmount": 111780000,
"claimedAmount": 0,
"index": 8
},
"proof": [
"0x422b94961714a4d9a6db744836f2806a7bcc86c3b65174e6acc8c5e7dbc6ca65",
"0xa0b3d2ebb9c0db2bf0afdaefc0dc644095918ebdc26929b43bc76a39c4b363dd",
"0x471e7a4c933280a683baf4e751ad032092c482e75434054f3d6a76543fd74752",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
},
{
"claimData": {
"receiver": "0xd5c6519a51a840398c4444c2fbd9d34820baa10c",
"vestingAmount": 82820000,
"claimedAmount": 21632833,
"index": 9
},
"proof": [
"0x76e77adb1024fa8ae9c4dc6f441274d8382494bdae8f8b75bb2c1a8d5689f5df",
"0xd2d83f740529822e74b88621c064ce28daf8861f5668e9a7ef9be108c2065f3a",
"0xacafbd834797f37c26a5859fc57a3b8c204bcafece7224a184e3c77797a1c9af"
]
},
{
"claimData": {
"receiver": "0xb4d353a9706264e92d25dbb93c292a7ea3649956",
"vestingAmount": 262854550063,
"claimedAmount": 0,
"index": 10
},
"proof": [
"0x0eb784d5eef61a0646adbd54497f17846f06be7593c71bbb0ca79ab762af88f5",
"0xd2bb1fba38258d3efe9e1f913c74bccf69f8bfce07c2bd9da1645ecf1714e260",
"0x6b8cd97e3b174868d0d8070633df2147f3b51632e864bb911397d5bba6f86fd5",
"0xf9bd6e1e21ccef7abd2c5dae87900703c867dcbb2d60939f24d6e116c5dc5c24"
]
}
]
13 changes: 13 additions & 0 deletions src/pages/ElasticSnapshot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import vestingOptionA from './data/vesting/optionA.json'
import vestingOptionAPhase2 from './data/vesting/optionA_phase2.json'
import vestingOptionB from './data/vesting/optionB.json'
import vestingOptionBPhase2 from './data/vesting/optionB_phase2.json'
import vestingPhase3 from './data/vesting/phase3.json'

const format = (value: number) => formatDisplayNumber(value, { style: 'currency', significantDigits: 7 })

Expand Down Expand Up @@ -134,13 +135,16 @@ const phase2AddressVestingContract = {
B: '0xbA04Fa014fF307a3E731b3898bC0633f9B559995',
}

const vestingPhase3ContractAddress = '0xBA06228A869b7B7833B18b3B43541f366b0B3E4e'

export default function ElasticSnapshot() {
const { account } = useActiveWeb3React()

const theme = useTheme()

const userInfo = data.find(item => item.user_address.toLowerCase() === account?.toLowerCase())

const vestingP3 = vestingPhase3.find(item => item.claimData.receiver.toLowerCase() === account?.toLowerCase())
const vestingA = vestingOptionA.find(item => item.claimData.receiver.toLowerCase() === account?.toLowerCase())
const vestingB = vestingOptionB.find(item => item.claimData.receiver.toLowerCase() === account?.toLowerCase())
const phase3Info = phase3.find(
Expand Down Expand Up @@ -562,6 +566,15 @@ export default function ElasticSnapshot() {
tcLink="https://bafkreieg7lvkcjcx3gczdqta2izunwovrn7rcjg6j24ixjftniiyopp5w4.ipfs.w3s.link"
/>
)}

{vestingP3 && (
<Vesting
userSelectedOption={'B'}
userVestingData={vestingP3 as VestingInterface}
contractAddress={vestingPhase3ContractAddress}
tcLink="https://bafkreieg7lvkcjcx3gczdqta2izunwovrn7rcjg6j24ixjftniiyopp5w4.ipfs.w3s.link"
/>
)}
</>
)
)}
Expand Down
19 changes: 11 additions & 8 deletions src/services/route/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ const routeApi = createApi({
clientId?: string
}
>({
query: ({ params, url, authentication, clientId }) => ({
url,
params,
authentication,
headers: {
'x-client-id': clientId || 'kyberswap',
},
}),
query: ({ params, url, authentication, clientId }) => {
const { chainId, tokenInDecimals, tokenOutDecimals, ...rest } = params
return {
url,
params: rest,
authentication,
headers: {
'x-client-id': clientId || 'kyberswap',
},
}
},
async transformResponse(baseResponse: GetRouteResponse, _meta, { params }): Promise<GetRouteResponse> {
const { routeSummary } = baseResponse?.data || {}
const { chainId, tokenInDecimals, tokenOutDecimals, tokenIn, tokenOut } = params || {}
Expand Down

0 comments on commit 74438c7

Please sign in to comment.