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/mint
when issuing new coinsPOST /coin/transfer
when transferring coinsGET /coin/balance
to get a wallet balancePOST /coin/setTransferEventListener
to set a listener for a specific coinPOST /dao
to create a new daoGET /dao
to get a specific dao detailsPOST /space/addMembers
to add member(s) to a specific spacePOST /space/removeMember
to remove a member from a specific spacePOST /space/leave
to leave spacePOST /migrate/space
to migrate an existing space before enabling ethereumPOST /wallet
to create wallet(s)GET /wallet
to 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.git
Configure
Autoload
path by adding this small code block in thehumhub_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.
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
orfunctional
) :$ humhub_root_directory/protected/vendor/bin/codecept run unit
-
To extract
xml
orhtml
output :$ humhub_root_directory/protected/vendor/bin/codecept run unit --coverage-xml --coverage-html