Skip to content
View cempehlivane's full-sized avatar
  • http://tchiba.hatenablog.jp/
  • Tokyo
  • Joined Nov 2, 2025

Block or report cempehlivane

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
cempehlivane/README.md

cempehlivane

Messenger is a message dapp that allows text and tokens (AVAX) to be exchanged.

build & run

git clone [this_repository]
cd [this_repository]
yarn install
yarn client dev

After executing the above command, access localhost:3000 in your browser.

description

Chain deployed to: Avalanche

Contract

Stack description

contract

  • Solidity

test & deploy

  • hardhat
  • typescript

Directory structure

Root: packages/contract

  • Messenger.sol
    Implementing Messenger contract core code.
  • Ownable.sol
    Provide owner functionality to Messenger contract.

Code walk-through

  • Send message
    The message sender calls the post function with the text and the receiver address as arguments.
    The sender can also attach some AVAX to the message.
    The contract then holds the message data as an array.

  • Check message
    The user calls the getOwnMessage function.
    Then the contract finds the message array of which the caller is the receiver and returns it.

  • Accept or deny message
    The message receiver calls the accept or deny function with the index number of message array as an argument.
    if accept, the contract send the AVAX to the receiver.
    if deny, the contract send the AVAX to the sender.

Client

Stack description

  • typescript
  • React.js
  • Next.js

Directory structure

Root: packages/client

  • components, hooks, pages, styles
    Directories containing client side code
  • utils/Messenger.json
    Includes the contract ABI.

Code walk-through

All pages initially confirm the connection of the user wallet and acquire the contract object.
And the user calls the function of the contract on each page.

Send message ▶️ pages/message/SendMessagePage.tsx
Check and accept or deny message ▶️ pages/message/ConfirmMessagePage.tsx

Pinned Loading

  1. cempehlivane cempehlivane Public

    TypeScript

  2. local-file-link local-file-link Public

    ローカルファイルへのリンク(file://~)を開けるようにするChrome拡張

  3. performance performance Public

    Distributed hash table performance tool

    TypeScript

  4. vpower vpower Public

    ANT+ Virtual Power - currently for BT-ATS turbo & Kurt Kinetic. More to come...

    Shell