# \[HACK BOUNTY\] Send $HYPE component

**URL:** <https://gov.near.org/t/hack-bounty-send-hype-component/4764>\
**Category:** Creatives DAO\
**Tags:** hype-dao\
**Created:** [August 21, 2021, 4:03pm UTC](https://gov.near.org/t/hack-bounty-send-hype-component/4764 "2021-08-21T16:03:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikli](https://dub1.discourse-cdn.com/flex005/user_avatar/gov.near.org/erikli/32/4727_2.png) [@erikli](https://gov.near.org/u/erikli)\
**Post date:** [August 21, 2021, 4:03pm UTC](https://gov.near.org/t/hack-bounty-send-hype-component/4764/1 "2021-08-21T16:03:46Z")

</div>

# Send $HYPE component

- Bounty: [Send $HYPE component](https://tree.taiga.io/project/starpause-hype-dao/us/11?kanban-include_attachments=1&kanban-include_tasks=1&kanban-status=2503430)
- PR: [Send HYPE component by erak · Pull Request #24 · HypeDAO/HypeDAO · GitHub](https://github.com/HypeDAO/HypeDAO/pull/24)

## Open questions

- How to make board accessible from UI?
  - $HYPE registration button is a drop-down menu when wallet connected and contains the following links:
    - Board → /token/board (implemented by [$HYPE leaderboard component](https://tree.taiga.io/project/starpause-hype-dao/us/8?kanban-include_attachments=1&kanban-include_tasks=1&kanban-status=2503432))
    - Send → /token/send (this component)

---

<div class="post-metadata">

**Author:** ![erikli](https://dub1.discourse-cdn.com/flex005/user_avatar/gov.near.org/erikli/32/4727_2.png) [@erikli](https://gov.near.org/u/erikli)\
**Post date:** [September 7, 2021, 11:04am UTC](https://gov.near.org/t/hack-bounty-send-hype-component/4764/2 "2021-09-07T11:04:10Z")

</div>

Started working on this and will open a PR when prototype is ready.

I’ll make the component available in the new HYPE menu.

---

<div class="post-metadata">

**Author:** ![erikli](https://dub1.discourse-cdn.com/flex005/user_avatar/gov.near.org/erikli/32/4727_2.png) [@erikli](https://gov.near.org/u/erikli)\
**Post date:** [September 17, 2021, 12:32pm UTC](https://gov.near.org/t/hack-bounty-send-hype-component/4764/3 "2021-09-17T12:32:10Z")

</div>

Hey everyone,

after being busy with other projects, I’ve managed to finish the send component. The current build from the PR is available here: [https://hype-dao-8pwdk98m0-hypedao.vercel.app/](https://hype-dao-8pwdk98m0-hypedao.vercel.app/)

The preview uses mainnet. In order to test the send functionality on testnet, you need to follow the instructions in the README I’ve added (deploy HYPE token contract and switch Next.js environment).

> <https://github.com/HypeDAO/HypeDAO/pull/24>
>
> Implements https://gov.near.org/t/hack-bounty-send-hype-component/4764.

### Implementation details

#### General

- is not coupled with the sandbox testing PR anymore, uses testnet configuration
- Use testnet: pulls fungible token contracts from `near-examples` and deploys them using a dev account.

#### UI:

- User can only send as much HYPE as available on their account
- Receiver account must exist
- Transaction will fail if receiver is not registered in the token contract (we can not check before sending because it’s an contract internal error, wallet will report it)

#### Contracts:

- fungible token implementation is unmodified example from `near-examples`
- Wrapper scripts added that use `near-cli` to set everything up
