Skip to content

Coinsence/humhub-modules-ethereum

Repository files navigation

Ethereum Module GitHub Build Status Coverage Status

Ethereum module ensure smart contracts integration with humhub-modules-xcoin.

Table of content

Overview

Ethereum module represents a connector between Xcoin and Blockchain Smart Contract.

This module will not functional without Xcoin Module, in order to install this latter check its documentation.


Principal calls made through this module :

  • POST /coin/mint when issuing new coins
  • POST /coin/transferwhen transferring coins
  • GET /coin/balance to get a wallet balance
  • POST /coin/setTransferEventListener to set a listener for a specific coin
  • POST /dao to create a new dao
  • GET /dao to get a specific dao details
  • POST /space/addMembers to add member(s) to a specific space
  • POST /space/removeMember to remove a member from a specific space
  • POST /space/leave to leave space
  • POST /migrate/space to migrate an existing space before enabling ethereum
  • POST /wallet to create wallet(s)
  • GET /wallet to get a specific wallet details

Development

Installation

Two ways are possible :

  • External Installation (recommended for development purpose) :

    Clone the module outside your Humhub root directory for example in a folder called modules :

       $ cd modules 
       $ git clone https://github.com/Coinsence/humhub-modules-ethereum.git
    

    Configure Autoload path by adding this small code block in the humhub_root_direcotry/protected/config/common.php file :

      return [
        	'params' => [
          	'moduleAutoloadPaths' => ['/path/to/modules'],        
      	],
      ]
    
  • Internal Installation (recommended for direct usage purpose) :

    Just clone the module directly under humhub_root_direcotry/protected/humhub/modules

=> Either ways you need to enable the module through through Browse online tab in the Administration menu under modules section.

Testing

Codeception framework is used for testing, you can check some of the implemented tests in tests folder.

  • To simply run tests :

      $ humhub_root_directory/protected/vendor/bin/codecept run  
    
  • To run specific type of tests (acceptance, unit or functional) :

      $ humhub_root_directory/protected/vendor/bin/codecept run unit  
    
  • To extract xml or html output :

      $ humhub_root_directory/protected/vendor/bin/codecept run unit --coverage-xml --coverage-html
    

About

Smart contracts integration with humhub-modules-xcoin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages