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

Contract verification command #1

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2b9d3e7
Added verify-contract command
kchudy Dec 22, 2023
b9149a9
Added verify contract to lib
kchudy Dec 22, 2023
f879378
Added function for creating archive
kchudy Jan 2, 2024
d0c6241
Added arg parsing
kchudy Jan 2, 2024
bf44ebb
Added verificator api client
kchudy Jan 2, 2024
a6e6360
Added waiting for verification to finish
kchudy Jan 3, 2024
ff261d5
Switched to deploy hash
kchudy Jan 3, 2024
e4c24de
Updated comments
kchudy Jan 3, 2024
ffb53e3
Added getting verification details
kchudy Jan 5, 2024
4d756f6
Imploved error handling
kchudy Jan 8, 2024
104d4cb
Improved logging
kchudy Jan 8, 2024
f07b7ec
Refactored verification function
kchudy Jan 8, 2024
d72f852
Initialized API client
kchudy Jan 8, 2024
4266492
Adopt new datatypes; use reqwest
moubctez Jan 22, 2024
979ed97
Cleanup
moubctez Jan 22, 2024
2392104
Fix result type
moubctez Jan 22, 2024
4f321b5
Fixes and cleanups
moubctez Jan 22, 2024
21012c4
Sync structs with verificator
moubctez Jan 23, 2024
5e43e05
More retries
moubctez Jan 24, 2024
5a3af7c
Increase number of retries
moubctez Jan 25, 2024
af1c39b
Shorten message
moubctez Jan 25, 2024
d9caa43
Resolve comments
moubctez Apr 10, 2024
3f944b1
Update src/verify_contract.rs
moubctez Apr 11, 2024
ad4bf50
cargo fmt
moubctez Apr 11, 2024
e395eae
Update vergen to v8. This resolves audit error.
moubctez Apr 19, 2024
b59f117
Merge branch 'dev' of github.com:casper-ecosystem/casper-client-rs in…
moubctez Jun 5, 2024
537347d
Resolve pull request comments
moubctez Jun 20, 2024
96c3013
Restore vergen
moubctez Jun 24, 2024
44fef2d
Use correct build.rs
moubctez Jun 24, 2024
258db32
Fix build without default features. Now tokio is required with "time"…
moubctez Jun 26, 2024
c047567
Fix wasm build
moubctez Jun 27, 2024
deaa529
Fix CI-CD tokio not optional
gRoussac Jun 27, 2024
f53e85d
Merge pull request #2 from gRoussac/contract-verification-command
moubctez Jun 28, 2024
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
Prev Previous commit
Next Next commit
Added verify contract to lib
  • Loading branch information
kchudy committed Dec 22, 2023
commit b9149a984142b1c94523ba97f831a7181a5f665c
9 changes: 9 additions & 0 deletions lib/cli.rs
Original file line number Diff line number Diff line change
@@ -708,3 +708,12 @@ pub async fn get_era_info(
.await
.map_err(CliError::from)
}

/// Verifies the smart contract code againt the one deployed at address.
pub async fn verify_contract(
block_identifier: &str,
public_key: &str,
verbosity_level: u64,
) -> Result<(), CliError> {
crate::verify_contract(block_identifier, public_key, verbosity_level).await.map_err(CliError::from)
}
12 changes: 12 additions & 0 deletions lib/lib.rs
Original file line number Diff line number Diff line change
@@ -554,3 +554,15 @@ pub async fn get_era_info(
.send_request(GET_ERA_INFO_METHOD, params)
.await
}

/// Verifies the smart contract code againt the one deployed at address.
pub async fn verify_contract(
block_identifier: &str,
public_key: &str,
verbosity_level: u64,
) -> Result<(), Error> {
println!("Block indentifer: {}", block_identifier);
println!("Public key: {}", public_key);
println!("Verbosity level: {}", verbosity_level);
Ok(())
}
1 change: 0 additions & 1 deletion src/verify_contract.rs
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ impl ClientCommand for VerifyContract {
.arg(common::verbose::arg(DisplayOrder::Verbose as usize))
.arg(common::block_identifier::arg(DisplayOrder::BlockIdentifier as usize, true))
.arg(common::public_key::arg(DisplayOrder::PublicKey as usize, true))

}

async fn run(matches: &ArgMatches) -> Result<Success, CliError> {