Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dapp: Replace sapphire_testnet -> sapphire-testnet for consistency #623

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/dapp/opl/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ index cd8df42..0875e8e 100644
+ local: {
+ url: 'http://127.0.0.1:8545',
+ },
+ bsc_testnet: {
+ 'bsc-testnet': {
+ url: 'https://data-seed-prebsc-1-s1.binance.org:8545',
+ chainId: 97,
+ accounts,
+ },
+ sapphire_testnet: {
+ 'sapphire-testnet': {
+ url: 'https://testnet.sapphire.oasis.dev',
+ chainId: 0x5aff,
+ accounts,
Expand Down Expand Up @@ -142,7 +142,7 @@ export PRIVATE_KEY=
Deploy the enclave smart contract using Testnet parameters.

```shell
npx hardhat deploy-ballot-box --network sapphire_testnet --host-network bsc_testnet
npx hardhat deploy-ballot-box --network sapphire-testnet --host-network bsc-testnet
Nothing to compile
No need to generate any newer typings.
expected DAO 0xFBcb580DD6D64fbF7caF57FB0439502412324179
Expand All @@ -153,7 +153,7 @@ Next, use the obtained `BallotBox` address below to deploy the host smart
contract:

```shell
npx hardhat deploy-dao --network bsc_testnet --ballot-box-addr {BALLOT_BOX_ADDR}
npx hardhat deploy-dao --network bsc-testnet --ballot-box-addr {BALLOT_BOX_ADDR}
Nothing to compile
No need to generate any newer typings.
DAO 0xFBcb580DD6D64fbF7caF57FB0439502412324179
Expand Down
2 changes: 1 addition & 1 deletion docs/dapp/sapphire/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Now, you can deploy the contract on the Testnet with the private key of the
account holding some [TEST tokens]:

```shell
PRIVATE_KEY="0x..." npx hardhat run scripts/deploy.js --network sapphire_testnet
PRIVATE_KEY="0x..." npx hardhat run scripts/deploy.js --network sapphire-testnet
```

This will compile the contract and deploy it on the Testnet. In addition
Expand Down
10 changes: 5 additions & 5 deletions docs/dapp/sapphire/gasless.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ test token. Use the address of your account as `--burnAddress` and
`--devAddress` parameters:

```shell
npx gsn deploy --network sapphire_testnet --burnAddress 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --devAddress 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --testToken true --testPaymaster true --yes --privateKeyHex $PRIVATE_KEY
npx gsn deploy --network sapphire-testnet --burnAddress 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --devAddress 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --testToken true --testPaymaster true --yes --privateKeyHex $PRIVATE_KEY
```

After the command finishes successfully, you should find the addreses of
Expand Down Expand Up @@ -336,20 +336,20 @@ tokens to pay for others' transactions. Let's fund the paymaster with
and `--paymaster` values:

```shell
npx gsn paymaster-fund --network sapphire_testnet --hub 0xc4423AB6133B06e4e60D594Ac49abE53374124b3 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d --privateKeyHex $PRIVATE_KEY --amount 5000000000000000000
npx gsn paymaster-fund --network sapphire-testnet --hub 0xc4423AB6133B06e4e60D594Ac49abE53374124b3 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d --privateKeyHex $PRIVATE_KEY --amount 5000000000000000000
```

You can check the balance of the paymaster by running:

```shell
npx gsn paymaster-balance --network sapphire_testnet --hub 0xc4423AB6133B06e4e60D594Ac49abE53374124b3 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d
npx gsn paymaster-balance --network sapphire-testnet --hub 0xc4423AB6133B06e4e60D594Ac49abE53374124b3 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d
```

Next, we need to register the relay server with the your desired `relayUrl` by
staking the `token` the relayHub requires.

```shell
npx gsn relayer-register --network sapphire_testnet --relayUrl 'http://localhost:8090' --token 0x6Ed21672c0c26Daa32943F7b1cA1f1d0ABdbac66 --wrap true --privateKeyHex $PRIVATE_KEY
npx gsn relayer-register --network sapphire-testnet --relayUrl 'http://localhost:8090' --token 0x6Ed21672c0c26Daa32943F7b1cA1f1d0ABdbac66 --wrap true --privateKeyHex $PRIVATE_KEY
```

After this step, your relay server should be ready to take incoming relay
Expand All @@ -366,7 +366,7 @@ Scroll up to find the GSN deployment response and use the following parameters:
Parameters matching our deployment would be:

```shell
npx gsn send-request --network sapphire_testnet --abiFile 'node_modules/@oasislabs/opengsn-cli/dist/compiled/TestRecipient.json' --method emitMessage --methodParams 'hello world!' --to 0x594cd6354b23A5200a57355072E2A5B15354ee21 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d --privateKeyHex $PRIVATE_KEY --from 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --gasLimit 150000 --gasPrice 100
npx gsn send-request --network sapphire-testnet --abiFile 'node_modules/@oasislabs/opengsn-cli/dist/compiled/TestRecipient.json' --method emitMessage --methodParams 'hello world!' --to 0x594cd6354b23A5200a57355072E2A5B15354ee21 --paymaster 0x8C06261f58a024C958d42df89be7195c8690008d --privateKeyHex $PRIVATE_KEY --from 0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204 --gasLimit 150000 --gasPrice 100
```

:::info
Expand Down
4 changes: 2 additions & 2 deletions docs/dapp/sapphire/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ index 414e974..49c95f9 100644
const config: HardhatUserConfig = {
solidity: "0.8.17",
+ networks: {
+ sapphire_testnet: {
+ 'sapphire-testnet': {
+ // This is Testnet! If you want Mainnet, add a new network config item.
+ url: "https://testnet.sapphire.oasis.dev",
+ accounts: process.env.PRIVATE_KEY
Expand Down Expand Up @@ -155,7 +155,7 @@ Pretty cool if you ask me!
Anyway, make it happen by running

```shell
PRIVATE_KEY="0x..." npx hardhat run scripts/run-vigil.ts --network sapphire_testnet
PRIVATE_KEY="0x..." npx hardhat run scripts/run-vigil.ts --network sapphire-testnet
```

And if you see something like the following, you'll know you're well on the road
Expand Down
Loading