Open 123456788940 opened 8 months ago
Token Distribution Contract
This Solidity smart contract, named tokenDistribution
, facilitates the distribution of ERC-20 tokens among a list of beneficiaries. The contract accepts the ERC-20 token's address and an array of beneficiary addresses during deployment. The main functionalities include:
Constructor:
Distribute Tokens:
distributeTokens
function equally distributes the available tokens among the specified beneficiaries.Add Beneficiary:
addBeneficiary
function allows adding new beneficiaries to the distribution list.Get Beneficiaries:
getBeneficiaries
function retrieves the list of current beneficiaries.Usage:
distributeTokens
function to distribute tokens equally among the beneficiaries.addBeneficiary
function as needed.getBeneficiaries
function.Ensure that you have the necessary permissions and provide ample gas when interacting with the contract on the Ethereum blockchain. Customize the contract based on your specific token distribution requirements.
// SPDX-License-Identifier: MIT pragma solidity ^0.8;
import "./erc20.sol";
contract tokenDistribution { erc20 public token; address[] public beneficiaries;
}