From 7186adb9d81db204b68241b2b9cc1bfbd895f34e Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Wed, 9 Oct 2024 14:21:50 -0500 Subject: [PATCH] Remove unneeded sections (#536) --- ...1.ai-assited-smart-contract-development.md | 64 +------------------ 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/content/2.developers/3.guides/15.ai-assisted-development/1.smart-contract-development/1.ai-assited-smart-contract-development.md b/content/2.developers/3.guides/15.ai-assisted-development/1.smart-contract-development/1.ai-assited-smart-contract-development.md index ba7c7aa8..e78fcf0a 100644 --- a/content/2.developers/3.guides/15.ai-assisted-development/1.smart-contract-development/1.ai-assited-smart-contract-development.md +++ b/content/2.developers/3.guides/15.ai-assisted-development/1.smart-contract-development/1.ai-assited-smart-contract-development.md @@ -43,7 +43,7 @@ The main files we’ll be working on include: - **contract.rs**: Contains the core logic and execution flow of the smart contract. - **error.rs**: Handles error management and reporting in the contract. -In each section, we will walk through what needs to be done in the file, providing guidance and instructions for building out the voting smart contract and the prompts that will be submited to `ChatGPT` for it to generate the necessary code. +In each section, we will walk through what needs to be done in the file, providing guidance and instructions for building out the lottery smart contract and the prompts that will be submited to `ChatGPT` for it to generate the necessary code. ## Archway custom GPT @@ -96,68 +96,6 @@ The following would be the prompt: There may be errors in the `contract.rs` and other files. To address these, hover over each error to see the details of the error and copy the details into ChatGPT and following its instructions to rectify the errors which might require some code changes. Once there are no more errors you can move to the next section to start the process of deploying and creating a new instance of your contract on chain. -## Compiling the contract - -Compiling an Archway smart contract involves transforming the Rust source code into WebAssembly (Wasm) bytecode. This bytecode is what gets deployed and executed on the Archway blockchain. - - -The following would be the prompt: - -``` -How do I compile the contract to generate the WebAssembly (WASM) file using the Archway Developer CLI? -``` - -## Deploying the contract - -Deploying a smart contract involves uploading the compiled Wasm bytecode to the blockchain. This process registers the contract code with the blockchain so that it can be instantiated later. - - -The following would be the prompt: - -``` -How do I deploy the compiled contract to the Archway blockchain using the Archway Developer CLI? -``` - -## Instantiating the contract - -Instantiating an Archway smart contract involves creating an instance of the uploaded Wasm bytecode on the blockchain with specific initial parameters. This step initializes the contract's state, generates a contract address and makes it ready for use. - -The following would be the prompt: - -``` -How do I instantiate the deployed contract using the Archway Developer CLI? -``` - -## Entering the lottery - -Executing a transaction involves sending a message to the instantiated contract to perform a specific action. This process updates the contract's state based on the logic defined in the contract's `ExecuteMsg` enum and associated functions. - -The following would be the prompt should share how to go about executing a transaction to have an account enter the lottery: - -``` -How do I have an account enter the lottery by paying a small fee using the Archway Developer CLI? -``` - -## Drawing a winner - -This would be another transaction that will select the winner. - -The following would be the prompt: - -``` -How do I draw a winner from the participants using the Archway Developer CLI? -``` - -## Querying the contract - -Querying involves sending a read-only request to the contract to retrieve data from its state. Queries do not modify the state of the contract; they simply fetch and return information. - -The following would be the prompt: - -``` -How do I query the contract to get the lottery pool and participants using the Archway Developer CLI? -``` - ## Build and optimize the contract Once the contract has been fully generated, the next step is to build and optimize your smart contract for deployment on-chain. This process compiles your code and generates the necessary WASM executable.