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

Get Ready for a Crypto Carnival - New Listings and Delistings!

Check out our latest rundown of notable digital asset listings, delistings, and trading pair updates from crypto exch...

Opinion

What do legal experts think of the SBF trial?

If SBF is convicted of one or more charges he is facing, the length of time he will spend in prison will largely depe...

Blockchain

Interview with BitMax.io Cao Jing: Compliance, Localization and Traffic Integration, Exchange Status and Future

On October 19th, at the 1st anniversary of the BitMax.io exchange, Jingwei China Partner Harry, Sequoia Capital Partn...

Blockchain

Metropolitan Museum of Art in New York to return $550,000 FTX donation

According to Decrypt, the Metropolitan Museum of Art in New York has agreed to return hundreds of thousands of dollar...

Blockchain

How many entities hold Bitcoin? These 7 exchanges are worth watching

Written by: Rafael Schultze-Kraft Translation: Lu Jiangfei Source: Chain News Problems with quantifying the number of...

Blockchain

Bitfinex abolishes the minimum balance threshold of $10,000

Bitfinex, a Hong Kong-based cryptocurrency exchange, is now open to all traders as they canceled a minimum entry thre...