Skip to content

Example of ERC777 contract and Hook deploy to private blockchain using web3j

Notifications You must be signed in to change notification settings

YatsauAliaksei/erc777example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC777 contract usage example


Description:

This is simplest example code which uses ERC777 contract and ERC777Hooks (Sender, Recipient) to transfer tokens and emits Hooks events.

Code does:

  1. Deploys ERC1820 contract if not yet exist to private ethereum based blockchain.
  2. Deploys*** ERC777 contract
  3. Deploys*** ERC777Recipient, ERC777Sender contracts
  4. Creates Client (ETH account) on demand
  5. Makes a check that tokens were transferred to Client
  6. Logs received events: 'TokensReceivedCalled', 'TokensToSendCalled'

Tested using locally running Hyperledger Besu - version

Solidity contracts were taken from Openzeppelin

Web3j - as ethereum JSON-RPC java library

*** - creates New contract if address is not explicitly set in 'application.yml' file under 'netContracts/name/address' section

About

Example of ERC777 contract and Hook deploy to private blockchain using web3j

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages