Skip to content

Commit

Permalink
rmv 'copy' from codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
salmad3 committed Nov 7, 2024
1 parent 5184c99 commit acdf5df
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 41 deletions.
10 changes: 5 additions & 5 deletions pages/build/building-a-frontend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Before starting, ensure you have:

Start by creating a new React project using Vite's TypeScript template for streamlined development:

```bash copy
```bash
npm create vite@latest my-counter-frontend -- --template react-ts
```

Expand All @@ -43,7 +43,7 @@ This command creates a new folder with a React project using TypeScript. Open `m

Install `ethers`, an Ethereum library that facilitates interaction with the Ethereum blockchain:

```bash copy
```bash
npm install ethers
```

Expand All @@ -62,7 +62,7 @@ First, import the address and ABI of the CosmWasm precompile from `@sei-js/evm`.
`@sei-js/evm` is an npm package that contains useful constants and helpers for interacting with the EVM on Sei.

To install sei-js:
```bash copy
```bash
npm install @sei-js/evm
```

Expand Down Expand Up @@ -228,7 +228,7 @@ Before starting, ensure you have:

If you're starting a project from scratch, we recommend using the TypeScript template from Vite for easier development and debugging.

```bash copy
```bash
npm create vite@latest my-counter-frontend -- --template react-ts
```

Expand All @@ -243,7 +243,7 @@ This command creates a new folder with a React project using TypeScript. Open `m

From the terminal at the root of your project, install the required dependencies: `@sei-js/core` and `@sei-js/react`.

```bash copy
```bash
npm install @sei-js/core @sei-js/react
```

Expand Down
12 changes: 6 additions & 6 deletions pages/build/installing-seid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ make install

You can verify that Seid was installed correctly by running:

```bash copy
```bash
seid version
```

Expand All @@ -30,7 +30,7 @@ seid version

1. Use `go env GOPATH` to find your GOPATH
2. Add the following lines to your `~/.bashrc` or `~/.zshrc`:
```bash copy
```bash
export GOPATH=[your GOPATH from step 1]
export PATH=$PATH:$GOPATH/bin
```
Expand Down Expand Up @@ -88,15 +88,15 @@ Use "seid [command] --help" for more information about a command.

You can create a new wallet using the `seid keys` command:

```bash copy
```bash
seid keys add $NAME
```

Please replace `$NAME` with the name you would like to use for this key. This will generate a seed phrase and store the account in the CLI for use. Write this mnemonic down and store it in a safe place.

Alternatively, if you would like to import an existing seed phrase, you can add the `--recover` flag:

```bash copy
```bash
seid keys add $NAME --recover
```

Expand All @@ -116,12 +116,12 @@ This will generate a different address than the default coin type of `118`.

To see your local wallets, you can run

```bash copy
```bash
seid keys list
```
to see a list of all wallets added, or

```bash copy
```bash
seid keys show $NAME
```

Expand Down
34 changes: 17 additions & 17 deletions pages/build/nft-contract-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Before we start, ensure you have:

1. Initialize a new Foundry project:

```bash copy
```bash
forge init my-nft-project
cd my-nft-project
```

2. Install OpenZeppelin, a library for secure smart contract development.

```bash copy
```bash
forge install OpenZeppelin/openzeppelin-contracts
```

Expand Down Expand Up @@ -65,7 +65,7 @@ You may see an error in your IDE about importing `openzeppelin-contracts`. To
resolve this, run this command to create `remapping.txt` in the root of your
project:

```bash copy
```bash
forge remappings > remappings.txt
```

Expand All @@ -78,21 +78,21 @@ forge remappings > remappings.txt
1. Write tests for your contract in the `test/` directory.
2. Run your tests with:

```bash copy
```bash
forge test
```

## Deploying Your Contract

1. Compile your contract:

```bash copy
```bash
forge build
```

2. Deploy your contract to a local testnet (e.g., using Anvil, Foundry's local Ethereum node):

```bash copy
```bash
anvil -a 1
```

Expand All @@ -104,7 +104,7 @@ forge remappings > remappings.txt

In a new terminal, deploy your contract:

```bash copy
```bash
forge create --rpc-url http://localhost:8545 --private-key <test_account_private_key> src/MyNFT.sol:MyNFT --legacy
```

Expand All @@ -116,7 +116,7 @@ forge remappings > remappings.txt

3. Deploy contract to the Sei devnet (EVM endpoint):

```bash copy
```bash
forge create --rpc-url https://evm-rpc.arctic-1.seinetwork.io/ --private-key <your_private_key> src/MyNFT.sol:MyNFT --legacy
```

Expand All @@ -136,7 +136,7 @@ forge remappings > remappings.txt

To enable seamless use of this NFT contract in CosmWasm environments, you can create a pointer contract. This process results in an CW721 token that can be imported and used in Sei wallets and applications.

```bash copy
```bash
seid tx evm register-cw-pointer ERC721 $ERC721_TOKEN_ADDRESS --from $ACCOUNT --chain-id=arctic-1 --fees=25000usei --node=https://rpc-arctic-1.sei-apis.com/
```

Expand Down Expand Up @@ -180,20 +180,20 @@ Before starting, ensure you have:

To work with CosmWasm smart contracts, you'll need the Wasm rust compiler installed to build Wasm binaries. To install it, run:

```bash copy
```bash
rustup target add wasm32-unknown-unknown
```

Next, clone the `CW721-base` contract from the [cw-nfts](https://github.com/CosmWasm/cw-nfts) repository:

```bash copy
```bash
git clone https://github.com/CosmWasm/cw-nfts.git
cd cw-nfts/contracts/cw721-base
```

To test your setup, run:

```bash copy
```bash
cargo test
```

Expand All @@ -207,7 +207,7 @@ Review and modify the `cw721-base` contract to meet your requirements. This migh

To build the contract, run:

```bash copy
```bash
cargo wasm
```

Expand All @@ -220,7 +220,7 @@ This compiles a Wasm binary for uploading to Sei.

Before we can upload the contract to the chain, we have to use the [CosmWasm Rust Optimizer](https://github.com/CosmWasm/rust-optimizer) to reduce the contract size. While not required, this is highly recommended for live contracts.

```bash copy
```bash
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
Expand All @@ -239,7 +239,7 @@ This will generate an optimized Wasm contract in `/artifacts`.

Upload your contract:

```bash copy
```bash
seid tx wasm store artifacts/cw721_base.wasm --from=$ACCOUNT --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/ --broadcast-mode=block --gas=5000000 --fees=500000usei
```

Expand All @@ -249,7 +249,7 @@ Replace `$ACCOUNT` with your account name or address. This command stores the co

Instantiate your contract using the code ID:

```bash copy
```bash
seid tx wasm instantiate $CONTRACT_CODE_ID '{"name":"$COLLECTION_NAME", "symbol":"$SYMBOL"}' --from=$ACCOUNT --admin=$ADMIN_ADDRESS --label=$LABEL --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/ --broadcast-mode=block --gas=250000 --fees=25000usei
```

Expand All @@ -266,7 +266,7 @@ Replace `$CONTRACT_CODE_ID`, `$ACCOUNT`, `$LABEL`, and `$ADMIN_ADDRESS` appropri

To enable seamless use of this NFT contract in EVM environments, you can create a pointer contract. This process results in an ERC721 token that can be imported and used in EVM wallets and applications.

```bash copy
```bash
seid tx evm deploy-erccw721 $CW721_TOKEN_ADDRESS $NAME $SYMBOL --from=$SENDER --evm-rpc=https://evm-rpc.arctic-1.seinetwork.io/
```

Expand Down
12 changes: 6 additions & 6 deletions pages/build/tokenfactory-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To create a token on the devnet, ensure you have the following setup:

## Creating a Denom

```bash copy
```bash
seid tx tokenfactory create-denom $DENOM --from=$ACCOUNT --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/ --broadcast-mode=block --fees=20000usei
```

Expand Down Expand Up @@ -123,7 +123,7 @@ Replace `$METADATA_FILE` with the path to your metadata file created in step 1.

## Minting Tokens

```bash copy
```bash
seid tx tokenfactory mint $AMOUNT --from=$ACCOUNT --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/ --broadcast-mode=block --fees=20000usei
```

Expand All @@ -140,13 +140,13 @@ AMOUNT=1000000factory/${ACCOUNT}/${DENOM}

To verify that the tokens have been minted, query the balance of your account:

```bash copy
```bash
seid query bank balances $ACCOUNT --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/
```

## Burning Tokens

```bash copy
```bash
seid tx tokenfactory burn $AMOUNT --from=$ACCOUNT --chain-id=arctic-1 --node=https://rpc.arctic-1.seinetwork.io/ --broadcast-mode=block --fees=20000usei
```

Expand All @@ -167,7 +167,7 @@ Only the token admin has permission to mint and burn tokens. If necessary, you c

To enable seamless use of this token in EVM environments, we can create a pointer contract. This process results in an ERC20 token that can be imported and used in EVM wallets and applications.

```bash copy
```bash
seid tx evm register-evm-pointer NATIVE factory/${ACCOUNT}/${DENOM} --from=$ACCOUNT --fees 20000usei --evm-rpc=https://evm-rpc.arctic-1.seinetwork.io/
```

Expand All @@ -186,7 +186,7 @@ Note that if you wish to specify denoms on your ERC20 tokens, you will need to [

To query the pointer contract address run the following command:

```bash copy
```bash
seid q evm pointer NATIVE factory/${ACCOUNT}/${DENOM} --node=https://rpc.arctic-1.seinetwork.io/
```
Which will return the address of the pointer contract.
Expand Down
8 changes: 4 additions & 4 deletions pages/learn/oracles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Below are some helpful APIs to interact with the native Oracle module

Returns the current active denoms for which there are exchange rates

```bash copy {1}
```bash {1}
seid q oracle actives
actives:
- uatom
Expand All @@ -29,7 +29,7 @@ actives:
Returns the current exchange rates for supported assets. Optionally can query for a specific denom by entering it as
an additional param.

```bash copy {1}
```bash {1}
seid q oracle exchange-rates
- denom: uatom
oracle_exchange_rate:
Expand All @@ -50,7 +50,7 @@ seid q oracle exchange-rates
Returns the time weighted average price for a given time interval in seconds. The maximum lookback is determined by
oracle parameters.

```bash copy {1}
```bash {1}
seid q oracle twaps $LOOKBACK_SECONDS
oracle_twaps:
- denom: uatom
Expand All @@ -68,7 +68,7 @@ oracle_twaps:

Returns the current parameters for the oracle module

```bash copy {1}
```bash {1}
seid q oracle params
params:
lookback_duration: "3600"
Expand Down
4 changes: 2 additions & 2 deletions pages/node/oracle-price-feeder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Validator need to participate in providing pricing for the oracle to avoid being
oracle sidecar that can be configured to run as a systemd service to provide a more robust and configurable solution to
providing oracle asset prices. The sidecar can be built by running

```bash copy
```bash
make install-price-feeder
```

Expand Down Expand Up @@ -60,6 +60,6 @@ If you want to run the oracle price feeder while signing from a different accoun
setting a feeder for your validator. This will allow the feeder account to perform oracle votes on the validator behalf
as well.

```bash copy
```bash
seid tx oracle set-feeder $FEEDER_ADDR --from $WALLET_NAME --fees 2000usei --chain-id $CHAIN_ID
```
2 changes: 1 addition & 1 deletion pages/reference/precompiles/example-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Sei precompiles can be used like any standard smart contract on the EVM. For

To install `ethers`, run the following command in your project directory terminal:

```bash copy
```bash
npm install ethers
npm install @sei-js/evm
```
Expand Down

0 comments on commit acdf5df

Please sign in to comment.