AI Coin Issuance Era is Coming? How Does ChatGPT Automatically Deploy and Create Tokens?
AI Coin Issuance Era ChatGPT's Automated Token Deployment and CreationBy 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…
- People’s Daily Online The integration of virtual and real promotes the accelerated development of the metaverse industry.
- Folius Ventures Discovering the North Star of Web3 Games – Crossing Liquidity Exhaustion, Identifying Entrepreneurial Competition Patterns and Potential New Opportunities
- Zero-knowledge Payments Achieving Privacy, Scalability, and Case Studies Introduction
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!
Was this article helpful?
93 out of 132 found this helpful
Related articles
- Evening Must-Read | Is Full Chain Gaming Really the Future Direction?
- LianGuaiWeb3.0 Daily | Tether buys Nvidia chips worth $420 million
- Hong Kong regulators intensify their investigation into JPEX trading platform.
- a16z interprets why it led the investment in the blockchain gaming company Proof of Play with $33 million
- Proof of Play CEO Why is On-Chain Gaming the Future of Game Development
- SBF trial imminent, let’s see what legal experts have to say
- Friend.tech Revelation How to Find the Next Web3 Social App Hit?