Skip to content

Commit

Permalink
fix: docs audit /developer section (#1458)
Browse files Browse the repository at this point in the history
* fix: docs audit `/developer` section

* fix: remove Mobile Wallet (Valora Testnet Wallet) from docs

* fix: broken link on `walkthrough/hello-celo` page

* fix: based on comments on PR
  • Loading branch information
therealharpaljadeja authored Aug 26, 2024
1 parent ea8f8de commit 0b68568
Show file tree
Hide file tree
Showing 34 changed files with 16 additions and 703 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ MiniPay is an Android app.

In order to test and view dApps when building on MiniPay you might not have an Android device, this is when you can use an Android Emulator!

:::info
You cannot register a new account on MiniPay using Android Studio, you can only access existing accounts using Android Studio.
:::

In this guide, you will learn how you can setup an Android Simulator to test MiniPay dApps!

## Installing Android Studio
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Learn more about Celo Composer in the [README](https://github.com/celo-org/celo-
<!-- make the below text code block because crowdin is messing it up -->

```mdx-code-block
Developers can build with Celo using many [Ethereum](https://ethereum.org/en/) compatible tools including Remix, Truffle, Hardhat, and others. By making a few adjustments to your project’s network configuration settings, you can deploy your new or existing dApp on Celo.
Developers can build with Celo using many [Ethereum](https://ethereum.org/en/) compatible tools including Remix, Hardhat, and others. By making a few adjustments to your project’s network configuration settings, you can deploy your new or existing dApp on Celo.
```

- [Using thirdweb](/developer/deploy/thirdweb)
Expand Down
1 change: 0 additions & 1 deletion docs/developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Easily build Celo dApps with Celo Composer.

- [Celo Composer](https://github.com/celo-org/celo-composer#celo-composer)
- [Developer Tutorials](https://celo.academy/c/tutorials/4)
- [Figment](https://learn.figment.io/protocols/celo)
- [Dacade](https://dacade.org/communities/celo)

## Migrate to Celo
Expand Down
1 change: 0 additions & 1 deletion docs/developer/sdks/celo-sdks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Because Celo is compitable with Ethereum any ethereum package can be used with C
- [ContractKit](../contractkit/index.md)
- [thirdweb SDK](../thirdweb-sdk/index.md)
- [Rainbowkit-Celo](../rainbowkit-celo/index.md)
- [iOS SDK](https://github.com/heymateag/celoiossdk)
18 changes: 2 additions & 16 deletions docs/developer/setup/development-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ Running the development Celo blockchain is helpful because it greatly speeds up

You can run the development Celo blockchain in several ways:

### Use Ganache to fork Mainnet or Alfajores

You can start a local EVM development blockchain with [Ganache](https://trufflesuite.com/docs/ganache/index.html). Once Ganache is installed you can fork Mainnet or Alfajores with a single command. Read more about it in the [Ganache docs here](https://trufflesuite.com/blog/introducing-ganache-7/index.html#1-zero-config-mainnet-forking).

```shell
ganache --fork.url https://forno.celo.org
```

This allows you to interact with contracts and accounts that were deployed at the specified fork point, including DeFi applications and protocol contracts like the [Reserve](https://explorer.celo.org/address/0xc683e6f77B58D814B31F8661331EbDf63785D607/contracts), [cUSD](https://explorer.celo.org/address/0x765DE816845861e75A25fCA122bb6898B8B1282a/contracts), [cEUR](https://explorer.celo.org/token/0xD8763CBa276a3738E6DE85b4b3bF5FDed6D6cA73/token-transfers), [Accounts](https://explorer.celo.org/address/0x7d21685C17607338b313a7174bAb6620baD0aaB7/read-proxy), Governance and [other contracts](https://github.com/celo-org/celo-monorepo/tree/master/packages/protocol/contracts).

You also get 10 accounts funded with fake CELO to deploy your contracts and run tests in this simulated mainnet environment.

Be aware that you will not be able to pay transaction fees in stable coins since this is an Ethereum enviroment. It behaves similarly to the Celo EVM but not exactly.

### Use the celo-devchain NPM package

The easiest is to use a "pre-generated" devchain from the [celo-devchain](https://github.com/zviadm/celo-devchain) NPM package. For that all you have to do is:
Expand Down Expand Up @@ -124,6 +110,6 @@ You are now prepared to start developing, transacting and deploying contracts on

### Using Ethereum developers tools with Celo

You can connect the development chain to a tool like [Truffle](https://trufflesuite.com/docs/truffle/) or [Remix](https://remix.ethereum.org/) to begin interacting with it. Keep in mind that these tools are built primarily for Ethereum development and are compatible with Celo because Celo is similar to Ethereum. The two blockchains have similar block architectures and both run the Ethereum Virtual Machine \(EVM\) for executing smart contracts.
You can connect the development chain to a tool like [Remix](https://remix.ethereum.org/) to begin interacting with it. Keep in mind that these tools are built primarily for Ethereum development and are compatible with Celo because Celo is similar to Ethereum. The two blockchains have similar block architectures and both run the Ethereum Virtual Machine \(EVM\) for executing smart contracts.

The main difference between Celo and Ethereum that dapp developers need to keep in mind is that Celo has a slightly different transaction object than Ethereum. Celo requires one additional field in a transaction object, a `feeCurrency`. When Truffle and Remix are connected to a locally running Celo node, the local node will fill these fields with default values \(if the fields are empty\). The node will sign the Celo transaction and broadcast it to the network.
The main difference between Celo and Ethereum that dapp developers need to keep in mind is that Celo has a slightly different transaction object than Ethereum. Celo requires one additional field in a transaction object, a `feeCurrency`. When Remix is connected to a locally running Celo node, the local node will fill these fields with default values \(if the fields are empty\). The node will sign the Celo transaction and broadcast it to the network.
68 changes: 1 addition & 67 deletions docs/developer/setup/mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ While Xcode falls under the Celo Prerequisites, Xcode takes a long time to downl
#### Install Node and npm via nvm

```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
```

Verify the installation by running:
Expand Down Expand Up @@ -139,42 +139,6 @@ docker --version

## Celo Prerequisites

### Truffle

Since the Celo Blockchain has [shared ancestry with Ethereum](/developer/migrate/from-ethereum) and maintains full EVM compatibility, you can use Ethereum tools to develop Celo applications. [Truffle](https://www.trufflesuite.com/truffle) is a development framework for Ethereum and assists with writing your contracts, testing, and deploying.

Similar to how you might use a framework like React instead of vanilla JavaScript, you can use Truffle to abstract away a lot of the imperative details from Solidity (the language used to write smart contracts).

**Install Truffle**

```shell
npm install -g truffle
```

**Configuring Truffle**

You will need to configure Truffle to work with Celo. Connecting to Celo and managing transactions is easiest with [ContractKit](/developer/contractkit/). You can import contractkit directly into your `truffle.config.js` file in your Truffle project, add a private key and network details. You can see [this example config file](https://github.com/critesjosh/hello_contract-truffle/blob/master/truffle-config.js) for reference.

The Truffle deployer may have trouble estimating the deployment transaction gas limit, for which you will receive an error like:

```shell
Error: *** Deployment Failed ***

"Migrations" -- invalid argument 0: json: cannot unmarshal invalid hex string into Go value of type hexutil.Bytes.
```

You can resolve this by specifying the `gas` field in the network details in `truffle.config.js`.

For example:

```js
alfajores: {
provider: kit.connection.web3.currentProvider,
network_id: 44787,
gas: 4000000,
}
```

### Local Development Blockchain

See [Local Development Chain w/ Protocol Contracts](/developer/setup/development-chain) for how to get started with developing on a local test environment.
Expand All @@ -200,36 +164,6 @@ Installation can take over a minute, so be patient depending on your internet co

:::

### Celo Wallet

Celo Wallet is the development wallet to onboard onto the Celo network, manage funds, and send payments. Since Celo does not have a web wallet, you will need to use the mobile wallet.

There is a [detailed write-up](https://github.com/celo-org/celo-monorepo) on the celo-monorepo for the Celo Wallet. This guide only includes the summarized installation instructions for macOS. If you're on another OS, please refer to that guide instead of this document.

:::info

Celo's focus on mobile-first means that the priority has been on mobile applications and tooling. We know there is a growing demand for web applications and have several projects underway to build the tools needed to support web-based applications. In the meantime, you can still use your web-savvy skills to develop mobile apps without too much of a learning curve because of frameworks like React Native and Expo.

:::

### Celo Wallet Prerequisites

#### Watchman

[Watchman](https://facebook.github.io/watchman/) exists to watch files and record when they change. You can use it with the Celo Wallet.

**Install Watchman**

You can install [Watchman](https://facebook.github.io/watchman/docs/install.html) with brew

```shell
# Update brew if you haven't recently
$ brew update

# Install watchman
$ brew install watchman
```

### iOS

#### Xcode
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/setup/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ You can view the source documentation for setting up the Linux distro [here](htt

### Set up the Linux Environment

Now that you have Linux installed, let’s install [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/). Nvm \(node version manager\) makes it easy to install and manage different versions of Node.js. The following instructions are from the [celo-monoreop setup documentation for Linux](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md#linux).
Now that you have Linux installed, let’s install [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/). Nvm \(node version manager\) makes it easy to install and manage different versions of Node.js. The following instructions are from the [celo-monorepo setup documentation for Linux](https://github.com/celo-org/celo-monorepo/blob/master/SETUP.md#linux).

Run the following commands in the Linux terminal.

```bash
# Installing Nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
source ~/.bashrc

# Setting up the desired Nvm version
Expand Down
6 changes: 0 additions & 6 deletions docs/developer/walkthrough/hello-celo.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ Because we are accessing the network remotely, we need to generate an account to

There is a short script in `getAccount.js` to either get a Celo account from a mnemonic in the `.secret` file, or create a random account if the file is empty. In the script, we use`web3.js` to create a new private key/account pair. [Web3.js](https://web3js.readthedocs.io/) is a popular javascript library for handling Ethereum related functionality. Celo is a cousin of Ethereum, so this library works well for generating Celo accounts.

:::danger

This is not the standard way of managing Celo accounts. In a production environment, the [Celo Wallet](/wallet/celo-wallet/functionality) will manage accounts for you. Accessing accounts from the Celo Wallet will be discussed in future guides.

:::

We can now use this `account` to get account information \(ie the private key and account address\) and to send transactions from `account.address`. Add the following code to read the account balance. Continue adding to `helloCelo.js`.

```javascript title="helloCelo.js"
Expand Down
10 changes: 0 additions & 10 deletions docs/learn/celo-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ Curated collection of Celo resources for developers, designers, dreamers, and do

---

## Code Examples

- [Sending Celo and cUSD](/developer/walkthrough/hello-celo)
- [Deploy a Contract using a Local Node](/developer/walkthrough/hello-contracts)
- [Deploy and Interact with Remote Contracts](/developer/walkthrough/hello-contract-remote-node)
- [Deply an ERC20 Token to Celo](/developer/walkthrough/no-code-erc20)
- [Deploy and NFT to Celo](/developer/walkthrough/no-code-erc721)
- [Create a Voting dApp with React Native on Celo](/developer/walkthrough/web-dapp)
- [Local Key Management using Keystores](/developer/walkthrough/using-js-keystores)

## Developer Guide

- [Local Development Chain with Protocol Contracts](/developer/setup/development-chain)
Expand Down
10 changes: 0 additions & 10 deletions docs/learn/developer-onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,12 @@ If you’re unfamiliar with any of these topics, here’s a few places to get st
- [Deploy with Remix](/developer/deploy/remix)
- [Deploy with Hardhat](/developer/deploy/hardhat)

## Celo Developer Pathway

- [Figment Learn](figment-learn)

## Build Celo Applications

- [Build Mobile-First DeFi Apps with the Celo SDK](https://medium.com/celoorg/build-mobile-first-defi-apps-with-the-celo-sdk-e6f85f2fe18c)
- [Developing & deploying your first DApp on Celo](https://www.youtube.com/watch?v=kO6Wm8pgKXU&list=PLsQbsop73cfGmUdABArPaXagPB2EpBkNc&index=12)
- [Building your first DApps on Celo, Part 2](https://www.youtube.com/watch?v=KjaH8H9ssvk&list=PLsQbsop73cfGmUdABArPaXagPB2EpBkNc&index=13)

## Code Examples with Celo

- [Sending Celo](/developer/walkthrough/hello-celo)
- [Deploy a Contract (local node)](/developer/walkthrough/hello-contracts)
- [Deploy and Interact with Contracts (Remotely)](/developer/walkthrough/hello-contract-remote-node)

## Create a Web dApp with Celo

- [Interact with Celo core contracts](https://github.com/celo-org/celo-monorepo/blob/e49efb31f45cab65db3d2ba58ffa59249197be0b/packages/docs/developer-resources/walkthroughs/web-dapp.md)
Expand Down
44 changes: 0 additions & 44 deletions docs/learn/figment-learn.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/network/alfajores/run-full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,3 @@ true
$ celocli account:new
...
```

## Light Client Serving

Light clients may connect to you as people run the [Celo Mobile Wallet](/wallet/mobile-wallet/setup). The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept.
28 changes: 0 additions & 28 deletions docs/network/alfajores/use-mobile-wallet.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/network/baklava/run-full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,3 @@ true
$ celocli account:new
...
```

## Light Client Serving

Light clients may connect to you as people run the [Celo Mobile Wallet](/wallet/mobile-wallet/setup). The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept.
4 changes: 0 additions & 4 deletions docs/network/mainnet/run-full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,3 @@ true
$ celocli account:new
...
```

## Light Client Serving

Light clients may connect to you as people run the [Celo Mobile Wallet](/wallet/mobile-wallet/setup). The `light.serve` parameter defines the percentage of time this node should spend serving light clients. Valid values are 0-100. If this node is having trouble catching up to the current block, dropping this to a lower percentage may help. The `light.maxpeers` and `maxpeers` parameters set limits on the number of light clients and full node peers that the node will accept.
Loading

0 comments on commit 0b68568

Please sign in to comment.