Skip to content

Commit

Permalink
sync develop to testnet (#108)
Browse files Browse the repository at this point in the history
* Reconnect on refresh (#53)

* Move refreshed token connection to side effetcs

* Fix csv parse on different newline characters (#54)

* Delete unused variable

* feat(ui): create airdrops stepper component

* feat(pages): add stepper in airdrop create page

* refactor(pages): use airdrops list page as airdrops index

* refactor(pages): use aidrops manage page as create page

* refactor(pages): rework airdrops create page (#60)

* refactor(pages): rework airdrops create page

* feat(ui): extract form control component

* chore(utils): move create airdrop doclink to utils

* feat(ui): extract input text component (#3)

* feat(ui): extract input date time component

* feat(ui): extract airdrop start end radio

* chore(pages): use extracted components in create airdrop page

* feat(ui): extract json preview component

* refactor(pages): update register page styling

* chore(pages): use optional chaining

Signed-off-by: Griko Nibras <[email protected]>

* revert(pages): remove optional chaining

This reverts commit 9d136ee.

* chore(ui): make current radio reusable

* feat(ui): create stats component

* refactor(pages): rework airdrops fund page

* feat(assets): update brand assets (#78)

* feat(assets): update brand assets

* chore(assets): remove unused assets

* feat(ui): create brand preview related components

* feat(pages): update home page

* feat(pages): create brand page

* feat(ui): update sidebar brand

* Add escrow status to related components (#79)

* Add escrow status property to airdrop interface

* Set escrow status on server after deposit

* Add escrow status message in component

* Add comment

* Funding page updates (#80)

* Fix negative amount in fund page

* Hide button on escrow status

* Hide register button on escrow

* Split escrow logic (#83)

* Extract escrow components to its own page

* Remove escrow logic from register and fund page

* Add non escrow state to escrow page

* Redirect to escrow after create step

* Redirect to register after escrow step

* Set processing status after successful deposit

* feat: add heading font family

* feat(pages): update home logo

* feat(pages): update heading font family

* feat(ui): extract home card component

* feat(pages): update home page links

* feat(npm): add generate:favicons script

* feat(config): add favicons.json

* feat(public): generate favicons assets

* chore(public): remove unusd

* feat(pages): include favicons meta tags

* feat(public): add social image

* feat: add airdrop contract helpers (#86)

* Add merkle airdrop contract helper functions

* Add merkle airdrop contract to context

* Delete import

* Use contract helper on create page

* Add register and release escrow logic to helper

* Update expiration type

* Use contract helper on register page

* Remove wallet hook and add txSigner to methods

* Use contract helper on fund page

* Remove client and add user wallet address

* Comment total amount in message

* Use contract helper on claim page

* Add response types for airdrop contract queries

* Refactor latest stage response

* Refactor responses on airdrop contract

* chore: resolve dirty conflicts

* Add escrow deposit helper

* Remove contract address and use default one

* Use contract helper on escrow logic

* Change redirect link

* Delete toast message

Co-authored-by: findolor <[email protected]>

* refactor(pages): rework airdrop escrow page (#90)

* chore(utils): update airdrops props type

* feat(utils): add text ellipsis utility

* feat(ui): create stacked list component

* feat(ui): create conditional component

* feat(ui): create alert component

* refactor(pages): rework airdrop escrow page

* chore(ui): loosen conditional component test prop

* chore(ui): use react.fc in stacked list

Co-authored-by: Ryan Warner <[email protected]>

* revert(ui): use react.fc in stacked list

This reverts commit f4ee5c8849a5278a10d3d2f3a1da740aec0eb8da.

* Change airdrop escrow status to airdrop status

* Text and conditional changes

Co-authored-by: Ryan Warner <[email protected]>
Co-authored-by: findolor <[email protected]>

* feat(pages): update escrow notice in register and fund page (#91)

* chore(utils): update airdrops props type

* feat(utils): add text ellipsis utility

* feat(ui): create stacked list component

* feat(ui): create conditional component

* feat(ui): create alert component

* refactor(pages): rework airdrop escrow page

* chore(pages): remove register and fund sticky button behavior

* feat(pages): update escrow notice in register and fund page

Co-authored-by: findolor <[email protected]>

* Adding signature verification (#89)

* Add sequence and account number to wallet context

* Add default fee to utils

* Export wallet interface

* Refactor verification logic

* Handle verification data in method

* Add signature verification logic to register

* Pass signer to merkle contract helper

* Refactor some messages to return signed message

* Refactor airdrop funding methods

* Pass client and wallet address to contract init

* Refactor fund page logic with verification data

* Refactor init method on merkle contract

* Uncomment broadcast logic on base cw20

* Update gas

* Update airdrop instantiate fee

* Change fee

* Remove signer address

* Change fee on methods

* Move alert message on top

* Remove transfer message

* Get current sequence and refactor pages

* Remove sequence from wallet

* Fix account sequence on signature verification

* Refactor env variables

* Get block explorer link from env vars

* Capitalize network text

* feat(pages): create airdrop success page

* feat(pages): redirect success airdrop fund to success page

* fix(types): stub window.confetti type

* Handling loading states (#96)

* Add interval hook

* Use interval hook on escrow state polling

* Add empty state for airdrop list

* Remove before unload event

* Add escrow check to interval

* Change function name

* Add page spesific status items

* Add server polling and airdrop status component

* Change component ordering on escrow page

* Add spinner and conditional component placing

* Fix typo

* Add additional conditions to fund page

* Replace url when contract address changes

* Add more fields to airdrop status

* Add accounts size property to airdrop interface

* Change text

* Add user balance to claim page

* Increase balance after succesful claim

* Add 404 page (#99)

* chore: housekeeping (#95)

* feat(pages): use json preview component in claim page

* chore(deps): remove unused

* chore(env): update example env

* chore(docs): update readme

* chore(ui): remove unnecessary capitalization

* chore(ui): use conditional component to reduce fragments

* chore(deps): bump versions

* Add alert for saving airdrop contract address (#102)

* Arbitrary data verification (#98)

* Add textarea component

* Add copyable prop and remove fixed height

* Add sign and verify page

* Add keplr-wallet/cosmos library

* Use another verify signature method from keplr

* Change textarea height

* Add sign and verify page to sidebar

* refactor(pages): rework airdrop claim page (#106)

* refactor(pages): rework airdrop claim page

* feat(pages): remove gssp in airdrop claim page

* fix(pages): exhaustive side effect deps

* feat(pages): add airdrop claim state

* feat(pages): partial impl. claim states

* chore(pages): tidy up stylings

* fix(pages): improve boolean checks

* Add additional logic and refactor

* Export token info response

* Add more info about token in claim page

Co-authored-by: findolor <[email protected]>

* feat(hooks): add useDevAssignWindow hook (#107)

Co-authored-by: Arda Nakışçı <[email protected]>

Co-authored-by: Griko Nibras <[email protected]>
Co-authored-by: Griko Nibras <[email protected]>
Co-authored-by: Ryan Warner <[email protected]>
  • Loading branch information
4 people authored Mar 27, 2022
1 parent d2b27df commit 8dec17a
Show file tree
Hide file tree
Showing 139 changed files with 4,047 additions and 1,935 deletions.
35 changes: 14 additions & 21 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
# Testnet Contracts
NEXT_PUBLIC_TESTNET_CW20_MERKLE_DROP_CODE_ID=8
NEXT_PUBLIC_TESTNET_CW20_BASE_CODE_ID=5
NEXT_PUBLIC_TESTNET_CW20_BONDING_CODE_ID=36
NEXT_PUBLIC_TESTNET_CW20_STAKING_CODE_ID=7
NEXT_PUBLIC_TESTNET_CW1_SUBKEYS_CODE_ID=9
NEXT_PUBLIC_API_URL=https://test-api.juno.tools/v1
NEXT_PUBLIC_BLOCK_EXPLORER_URL=https://explorer.uni.chaintools.tech/uni

# Mainnet Contracts
NEXT_PUBLIC_MAINNET_CW20_MERKLE_DROP_CODE_ID=56
NEXT_PUBLIC_MAINNET_CW20_BASE_CODE_ID=53
NEXT_PUBLIC_MAINNET_CW20_BONDING_CODE_ID=54
NEXT_PUBLIC_MAINNET_CW20_STAKING_CODE_ID=55
NEXT_PUBLIC_MAINNET_CW1_SUBKEYS_CODE_ID=11
NEXT_PUBLIC_CW1_SUBKEYS_CODE_ID=9
NEXT_PUBLIC_CW20_BASE_CODE_ID=5
NEXT_PUBLIC_CW20_BONDING_CODE_ID=36
NEXT_PUBLIC_CW20_MERKLE_DROP_CODE_ID=8
NEXT_PUBLIC_CW20_STAKING_CODE_ID=7

# Backend Config
NEXT_PUBLIC_API_URL=http://localhost:3001/v1
NEXT_PUBLIC_ESCROW_AMOUNT=1
NEXT_PUBLIC_ESCROW_CONTRACT_ADDRESS= # TODO

# App Config
NEXT_PUBLIC_NETWORK=testnet

# S3 Config
NEXT_PUBLIC_S3_ENDPOINT=
NEXT_PUBLIC_S3_REGION=
NEXT_PUBLIC_S3_KEY=
NEXT_PUBLIC_S3_SECRET=
NEXT_PUBLIC_S3_BUCKET=
NEXT_PUBLIC_S3_BUCKET= # TODO
NEXT_PUBLIC_S3_ENDPOINT= # TODO
NEXT_PUBLIC_S3_KEY= # TODO
NEXT_PUBLIC_S3_REGION= # TODO
NEXT_PUBLIC_S3_SECRET= # TODO
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,57 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
<!-- markdownlint-disable MD033 MD034 MD036 MD041 -->

## Getting Started
![juno-tools](./public/social.png)

First, run the development server:
# juno-tools

```bash
npm run dev
# or
yarn dev
```
- Mainnet website: TODO
- Testnet website: https://test.juno.tools

## Prerequisites

**Required**

- Git
- Node.js 14 or LTS
- Yarn
- Keplr Wallet browser extension

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
**Optional**

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
- S3 bucket instance (minio, etc.)

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
## Setup local development

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
```sh
# clone repository
git clone https://github.com/CosmosContracts/juno-tools.git
cd juno-tools

## Learn More
# install dependencies
yarn install

To learn more about Next.js, take a look at the following resources:
# copy env file and fill in values
cp .env.example .env

# run development server
yarn dev

# (optional) lint and format project
yarn lint
```

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
## References

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
- https://docs.juno.tools
- https://docs.juno.tools/docs/dashboards/airdrop/introduction
- https://docs.juno.tools/docs/dashboards/airdrop/guide
- https://docs.juno.tools/docs/dashboards/cw-1/introduction
- https://docs.juno.tools/docs/dashboards/cw-20/introduction

## Deploy on Vercel
## Questions

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
- [Discord](https://discord.gg/Juno)
- [Telegram](https://t.me/JunoNetwork)
- [Twitter](https://twitter.com/junotools)

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
<img src="./public/icon.png" height="96" align="right" />
12 changes: 0 additions & 12 deletions assets/brand-black.svg

This file was deleted.

15 changes: 15 additions & 0 deletions assets/brand-bust.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions assets/brand-icon-black.svg

This file was deleted.

9 changes: 0 additions & 9 deletions assets/brand-icon-white.svg

This file was deleted.

9 changes: 0 additions & 9 deletions assets/brand-icon.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/brand-text-black.svg

This file was deleted.

3 changes: 0 additions & 3 deletions assets/brand-text-white.svg

This file was deleted.

Loading

0 comments on commit 8dec17a

Please sign in to comment.