Skip to content

Commit

Permalink
Remove unneeded sections (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
emperorjm authored Oct 9, 2024
1 parent c238a54 commit 7186adb
Showing 1 changed file with 1 addition and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7186adb

Please sign in to comment.