AI Coin Issuance Era is Coming? How Does ChatGPT Automatically Deploy and Create Tokens?

AI Coin Issuance Era ChatGPT's Automated Token Deployment and Creation

By using the OpenAI API, ChatGPT deployed a 876-line script that automatically created a detailed ERC-20 token.

Written by: @CroissantEth

Compiled by: Frank, Foresight News

I can’t believe it actually worked. I just did one of the coolest things on Ethereum, proving that Al is not a joke…

A few months ago, I was completely obsessed with chatting with my newly acquired AI friend, and at that time, I didn’t have any specific ideas, I just wanted to test the ability of ChatGPT to integrate with smart contracts on Ethereum.

Suddenly, I had a fleeting thought – what if ChatGPT could deploy its own token? Surely that’s impossible, right?

Obviously, ChatGPT can’t “directly” deploy tokens on Ethereum. However, using the OpenAI API, this problem can be bypassed.

The OpenAI API enables developers to integrate ChatGPT into their own custom applications, which can themselves connect to the Ethereum network.

Suddenly, my project had direction. By utilizing OpenAI’s API, I could create a script to prompt and guide ChatGPT to generate a token. This script would connect to Ethereum through hardhat and complete the deployment of the token in an automated process.

After generating hundreds of lines of code, my idea began to take shape. Essentially, it required ChatGPT to use Open Zeppelin’s standard to create an ERC-20 token. The token name and other parameters were set to the values passed by GPT in the code constructor.

After GPT wrote the ERC-20 Solidity contract code, things became more technical. The script then introduced a JSON object named dataSupply, which engaged in a conversation with ChatGPT to generate the desired supply of its token.

The script continued by creating a similar JSON object, this time named dataName, and engaged in a conversation with ChatGPT to generate the name of the token it created. The name generated by ChatGPT was then stored in a variable named nameGivenByAI.

The variable nameGivenByAI was not only used to store the token name, but also to write a brief description for the token generated by ChatGPT, which was then stored in a variable named descriptionGivenByAI.

This is where our next Al model enters the sequence. ChatGPT provides its description to DALL-E for peer-to-peer image generation based on the token name assigned by GPT. So far, the results are exciting, but far from perfect.

For obvious reasons, “FluffyUnicorn Coin” is not ideal. In order for ChatGPT to give better answers, it needs more contextual information about cryptocurrencies. How can I achieve this without injecting human bias?

Purely based on data.

To do this, I created a Dune query module to collect the top 10,000 tokens by trading volume on Uniswap. Next, I wrote a Python script that compared these tokens with their market capitalization using data from CoinMarketCap and CoinGecko. Finally, I had good data for GPT to use.

By inserting this data into the generated prompts, the results immediately improved. GPT-4 clearly has a better understanding of crypto culture and demonstrates its creativity in the answers.

Here are the results of a few test runs on the network: Inuverse and QuantumPepe.

After these changes, I conducted an advanced AI deployment of an ERC-20 token. Apart from setting the necessary prerequisites, the process didn’t involve any human interaction. To stay true to the spirit of this project, here’s a code snippet from GPT:

However, there are still some measures that need to be taken. The goal of this project is to create a token solely through GPT, but there are still some human factors involved. Specifically: Who owns the private key? Who owns the ownership of the smart contract?

To address this issue, I developed a clever and simple solution:

Once the smart contract is deployed, ownership is immediately revoked, and upon creation, 100% of the tokens are added to the liquidity pool on Uniswap along with 2 ETH.

Finally, the entire script consists of 876 lines of code.

Using this script, autonomous code and artificial intelligence can quickly deploy their own ERC-20 tokens. I have open-sourced the code for this project here, it’s time to let GPT take over.

I just ran the script and it created:

  • Project Name: AstroPepeX

  • Total Supply: 65,000,000,000

  • Token Name: APX

  • Contract Address: 0xed4e879087ebD0e8A77d66870012B5e0dffd0Fa4

Note that there is one condition: the transfer amount cannot exceed 0.5% of the total supply.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Market

Binance Brings the Hammer Down on AEUR: Stablecoin Rockets 200% Overnight

Binance Halts Trading on AEUR Stablecoin as its Value Skyrockets Over 200%

Blockchain

The Digital Yuan Strikes Oil: Cross-Border Transaction Goes Crypto

PetroChina International makes history by closing a cross-border oil transaction using digital yuan for the first time.

Blockchain

FTX’s Redemption Plan: A Second Chance for Crypto Dreamers

FTX announces revised plan to reimburse creditors affected by bankruptcy with significant payouts.

Bitcoin

Trac Systems: Funding with a Touch of Bitcoin Brilliance

German company Trac Systems, which owns Tap Protocol, has secured $4.2 million in funding from investors.

Market

TrueUSD Stablecoin: A Rollercoaster Ride to Depegging and Recovery 💰💥

TrueUSD (TUSD), a stablecoin with reputed ties to Justin Sun, has seen a decrease in value since January 15.

DeFi

Cryptocurrency Chronicles: Ethereum’s Monopoly Highwire Act and BorroeFinance’s Whale of a Presale

Ethereum's role in a controversial monopoly discussion, closely monitored by the SEC, is currently making headlines i...