Ethereum module ensure smart contracts integration with humhub-modules-xcoin.
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/mintwhen issuing new coinsPOST /coin/transferwhen transferring coinsGET /coin/balanceto get a wallet balancePOST /coin/setTransferEventListenerto set a listener for a specific coinPOST /daoto create a new daoGET /daoto get a specific dao detailsPOST /space/addMembersto add member(s) to a specific spacePOST /space/removeMemberto remove a member from a specific spacePOST /space/leaveto leave spacePOST /migrate/spaceto migrate an existing space before enabling ethereumPOST /walletto create wallet(s)GET /walletto get a specific wallet details
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.gitConfigure
Autoloadpath by adding this small code block in thehumhub_root_direcotry/protected/config/common.phpfile :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.
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,unitorfunctional) :$ humhub_root_directory/protected/vendor/bin/codecept run unit -
To extract
xmlorhtmloutput :$ humhub_root_directory/protected/vendor/bin/codecept run unit --coverage-xml --coverage-html