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 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
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/target/
.anchor
Cargo.lock
/dist/
/node_modules/
.DS_Store
*.rs.bk
node_modules
package-lock.json
Cargo.lock
target
test-ledger
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
32 changes: 28 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,47 @@ rust-version = "1.71.0"
[workspace]
members = [
"common/*",
"solana/*",
"solana/trie-example",
"solana/solana-ibc/programs/*",
]
resolver = "2"

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1

[workspace.dependencies]
base64 = { version = "0.21", default-features = false, features = ["alloc"] }
borsh = { version = "0.10.3", default-features = false }
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"] }
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"] }
serde = "1"
serde_json = "1"

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

# dev-dependencies
anchor-client = "0.28.0"
anyhow = "1.0.32"

[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" }
19 changes: 19 additions & 0 deletions solana/solana-ibc/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[features]
seeds = false
skip-lint = false
[programs.localnet]
solana_ibc = "7MEuaEwNMsjVCJy9N31ZgvQf1dFkRNXYFREaAjMsoE5g"
[programs.devnet]
solana_ibc = "7MEuaEwNMsjVCJy9N31ZgvQf1dFkRNXYFREaAjMsoE5g"

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

[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"
}
}
30 changes: 30 additions & 0 deletions solana/solana-ibc/programs/solana-ibc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[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.workspace = true
bincode.workspace = true
ibc.workspace = true
ibc-proto.workspace = true
serde.workspace = true
serde_json.workspace = true

[dev-dependencies]
anchor-client.workspace = true
anyhow.workspace = true



Loading
Loading