'How do I make a Digital ERC20 Tokens with a 10% reward payout to an external Metamask address account for marketing? With an automatic paysplitter
How do I make a Digital ERC20 Tokens with a 10% reward payout to an external Metamask address account for marketing? With an automatic paysplitter via pull-payment and using Reentrancy Guards as a way to send four different private developers a equal share in different external eth wallets? I am trying to use openzeppelin smart contract but I am new to Solidity and I am still not yet sure how to put in my information on the smart contract to fit towards my token or how Inheritance works so I can compile in Remix with no bugs….please help. This what I have sofar.
Solution 1:[1]
Here is an example, here with "commissionWallet" being the wallet receiving the fees :
function invest(address referrer, uint8 plan) public payable {
uint256 fee = msg.value.mul(PROJECT_FEE).div(PERCENTS_DIVIDER);
commissionWallet.transfer(fee);
emit FeePayed(msg.sender, fee);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | KotlinIsland |
