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

🗞️ Solana: Add OmniCounter Example [1/N] #872

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .changeset/tall-boats-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/omnicounter-solana-example": major
---

Added Solana OmniCounter example
28 changes: 14 additions & 14 deletions examples/oft-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
"@layerzerolabs/devtools-solana": "~0.1.7",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/io-devtools": "~0.1.11",
"@layerzerolabs/lz-definitions": "^2.3.39",
"@layerzerolabs/lz-evm-messagelib-v2": "^2.3.39",
"@layerzerolabs/lz-evm-protocol-v2": "^2.3.39",
"@layerzerolabs/lz-evm-v1-0.7": "^2.3.39",
"@layerzerolabs/lz-solana-sdk-v2": "^2.3.39",
"@layerzerolabs/lz-v2-utilities": "^2.3.39",
"@layerzerolabs/oapp-evm": "^0.0.4",
"@layerzerolabs/oft-evm": "^0.0.11",
"@layerzerolabs/prettier-config-next": "^2.3.39",
"@layerzerolabs/protocol-devtools": "^0.4.3",
"@layerzerolabs/protocol-devtools-solana": "^1.0.6",
"@layerzerolabs/solhint-config": "^2.3.39",
"@layerzerolabs/test-devtools-evm-foundry": "~0.2.12",
"@layerzerolabs/test-devtools-evm-hardhat": "0.2.7",
"@layerzerolabs/lz-definitions": "^2.3.34",
"@layerzerolabs/lz-evm-messagelib-v2": "^2.3.34",
"@layerzerolabs/lz-evm-protocol-v2": "^2.3.34",
"@layerzerolabs/lz-evm-v1-0.7": "^2.3.34",
"@layerzerolabs/lz-solana-sdk-v2": "^2.3.36",
"@layerzerolabs/lz-v2-utilities": "^2.3.34",
"@layerzerolabs/oapp-evm": "^0.0.3",
"@layerzerolabs/oft-evm": "^0.0.10",
"@layerzerolabs/prettier-config-next": "^2.3.34",
"@layerzerolabs/protocol-devtools": "^0.4.2",
"@layerzerolabs/protocol-devtools-solana": "^1.0.5",
"@layerzerolabs/solhint-config": "^2.3.34",
"@layerzerolabs/test-devtools-evm-foundry": "~0.2.11",
"@layerzerolabs/test-devtools-evm-hardhat": "0.2.6",
"@layerzerolabs/toolbox-foundry": "~0.1.9",
"@layerzerolabs/toolbox-hardhat": "~0.3.7",
"@layerzerolabs/ua-devtools": "~1.0.5",
Expand Down
21 changes: 21 additions & 0 deletions examples/omnicounter-solana/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-'
#
# Example environment configuration
#
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-'

# By default, the examples support both mnemonic-based and private key-based authentication
#
# You don't need to set both of these values, just pick the one that you prefer and set that one
#
# By default, the Solana example will use the default cluster RPC URL if no other value is provided
# For SOLANA_PRIVATE_KEY use base58 encoding
MNEMONIC=
PRIVATE_KEY=
SOLANA_PRIVATE_KEY=
RPC_URL_SOLANA=
RPC_URL_SOLANA_TESTNET=
13 changes: 13 additions & 0 deletions examples/omnicounter-solana/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.anchor
.turbo
node_modules
target
artifacts
cache
dist
out
*.log
*.sol
*.yaml
*.lock
package-lock.json
11 changes: 11 additions & 0 deletions examples/omnicounter-solana/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
extends: ['@layerzerolabs/eslint-config-next/recommended'],
rules: {
// @layerzerolabs/eslint-config-next defines rules for turborepo-based projects
// that are not relevant for this particular project
'turbo/no-undeclared-env-vars': 'off',
'import/no-unresolved': 'warn',
},
};
26 changes: 26 additions & 0 deletions examples/omnicounter-solana/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.anchor
node_modules
.env
coverage
coverage.json
target
typechain
typechain-types

# Hardhat files
cache
artifacts


# LayerZero specific files
.layerzero

# foundry test compilation files
out

# pnpm
pnpm-error.log

# Editor and OS files
.DS_Store
.idea
1 change: 1 addition & 0 deletions examples/omnicounter-solana/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.0
13 changes: 13 additions & 0 deletions examples/omnicounter-solana/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.anchor
.turbo
node_modules/
target
artifacts/
cache/
dist/
out/
*.log
*ignore
*.yaml
*.lock
package-lock.json
3 changes: 3 additions & 0 deletions examples/omnicounter-solana/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('@layerzerolabs/prettier-config-next'),
};
3 changes: 3 additions & 0 deletions examples/omnicounter-solana/.solhintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['solhint:recommended', require.resolve('@layerzerolabs/solhint-config')],
};
19 changes: 19 additions & 0 deletions examples/omnicounter-solana/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[toolchain]
anchor_version = "0.29.0"

[features]
seeds = false
skip-lint = false

[programs.localnet]
omnicounter = '2tLJfE12h5RY7vJqK6i41taeg8ejzigoFXduBanDV4Cu'

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
wallet = "./junk-id.json"

[scripts]
test = "npx jest test/anchor"
27 changes: 27 additions & 0 deletions examples/omnicounter-solana/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# @layerzerolabs/oft-solana-example

## 0.0.5

### Patch Changes

- 51ab953: fix Solana Devnet Hardhat tasks

## 0.0.4

### Patch Changes

- 5442565: Fix @solana-developers/helpers version to 2.4.0

## 0.0.3

### Patch Changes

- 07b6f31: Remove unnecessary await (hygeine)

## 0.0.2

### Patch Changes

- 3b41b73: Add explicit bs58 dependency
- 0ccd6cd: Fix sk decode
- 9a70c7f: Fix imports for bs58
Loading
Loading