From 3afbc5faeb3cfb70573a0a8d7374bbaed1bc1e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matev=C5=BE=20Jekovec?= Date: Mon, 20 Nov 2023 13:31:34 +0100 Subject: [PATCH] dapp: Replace sapphire_testnet -> sapphire-testnet for consistency --- docs/dapp/opl/build.md | 8 ++++---- docs/dapp/sapphire/browser.md | 2 +- docs/dapp/sapphire/gasless.md | 10 +++++----- docs/dapp/sapphire/quickstart.mdx | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/dapp/opl/build.md b/docs/dapp/opl/build.md index 8511fad535..5fd1157561 100644 --- a/docs/dapp/opl/build.md +++ b/docs/dapp/opl/build.md @@ -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, @@ -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 @@ -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 diff --git a/docs/dapp/sapphire/browser.md b/docs/dapp/sapphire/browser.md index 747c504797..20ab2f9a1a 100644 --- a/docs/dapp/sapphire/browser.md +++ b/docs/dapp/sapphire/browser.md @@ -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 diff --git a/docs/dapp/sapphire/gasless.md b/docs/dapp/sapphire/gasless.md index 7147ed8c4e..775690d504 100644 --- a/docs/dapp/sapphire/gasless.md +++ b/docs/dapp/sapphire/gasless.md @@ -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 @@ -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 @@ -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 diff --git a/docs/dapp/sapphire/quickstart.mdx b/docs/dapp/sapphire/quickstart.mdx index 31948f3cee..76dd35f4a2 100644 --- a/docs/dapp/sapphire/quickstart.mdx +++ b/docs/dapp/sapphire/quickstart.mdx @@ -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 @@ -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