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

added solana-ibc impl folder #14

Merged
merged 12 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ rust-version = "1.71.0"
[workspace]
members = [
"common/*",
"solana/*",
"solana/trie-example",
"solana/solana-ibc/programs/*",
]
resolver = "2"

Expand All @@ -18,12 +19,16 @@ derive_more = "0.99.17"
pretty_assertions = "1.4.0"
rand = { version = "0.8.5" }
sha2 = { version = "0.10.7", default-features = false }
solana-client = "1.16.7"
solana-program = "1.16.7"
solana-sdk = "1.16.7"
solana-client = "1.16.14"
solana-program = "1.16.14"
solana-sdk = "1.16.14"
strum = { version = "0.25.0", default-features = false, features = ["derive"] }

lib = { path = "common/lib" }
memory = { path = "common/memory" }
sealable-trie = { path = "common/sealable-trie" }
stdx = { path = "common/stdx" }

[patch.crates-io]
curve25519-dalek = { git = "https://github.com/dhruvja/curve25519-dalek", branch = "master" }
aes-gcm-siv = { git = "https://github.com/dhruvja/AEADs", branch = "main-aes-gcm-siv-v0.10.3" }
7 changes: 7 additions & 0 deletions solana/solana-ibc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

.anchor
.DS_Store
target
**/*.rs.bk
dhruvja marked this conversation as resolved.
Show resolved Hide resolved
node_modules
test-ledger
8 changes: 8 additions & 0 deletions solana/solana-ibc/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

dhruvja marked this conversation as resolved.
Show resolved Hide resolved
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
24 changes: 24 additions & 0 deletions solana/solana-ibc/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[features]
seeds = false
skip-lint = false
[programs.localnet]
solana_ibc = "7MEuaEwNMsjVCJy9N31ZgvQf1dFkRNXYFREaAjMsoE5g"
[programs.devnet]
solana_ibc = "7MEuaEwNMsjVCJy9N31ZgvQf1dFkRNXYFREaAjMsoE5g"

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

[workspace]
members = [
"programs/*",
]

[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
# test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "cargo test -- --nocapture"

1 change: 1 addition & 0 deletions solana/solana-ibc/keypair.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[48,123,8,80,248,0,217,142,124,193,95,24,168,139,214,136,147,210,168,135,26,36,162,89,150,185,99,191,247,135,78,111,12,8,4,81,129,165,153,230,192,225,51,119,216,14,69,225,73,7,204,144,39,213,91,255,136,38,95,131,197,4,101,186]
12 changes: 12 additions & 0 deletions solana/solana-ibc/migrations/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.

const anchor = require("@coral-xyz/anchor");

module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);

// Add your deploy script here.
};
19 changes: 19 additions & 0 deletions solana/solana-ibc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.27.0"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5",
"prettier": "^2.6.2"
}
}
35 changes: 35 additions & 0 deletions solana/solana-ibc/programs/solana-ibc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "solana-ibc"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "solana_ibc"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = {version = "0.28.0", features = ["init-if-needed"]}
bincode = "1.3.3"
ibc = { git = "https://github.com/dhruvja/ibc-rs", features = ["serde", "borsh", "mocks"] }
ibc-proto = { git = "https://github.com/dhruvja/ibc-proto-rs", default-features = false, features = ["serde", "borsh"] }
# ibc = { version = "0.44.1", features = ["serde", "borsh", "mocks"] }
# ibc-proto = { version = "0.34.1", default-features = false, features = ["serde", "borsh"] }
serde = "1"
serde_json = "1"
time = "=0.3.18"
tempfile = "=3.6.0"
getrandom = { version = "0.2.2", features = ["custom"] }

[dev-dependencies]
anchor-client = "0.28.0"
anyhow = "1.0.32"



2 changes: 2 additions & 0 deletions solana/solana-ibc/programs/solana-ibc/Xargo.toml
dhruvja marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.bpfel-unknown-unknown.dependencies.std]
features = []
Loading
Loading