Skip to content

Commit

Permalink
Merge branch 'develop' into feature/oasis-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelleher committed May 8, 2024
2 parents a7ce550 + 0acb602 commit 5cd58fa
Show file tree
Hide file tree
Showing 188 changed files with 21,688 additions and 20,662 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ethereum-smart-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
node: ['20.x']
os: [ubuntu-latest]

defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ethereum-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x']
node: ['20.x']
os: [ubuntu-latest]

defaults:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/solana-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
# This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos )
rust: [ '1.69' ]
rust: [ '1.74' ]
os: [ ubuntu-latest ]

steps:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [ '1.69' ] # This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos )
rust: [ '1.74' ] # This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos )
solana: [ 'edge' ]
os: [ ubuntu-latest ]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/solana-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["16.x"]
node: ["20.x"]
os: [ubuntu-latest]

defaults:
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
strategy:
matrix:
# This should match rust-toolchain.toml ( actions-rs/toolchain@v1 does not pick it up directly in monorepos )
rust: ["1.69"]
node: ["16.x"]
rust: ["1.74"]
node: ["20.x"]
solana: ["edge"]
os: [ubuntu-latest]

Expand Down
306 changes: 153 additions & 153 deletions ethereum/gatekeeper-cli/README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ethereum/gatekeeper-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@identity.com/gateway-eth-cli",
"version": "0.2.2",
"version": "0.2.3",
"description": "Identity.com Gateway Protocol EVM CLI",
"author": "dankelleher @dankelleher",
"bin": {
Expand All @@ -25,7 +25,7 @@
"@ethersproject/units": "^5.7.0",
"@ethersproject/wallet": "^5.7.0",
"@ethersproject/web": "^5.7.1",
"@identity.com/gateway-eth-ts": "0.8.1",
"@identity.com/gateway-eth-ts": "^0.8.1",
"@oclif/core": "^1.23.2",
"@oclif/dev-cli": "^1.26.10",
"@oclif/plugin-help": "^5",
Expand Down
2 changes: 1 addition & 1 deletion ethereum/gatekeeper-cli/src/commands/is-gatekeeper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class IsGatekeeper extends Command {

const parsedFlags = parseFlags({...flags, readOnly: true})

if (!parsedFlags.gatekeeperNetwork) {
if (parsedFlags.gatekeeperNetwork === undefined) {
console.log('Usage:', IsGatekeeper.examples)
throw new Error('Gatekeeper network not specified')
}
Expand Down
9 changes: 4 additions & 5 deletions ethereum/gatekeeper-cli/src/utils/oclif/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {BigNumber} from '@ethersproject/bignumber'
const DEFAULT_NETWORK_AUTHORITY_PRIVATE_KEY = '0xf1ddf80d2b5d038bc2ab7ae9a26e017d2252218dc687ab72d45f84bfbee2957d'

// The test GKN: tgnuXXNMDLK8dy7Xm1TdeGyc95MDym4bvAQCwcW21Bf
export const DEFAULT_GATEKEEPER_NETWORK = 1
export const DEFAULT_GATEKEEPER_NETWORK = '1'

export const privateKeyFlag = Flags.custom<string>({
char: 'p',
Expand Down Expand Up @@ -45,10 +45,9 @@ export const chainFlag = Flags.custom<BaseProvider>({
description: 'Specify target chain to work with (or set DEFAULT_CHAIN environment variable)',
})

export const gatekeeperNetworkFlag = Flags.custom<number>({
export const gatekeeperNetworkFlag = Flags.custom<string>({
char: 'n',
name: 'gatekeeper-network',
parse: async (input: string) => Number(input),
default: DEFAULT_GATEKEEPER_NETWORK,
description:
'Gatekeeper network. Defaults to the test Gatekeeper Network',
Expand Down Expand Up @@ -90,7 +89,7 @@ export const gasLimitFlag = Flags.custom<BigNumber>({
type Flags = {
chain: Provider | undefined
gatewayTokenAddress: string | undefined
gatekeeperNetwork: number | undefined
gatekeeperNetwork: string | undefined
fees?: GasPriceKey | undefined
gasLimit?: BigNumber | undefined
readOnly?: boolean | undefined
Expand All @@ -110,7 +109,7 @@ export const parseFlags = (flags: Flags): ParsedFlags => {
// These all have defaults and can therefore be safely cast
const provider = flags.chain as Provider
const gatewayTokenAddress = flags.gatewayTokenAddress as string
const gatekeeperNetwork = BigInt(flags.gatekeeperNetwork as number)
const gatekeeperNetwork = BigInt(flags.gatekeeperNetwork as string)

return {
provider,
Expand Down
6 changes: 5 additions & 1 deletion ethereum/gatekeeper-cli/src/utils/oclif/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const networks = {
url: 'https://polygon-mumbai.infura.io/v3/',
chainId: 80_001,
},
polygonAmoy: {
url: 'https://polygon-amoy.infura.io/v3/',
chainId: 80_002,
},
polygon: {
url: 'https://polygon-mainnet.infura.io/v3/',
chainId: 137,
Expand Down Expand Up @@ -172,7 +176,7 @@ export const getProvider = function (
): BaseProvider {
if (network === 'localhost') return getLocalhostProvider()

const url = networks[network].url
const url = process.env.RPC ?? networks[network].url
if (url.includes('infura')) {
return new ExtendedInfuraProvider(network, process.env.INFURA_API_KEY)
}
Expand Down
2 changes: 1 addition & 1 deletion ethereum/gatekeeper-cli/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==

"@identity.com/[email protected]":
"@identity.com/gateway-eth-ts@^0.8.1":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@identity.com/gateway-eth-ts/-/gateway-eth-ts-0.8.1.tgz#3c243f0e481130ee151b757ac089698187923f54"
integrity sha512-To50CHpvaOmvrq9eXYhHMASfX8JF5yBgIqnbnCLAp2Un3UGSQ0SUF0sdcj0/rjnP67mSAKFrCDE9w7PhW+wu1g==
Expand Down
Loading

0 comments on commit 5cd58fa

Please sign in to comment.