Skip to content

Commit

Permalink
Merge branch 'main' into CU-8692tq8gw_Remove-Ethers-5_Xi-Zhang
Browse files Browse the repository at this point in the history
  • Loading branch information
CedarMist authored Jan 17, 2024
2 parents 2d1bbde + add1b7f commit 5fc1d83
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
# Fetch all history so gitlint can check the relevant commits.
fetch-depth: '0'
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20.x"
# Always run this step so that all linting errors can be seen at once.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: pnpm typedoc

- name: Upload client-js build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: client-js
retention-days: 1
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Download client-js build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-js
path: clients/js/lib
Expand All @@ -169,7 +169,7 @@ jobs:
run: pnpm build

- name: Upload integration-hardhat build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: integration-hardhat
retention-days: 1
Expand All @@ -187,7 +187,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.20.x"

Expand Down Expand Up @@ -235,13 +235,13 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Download client-js build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-js
path: clients/js/lib

- name: Download integration-hardhat build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: integration-hardhat
path: integrations/hardhat/dist
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/contracts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
contracts-test:
runs-on: ubuntu-latest
services:
sapphire-dev-ci:
image: ghcr.io/oasisprotocol/sapphire-dev:latest
sapphire-localnet-ci:
image: ghcr.io/oasisprotocol/sapphire-localnet:latest
ports:
- 8545:8545
- 8546:8546
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: pnpm build
- name: Test contracts with Hardhat
working-directory: contracts
run: pnpm hardhat test --network sapphire-dev-ci
run: pnpm hardhat test --network sapphire-localnet-ci
- name: Build docs
working-directory: contracts
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21.x"

Expand Down
4 changes: 2 additions & 2 deletions clients/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/crypto v0.14.0
golang.org/x/sys v0.13.0 // indirect
golang.org/x/crypto v0.17.0
golang.org/x/sys v0.15.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)
10 changes: 5 additions & 5 deletions clients/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
Expand All @@ -146,9 +146,9 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
Expand Down
4 changes: 2 additions & 2 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ const config: HardhatUserConfig = {
? [process.env.SAPPHIRE_MAINNET_PRIVATE_KEY]
: [],
},
'sapphire-dev-ci': {
'sapphire-localnet-ci': {
url: `http://127.0.0.1:8545`,
chainId: 0x5afd,
accounts,
},
'sapphire-localnet': {
url: 'http://localhost:3000',
url: 'http://localhost:8545',
chainId: 0x5afd,
accounts,
},
Expand Down
20 changes: 10 additions & 10 deletions docs/guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ You can also explore other verification methods on Sourcify by reading the
## Running a Private Oasis Network Locally

For convenient development and testing of your dApps the Oasis team prepared
the [ghcr.io/oasisprotocol/sapphire-dev][sapphire-dev] Docker image which brings you a
the [ghcr.io/oasisprotocol/sapphire-localnet][sapphire-localnet] Docker image which brings you a
complete Oasis stack to your desktop. The Localnet Sapphire instance **mimics
confidential transactions**, but it does not run in a trusted execution
environment nor does it require Intel's SGX on your computer. The network is
Expand All @@ -311,13 +311,13 @@ isolated from Mainnet or Testnet and consists of:
To run the image, execute:

```sh
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-dev
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet
```

After a while, the tool will show you something like this:

```
sapphire-dev 2023-02-28-git84730b2 (oasis-core: 22.2.6, sapphire-paratime: 0.4.0, oasis-web3-gateway: 3.2.0-git84730b2)
sapphire-localnet 2023-02-28-git84730b2 (oasis-core: 22.2.6, sapphire-paratime: 0.4.0, oasis-web3-gateway: 3.2.0-git84730b2)

Starting oasis-net-runner with sapphire...
Starting postgresql...
Expand Down Expand Up @@ -352,9 +352,9 @@ Listening on http://localhost:8545 and ws://localhost:8546

Those familiar with local dApp environments will find the output above similar
to `geth --dev` or `ganache-cli` commands or the `geth-dev-assistant` npm
package. [sapphire-dev] will spin up a private Oasis Network locally, generate
and populate test accounts and make the following Web3 endpoints available for
you to use:
package. [sapphire-localnet] will spin up a private Oasis Network locally,
generate and populate test accounts and make the following Web3 endpoints
available for you to use:
- `http://localhost:8545`
- `ws://localhost:8546`

Expand All @@ -365,20 +365,20 @@ or to populate just a single wallet, use `-to` flag and pass the mnemonics or
the wallet addresses. For example

```sh
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-dev -to "bench remain brave curve frozen verify dream margin alarm world repair innocent"
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-dev -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet -to "bench remain brave curve frozen verify dream margin alarm world repair innocent"
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet -to "0x75eCF0d4496C2f10e4e9aF3D4d174576Ee9010E2,0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
```

:::

:::danger

[sapphire-dev] runs in ephemeral mode. Any smart contract and wallet balance
[sapphire-localnet] runs in ephemeral mode. Any smart contract and wallet balance
will be lost after you quit the Docker container!

:::

[sapphire-dev]: https://github.com/oasisprotocol/oasis-web3-gateway/pkgs/container/sapphire-dev
[sapphire-localnet]: https://github.com/oasisprotocol/oasis-web3-gateway/pkgs/container/sapphire-localnet

## See also

Expand Down
2 changes: 1 addition & 1 deletion examples/onchain-signer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To also run confidential tests, you need to spin up a Localnet Sapphire node.
For example in the Docker:

```shell
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-dev -test-mnemonic -n 5
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet -test-mnemonic -n 5
```

Then, let tests use the Localnet network:
Expand Down
4 changes: 2 additions & 2 deletions examples/onchain-signer/test/CommentBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ describe('CommentBox', function () {
});

it('Should comment gasless', async function () {
// You can set up sapphire-dev image and run the test like this:
// docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-dev -to 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
// You can set up sapphire-localnet image and run the test like this:
// docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet -to 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
// npx hardhat test --grep proxy --network sapphire-localnet
const chainId = (await ethers.provider.getNetwork()).chainId;
if (chainId == BigInt(1337)) {
Expand Down

0 comments on commit 5fc1d83

Please sign in to comment.