ethereum
ethereum copied to clipboard
Drupal ERC20 token implementation
There is a standard token contract created by Fabian Vogelsteller, which is considered the Ethereum standard token contract.
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md https://theethereum.wiki/w/index.php/ERC20_Token_Standard
It has serval implementations and there is some public interface at https://tokenfactory.surge.sh
The Idea: Create a Drupal Ethereum Submodule implementing that contract.
Skope 1
- Deploy from Admin interface (to multiple networks). See: https://tokenfactory.surge.sh/#/factory
- Connect token holder addresses (users) with Drupal Users
- Add a watch function so that you can mirror contract activities using Drupal entities (browse transactions using views)
Skope 2
- Enable a Tokensale with Drupal. Integrating Signup and user management.
- User status page: How many Tokens I own (Check Balance)
- Transfer Token
- Approve account to withdraw multiple times up to the specified amount.
- Transfer Allowance - Transfer between accounts a specified amount that you've been authorised to do so.
- Check Allowance - Check what amount has been approved for withdrawal between two accounts. See: https://tokenfactory.surge.sh/#/token/%090x729d11fd8ee835a165a6824362bebac8a7831aea
Challange: In order to build this there is some work on the Drupal Ethereum module infrastructure and the Ethereum-PHP required:
- Manage deployment and interaction with contracts including the Ability to deploy on different networks (and keeping track of that in Drupal)
- General Drupal mechanism to watch Contract transactions
- ABI -> Contract Object in Ethereum-php library. The library should be able to use ABI based Contract Objects. You may use this objects to call (non-payable) contract functions and listen to filters and logs
- We will need Array support in Ethereum-php library to be able to read all data (RLP encoding)
- Evaluating a standard way to integrate the user frontend interaction with a Drupal maintained smart contract. This might be hardcoded relating to the contract specific functionality. But at least a standard way to provide web3 for Drupal frontend should be done (Currently working on the integration of web3 using Metamask Mascara)