Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ERC20 Deployer Action Provider #321

Open
berkingurcan opened this issue Feb 9, 2025 · 0 comments
Open

Implement ERC20 Deployer Action Provider #321

berkingurcan opened this issue Feb 9, 2025 · 0 comments

Comments

@berkingurcan
Copy link

🚀 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:

// 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant