Implement ERC20 Deployer Action Provider
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 815
- Avg merge
- 13h 31m
- Merged PRs (30d)
- 2
Description
### 🚀 The feature, motivation and pitch
AgentKit ERC20 Deployer Action Provider that allows users to easily create, customize, and deploy ERC-20 token smart contracts without requiring extensive blockchain development knowledge or environment.
This tool will require pre deployed ERC20 Deployer Factory Contract deployed by CDP or Users.
**Example contract:**
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Import OpenZeppelin's ERC20 standard implementation.
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./CustomERC20.sol";
/**
* @title ERC20Deployer
* @dev A contract to deploy new CustomERC20 contracts.
*/
contract ERC20Deployer {
event TokenDeployed(address indexed tokenAddress, address indexed deployer);
/**
* @notice Deploys a new CustomERC20 token contract.
* @param name The name of the token.
* @param symbol The token symbol.
* @param amount The initial supply to be minted (in the smallest unit).
* @param mintAddress The address to receive the initial minted tokens.
* @return tokenAddress The address of the newly deployed token contract.
*/
function deployToken(
string memory name,
string memory symbol,
uint256 amount,
address mintAddress
)
public
returns (address tokenAddress)
{
CustomERC20 token = new CustomERC20(name, symbol, amount, mintAddress);
emit TokenDeployed(address(token), msg.sender);
return address(token);
}
}
```
### Alternatives
_No response_
### Additional context
https://github.com/berkingurcan/BasevenueWolf/blob/main/contracts/contracts/ERC20Deployer.sol
https://github.com/berkingurcan/BasevenueWolf/blob/main/lib/ai-agents/tokenManagerProvider.ts
Contributor guide
Assessment
This issue has not been assessed yet.