0xcregis / anychain Goto Github PK
View Code? Open in Web Editor NEWMulti-chain Rust wallet sdk, supports Bitcoin, Ethereum, Tron, Filecoin, etc. https://cregisoffical.gitbook.io/anychain/
Home Page: https://www.cregis.com
License: MIT License
Multi-chain Rust wallet sdk, supports Bitcoin, Ethereum, Tron, Filecoin, etc. https://cregisoffical.gitbook.io/anychain/
Home Page: https://www.cregis.com
License: MIT License
rustup 1.68.2
Differentiate between test and release in Github action workflow and use actions/cache@v3
Clearly define [lib], [bin] in Cargo.toml and distinguish between dependencies and dev-dependencies
Developer Docs:
https://docs.minaprotocol.com/
Node Developers Docs:
https://docs.minaprotocol.com/node-operators/staking-and-snarking
https://docs.minaprotocol.com/node-developers
anychain/bitcon
[package]
name = "bitcoin"
"bitocin" -> "anychain-bitcoin-xxx"
Cargo.toml
[dependencies]
anyhow = { workspace = true }
The { workspace = true } part of the declaration indicates that this dependency should be resolved using the workspace configuration. In a Rust project, a workspace is a group of related packages that share common settings and dependencies.
By setting workspace = true, Cargo will use the version and configuration of the anyhow crate specified in the workspace's Cargo.toml file, rather than specifying a version directly in the crates/aptos/Cargo.toml file.
This approach helps to maintain consistency across all the packages in the workspace, as they will all use the same version of the anyhow crate. It also makes it easier to update the dependency, as you only need to change the version in the workspace's Cargo.toml file, and all the packages in the workspace will automatically use the updated version
cargo test --all-features
warning: unused import: SecretKey
--> ethereum/src/address.rs:4:26
|
4 | libsecp256k1::{self, SecretKey},
| ^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
warning: unused import: chainlib_core::libsecp256k1
--> bitcoin/src/transaction.rs:18:5
|
18 | use chainlib_core::libsecp256k1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
warning: unused import: core::str::FromStr
--> bitcoin/src/lib.rs:26:9
|
26 | use core::str::FromStr;
| ^^^^^^^^^^^^^^^^^^
warning: unused import: crate::transaction::*
--> bitcoin/src/lib.rs:28:9
|
28 | use crate::transaction::*;
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused import: crate::address::*
--> bitcoin/src/lib.rs:29:9
|
29 | use crate::address::*;
| ^^^^^^^^^^^^^^^^^
warning: unused import: crate::amount::*
--> bitcoin/src/lib.rs:30:9
|
30 | use crate::amount::*;
| ^^^^^^^^^^^^^^^^
warning: unused import: super::*
--> bitcoin/src/lib.rs:31:9
|
31 | use super::*;
| ^^^^^^^^
warning: unused import: rand::thread_rng
--> bitcoin/src/lib.rs:32:9
|
32 | use rand::thread_rng;
| ^^^^^^^^^^^^^^^^
warning: use of deprecated field ethabi::Function::constant
: The constant attribute was removed in Solidity 0.5.0 and has been replaced with stateMutability.
--> ethereum/src/transaction.rs:53:9
|
53 | constant: None,
| ^^^^^^^^^^^^^^
|
= note: #[warn(deprecated)]
on by default
warning: unused import: sha2::digest::typenum::Bit
--> bitcoin/src/transaction.rs:16:5
|
16 | use sha2::digest::typenum::Bit;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused variable: hrp
--> bitcoin/src/address.rs:184:22
|
184 | let (hrp, data, variant) = bech32::decode(&address)?;
| ^^^ help: if this is intentional, prefix it with an underscore: _hrp
|
= note: #[warn(unused_variables)]
on by default
warning: unused variable: variant
--> bitcoin/src/address.rs:184:33
|
184 | let (hrp, data, variant) = bech32::decode(&address)?;
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _variant
warning: unused variable: hrp
--> bitcoin/src/transaction.rs:135:18
|
135 | let (hrp, data, variant) = bech32::decode(&address.to_string())?;
| ^^^ help: if this is intentional, prefix it with an underscore: _hrp
warning: unused variable: variant
--> bitcoin/src/transaction.rs:135:29
|
135 | let (hrp, data, variant) = bech32::decode(&address.to_string())?;
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: _variant
warning: unused variable: signature
--> bitcoin/src/transaction.rs:732:24
|
732 | fn sign(&mut self, signature: Vec, recid: u8) -> Result<Vec, TransactionError> {
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: _signature
warning: unused variable: recid
--> bitcoin/src/transaction.rs:732:44
|
732 | fn sign(&mut self, signature: Vec, recid: u8) -> Result<Vec, TransactionError> {
| ^^^^^ help: if this is intentional, prefix it with an underscore: _recid
warning: variable does not need to be mutable
--> bitcoin/src/transaction.rs:880:9
|
880 | mut public_key: Vec,
| ----^^^^^^^^^^
| |
| help: remove this mut
|
= note: #[warn(unused_mut)]
on by default
warning: type alias N
is never used
--> bitcoin/src/lib.rs:33:10
|
33 | type N = super::network::Testnet;
| ^
|
note: the lint level is defined here
--> bitcoin/src/lib.rs:2:31
|
2 | #![warn(unused_extern_crates, dead_code)]
| ^^^^^^^^^
warning: constant ACOUNTS
is never used
--> bitcoin/src/lib.rs:39:11
|
39 | const ACOUNTS: [(&str,&str);2] = [
| ^^^^^^^
Compiling anychain v0.0.1 (/Users/cairo/anychain/anychain)
warning: bitcoin
(lib) generated 17 warnings
warning: ethereum
(lib) generated 2 warnings
anychain/
examples/
anychain-bitcoin-client/
src/
main.rs
Cargo.toml
try
cargo clippy
cargo clippy --all-features -- -D warnings
We can use GitBook to manage the document.
Build binary releases for Windows, Linux, and Mac.
[address]
[public_key]
[amount]
[transaction]
[network]
[format]
anychain/
examples/
anychain-ethereum-client/
src/
main.rs
Cargo.toml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.