Skip to content

Commit

Permalink
Change gauntlet to network-component-protocol structure, adjust go paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesmartin committed Jun 17, 2022
1 parent fb1502f commit 3eb6c27
Show file tree
Hide file tree
Showing 88 changed files with 121 additions and 114 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/relay.yml
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Install Solana CLI
run: ./scripts/install-solana-ci.sh
- name: Build
run: go build -v ./pkg/...
run: go build -v ./relayer/pkg/...
- name: Test
run: go test ./pkg/... -v
run: go test ./relayer/pkg/... -v
- name: Test with the race detector enabled
run: go test ./pkg/... -v -race -count=10
run: go test ./relayer/pkg/... -v -race -count=10
6 changes: 3 additions & 3 deletions .github/workflows/release/solana-gauntlet-cli.yml
Expand Up @@ -3,7 +3,7 @@ name: Solana Gauntlet CLI Release
on:
push:
tags:
- "@chainlink/solana-gauntlet-cli@[0-9]+.[0-9]+.[0-9]"
- "@chainlink/solana-gauntlet-contracts@[0-9]+.[0-9]+.[0-9]"

jobs:
solana-gauntlet-cli-release:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
nix develop -c yarn bundle
# Store gauntlet-cli version
- name: Set Env Variables
run: echo "SOLANA_GAUNTLET_CLI=$(npm info @chainlink/gauntlet-solana-contracts version)" >> $GITHUB_ENV
run: echo "SOLANA_GAUNTLET_CLI=$(npm info @chainlink/solana-gauntlet-contracts version)" >> $GITHUB_ENV
# Upload gauntlet binary to gauntlet-cli release
- name: Upload Gauntlet Binary
uses: svenstaro/upload-release-action@v2
Expand All @@ -48,5 +48,5 @@ jobs:
file: gauntlet/bin/gauntlet-*
file_glob: true
tag: |
@chainlink/gauntlet-solana-contracts@${{ env.solana_GAUNTLET_CLI }}
@chainlink/solana-gauntlet-contracts@${{ env.solana_GAUNTLET_CLI }}
overwrite: false
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -5,7 +5,7 @@
.vscode/

# ignore relay build
pkg/bin
relayer/pkg/bin

v1/target

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Expand Up @@ -7,9 +7,9 @@ Chainlink-Solana contains a number of projects, all individually versioned and r
- [@chainlink/solana-relayer](/relayer/)
- [@chainlink/solana-ops](/ops/)
- [@chainlink/solana-integration-tests](/tests/)
- [@chainlink/gauntlet-solana](/gauntlet/packages/gauntlet-solana/)
- [@chainlink/solana-gauntlet](/gauntlet/packages/gauntlet-solana/)
- [@chainlink/gauntlet-serum-multisig](/gauntlet/packages/gauntlet-serum-multisig/)
- [@chainlink/gauntlet-solana-contracts](/gauntlet/packages/gauntlet-solana-contracts/)
- [@chainlink/solana-gauntlet-contracts](/gauntlet/packages/gauntlet-solana-contracts/)
- [@chainlink/solana-sdk](/ts/)
- [@chainlink/solana-contracts](/contracts/)

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -71,8 +71,8 @@ build_local: build_js build_contracts_local cp_gauntlet_idl
build_staging: build_js build_contracts_staging cp_gauntlet_idl

test_relay_unit:
go build -v ./pkg/...
go test -v ./pkg/...
go build -v ./relayer/pkg/...
go test -v ./relayer/pkg/...

test_smoke:
SELECTED_NETWORKS=solana NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo tests/e2e/smoke
Expand Down
2 changes: 1 addition & 1 deletion cmd/monitoring/main.go
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/smartcontractkit/chainlink-relay/pkg/logger"
relayMonitoring "github.com/smartcontractkit/chainlink-relay/pkg/monitoring"

"github.com/smartcontractkit/chainlink-solana/pkg/monitoring"
"github.com/smartcontractkit/chainlink-solana/relayer/pkg/monitoring"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/gauntlet/gauntlet-setup.md
@@ -1,4 +1,4 @@
# Gauntlet Solana
# Solana Gauntlet

Install node version with asdf. Which can be done by running this from the base of the chainlink-solana repository:

Expand Down
2 changes: 1 addition & 1 deletion gauntlet/README.md
@@ -1,3 +1,3 @@
# Gauntlet Solana
# Solana Gauntlet

For more information, see the [Chainlink Solana Documentation](./docs/gauntlet).
4 changes: 2 additions & 2 deletions gauntlet/jest.config.js
Expand Up @@ -2,7 +2,7 @@ module.exports = {
rootDir: '.',
projects: [
{
displayName: 'gauntlet-solana',
displayName: 'solana-gauntlet',
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/packages/gauntlet-solana/**/*.test.ts'],
Expand All @@ -13,7 +13,7 @@ module.exports = {
},
},
{
displayName: 'gauntlet-solana-contracts',
displayName: 'solana-gauntlet-contracts',
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/packages/gauntlet-solana-contracts/**/*.test.ts'],
Expand Down
2 changes: 1 addition & 1 deletion gauntlet/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "gauntlet",
"private": true,
"version": "0.0.1",
"description": "Gauntlet Solana",
"description": "Solana Gauntlet",
"workspaces": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion gauntlet/packages/gauntlet-serum-multisig/package.json
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@chainlink/gauntlet-core": "0.1.2",
"@chainlink/gauntlet-solana": "*",
"@chainlink/solana-gauntlet": "*",
"@project-serum/anchor": "^0.23.0",
"@solana/web3.js": "^1.31.0"
}
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/solana-gauntlet'
import { PublicKey, SYSVAR_RENT_PUBKEY, Keypair } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../lib/contracts'

Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../lib/contracts'

Expand Down
@@ -1,4 +1,4 @@
import { SolanaCommand, utils } from '@chainlink/gauntlet-solana'
import { SolanaCommand, utils } from '@chainlink/solana-gauntlet'
import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { PublicKey, Keypair, TransactionInstruction, SystemProgram, AccountMeta } from '@solana/web3.js'
import { Idl, Program } from '@project-serum/anchor'
Expand Down
@@ -1,4 +1,4 @@
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { Result } from '@chainlink/gauntlet-core'
import { logger } from '@chainlink/gauntlet-core/dist/utils'
Expand Down
@@ -1,4 +1,4 @@
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { Result } from '@chainlink/gauntlet-core'
import { BN, logger } from '@chainlink/gauntlet-core/dist/utils'
Expand Down
@@ -1,4 +1,4 @@
import { contracts } from '@chainlink/gauntlet-solana'
import { contracts } from '@chainlink/solana-gauntlet'
import { join } from 'path'

export enum CONTRACT_LIST {
Expand Down
2 changes: 1 addition & 1 deletion gauntlet/packages/gauntlet-solana-contracts/README.md
@@ -1,4 +1,4 @@
# gauntlet-solana
# solana-gauntlet

### Prepare

Expand Down
6 changes: 3 additions & 3 deletions gauntlet/packages/gauntlet-solana-contracts/package.json
@@ -1,7 +1,7 @@
{
"name": "@chainlink/gauntlet-solana-contracts",
"name": "@chainlink/solana-gauntlet-contracts",
"version": "0.0.1",
"description": "Gauntlet Solana Contracts",
"description": "Solana Gauntlet Contracts",
"keywords": [
"typescript",
"cli"
Expand All @@ -26,7 +26,7 @@
},
"dependencies": {
"@chainlink/gauntlet-core": "0.1.2",
"@chainlink/gauntlet-solana": "*",
"@chainlink/solana-gauntlet": "*",
"@chainlink/gauntlet-serum-multisig": "*",
"@ethersproject/keccak256": "^5.5.0",
"@solana/spl-token": "^0.1.8",
Expand Down
@@ -1,5 +1,5 @@
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand } from '@chainlink/gauntlet-solana'
import { SolanaCommand } from '@chainlink/solana-gauntlet'
import { PublicKey, TransactionInstruction, AccountMeta } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../lib/contracts'

Expand Down
@@ -1,6 +1,6 @@
import { ICommand, Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse, contracts } from '@chainlink/solana-gauntlet'
import { CONTRACT_LIST, getDeploymentContract } from '../../lib/contracts'

enum SOLANA_OPERATIONS {
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse, utils } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse, utils } from '@chainlink/solana-gauntlet'
import {
AccountMeta,
PublicKey,
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'

Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { Keypair, SystemProgram, SYSVAR_RENT_PUBKEY } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'

Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'

Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,5 +1,5 @@
import { FlowCommand } from '@chainlink/gauntlet-core'
import { TransactionResponse, waitExecute } from '@chainlink/gauntlet-solana'
import { TransactionResponse, waitExecute } from '@chainlink/solana-gauntlet'
import { CONTRACT_LIST } from '../../../lib/contracts'
import { makeAbstractCommand } from '../../abstract'
import Initialize from './initialize'
Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { Keypair, PublicKey, TransactionInstruction, SystemProgram, SYSVAR_RENT_PUBKEY } from '@solana/web3.js'
import { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { inspection, BN, logger } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { Keypair, PublicKey, SystemProgram } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../../lib/contracts'
import { deserializeConfig } from '../../../../lib/encoding'
Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../../lib/contracts'
import { inspection, logger } from '@chainlink/gauntlet-core/dist/utils'
Expand Down
@@ -1,7 +1,7 @@
import { Result } from '@chainlink/gauntlet-core'
import { createHash } from 'crypto'
import { logger, prompt, BN } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { utils } from '@project-serum/anchor'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey, Keypair, SystemProgram } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../../lib/contracts'

Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../../lib/contracts'

Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { ORACLES_MAX_LENGTH } from '../../../lib/constants'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt, time, BN, longs } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey, TransactionInstruction } from '@solana/web3.js'
import { MAX_TRANSACTION_BYTES, ORACLES_MAX_LENGTH } from '../../../lib/constants'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,7 +1,7 @@
import { Result } from '@chainlink/gauntlet-core'
import { Proto } from '@chainlink/gauntlet-core/dist/crypto'
import { BN } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'

import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { utils } from '@project-serum/anchor'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'

Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'

Expand Down
@@ -1,5 +1,5 @@
import { FlowCommand } from '@chainlink/gauntlet-core'
import { TransactionResponse, waitExecute } from '@chainlink/gauntlet-solana'
import { TransactionResponse, waitExecute } from '@chainlink/solana-gauntlet'
import { logger } from '@chainlink/gauntlet-core/dist/utils'
import { CONTRACT_ENV_NAMES, CONTRACT_LIST, getDeploymentContract } from '../../../lib/contracts'
import { makeAbstractCommand } from '../../abstract'
Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { parseIdlErrors, ProgramError, utils } from '@project-serum/anchor'
import { Keypair, PublicKey, Transaction, TransactionInstruction } from '@solana/web3.js'
import { createHash } from 'crypto'
Expand Down
@@ -1,5 +1,5 @@
import { Result } from '@chainlink/gauntlet-core'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { utils } from '@project-serum/anchor'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
import { GetOwnership } from './inspectOwnership'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { Idl, Program } from '@project-serum/anchor'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
Expand Down
@@ -1,6 +1,6 @@
import { Result } from '@chainlink/gauntlet-core'
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand, TransactionResponse } from '@chainlink/gauntlet-solana'
import { SolanaCommand, TransactionResponse } from '@chainlink/solana-gauntlet'
import { PublicKey } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../../lib/contracts'
import { GetOwnership } from './inspectOwnership'
Expand Down

0 comments on commit 3eb6c27

Please sign in to comment.