From 5b449470327104b661e70a4c513f77ffbff1b585 Mon Sep 17 00:00:00 2001 From: Akshat Mangal Date: Fri, 28 Oct 2022 15:45:37 +0530 Subject: [PATCH 01/17] Added functionality to create state for redeem logic forward plugin --- .../redeem_logic_forward_args.rs | 16 +++++++ .../redeem_logic_forward_ops.rs | 47 +++++++++++++++++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/args/redeem_logic_plugin_args/redeem_logic_forward_args.rs b/src/args/redeem_logic_plugin_args/redeem_logic_forward_args.rs index 9329af4..43c2787 100644 --- a/src/args/redeem_logic_plugin_args/redeem_logic_forward_args.rs +++ b/src/args/redeem_logic_plugin_args/redeem_logic_forward_args.rs @@ -22,10 +22,26 @@ pub struct RedeemLogicForwardCommand { pub enum RedeemLogicForwardSubcommand { /// Gets the state of redeem logic forward plugin from the given public key. Fetch(FetchState), + /// Creates a redeem logic forward state with given configuration + Create(PluginState) } #[derive(Debug, Args)] pub struct FetchState { /// Public key of state of plugin. pub state_id: Pubkey +} + +#[derive(Debug, Args)] +pub struct PluginState { + #[clap(long)] + /// notinal value for plugim + pub notional: u64, + /// strike value for plugim + #[clap(long)] + pub strike: f64, + /// linear value for plugin + #[clap(long="linear", parse(try_from_str))] + pub is_linear: bool, + } \ No newline at end of file diff --git a/src/ops/redeem_logic_plugin_ops/redeem_logic_forward_ops.rs b/src/ops/redeem_logic_plugin_ops/redeem_logic_forward_ops.rs index 58ecfda..ed1cab4 100644 --- a/src/ops/redeem_logic_plugin_ops/redeem_logic_forward_ops.rs +++ b/src/ops/redeem_logic_plugin_ops/redeem_logic_forward_ops.rs @@ -8,15 +8,24 @@ use { anchor_client::{ Program, ClientError, + solana_sdk:: { + signer::keypair::Keypair, + signer::Signer, + system_program + } + }, + redeem_logic_forward:: { + RedeemLogicConfig, + accounts::InitializeContext, + instruction::Initialize, }, - redeem_logic_forward::RedeemLogicConfig, crate::utils:: { println_name_value, println_error }, rust_decimal::{ Decimal - } + }, }; @@ -27,7 +36,7 @@ pub fn handle_redeem_logic_forward_command(redeem_logic_command: RedeemLogicForw RedeemLogicForwardSubcommand::Fetch(fetch_state) => { let account:Result = program.account(fetch_state.state_id); let account = match account { - Ok(redeem_config) => (redeem_config), + Ok(redeem_config) => redeem_config, Err(err) => { match err { ClientError::AccountNotFound => println_error("Could not find a state with given public key"), @@ -38,12 +47,42 @@ pub fn handle_redeem_logic_forward_command(redeem_logic_command: RedeemLogicForw ClientError::LogParseError(_)=> println_error("Could not parse the given public key") } exit(1); - } + } }; println_name_value("notional", &account.notional); println_name_value("is_linear", &account.is_linear); println_name_value("strike",&Decimal::deserialize(account.strike)); println_name_value("owner", &account.owner); + }, + RedeemLogicForwardSubcommand::Create(plugin_state) => { + let plugin_config = Keypair::new(); + let authority = program.payer(); + let signature = program.request() + .signer(&plugin_config) + .accounts(InitializeContext { + redeem_logic_config: plugin_config.pubkey(), + owner: authority, + payer: authority, + system_program: system_program::ID, + }) + .args(Initialize { notional: plugin_state.notional,is_linear:plugin_state.is_linear, strike:plugin_state.strike}) + .send(); + let signature = match signature { + Ok(transaction) => transaction, + Err(err) => { + match err { + ClientError::AccountNotFound => println_error("Could not find a state with given public key"), + ClientError::AnchorError(_) => println_error("Anchor not working"), + ClientError::ProgramError(_) => println_error("Redeem Logic Forward program is not working"), + ClientError::SolanaClientError(_) => println_error("Solana client is not working"), + ClientError::SolanaClientPubsubError(_) => println_error("Solana client is not working") , + ClientError::LogParseError(_)=> println_error("Could not parse the given input") + } + exit(1); + } + }; + println_name_value("Redeem Logic Forward State successfully create at", &plugin_config.pubkey()); + println_name_value("Transaction Id", &signature); } } } \ No newline at end of file From 0dd7239b719c334f045bbabaaa273f3cb29671b9 Mon Sep 17 00:00:00 2001 From: Akshat Mangal Date: Sat, 29 Oct 2022 13:37:47 +0530 Subject: [PATCH 02/17] Added redeem logic settle forward state fetch and create --- Cargo.lock | 23 +++-- Cargo.toml | 3 +- src/args.rs | 6 +- src/args/redeem_logic_plugin_args.rs | 3 +- .../redeem_logic_settle_forward_args.rs | 50 +++++++++++ src/main.rs | 11 ++- src/ops/redeem_logic_plugin_ops.rs | 3 +- .../redeem_logic_settle_forward_ops.rs | 89 +++++++++++++++++++ 8 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 src/args/redeem_logic_plugin_args/redeem_logic_settle_forward_args.rs create mode 100644 src/ops/redeem_logic_plugin_ops/redeem_logic_settle_forward_ops.rs diff --git a/Cargo.lock b/Cargo.lock index ee3df11..3fb30fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2029,7 +2029,7 @@ dependencies = [ [[package]] name = "rate-switchboard" version = "0.1.1" -source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#772c72a8b5c7fe29784a64a4cf25aeae58a60447" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" dependencies = [ "anchor-lang", "rust_decimal", @@ -2065,7 +2065,19 @@ dependencies = [ [[package]] name = "redeem-logic-forward" version = "0.1.1" -source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#772c72a8b5c7fe29784a64a4cf25aeae58a60447" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" +dependencies = [ + "anchor-lang", + "rust_decimal", + "rust_decimal_macros", + "vyper-macros", + "vyper-utils", +] + +[[package]] +name = "redeem-logic-settled-forward" +version = "0.1.1" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" dependencies = [ "anchor-lang", "rust_decimal", @@ -3537,6 +3549,7 @@ dependencies = [ "console", "rate-switchboard", "redeem-logic-forward", + "redeem-logic-settled-forward", "rust_decimal", "rust_decimal_macros", "solana-cli-config", @@ -3546,7 +3559,7 @@ dependencies = [ [[package]] name = "vyper-core" version = "0.1.0" -source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#772c72a8b5c7fe29784a64a4cf25aeae58a60447" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" dependencies = [ "anchor-lang", "anchor-spl", @@ -3562,7 +3575,7 @@ dependencies = [ [[package]] name = "vyper-macros" version = "0.1.0" -source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#772c72a8b5c7fe29784a64a4cf25aeae58a60447" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" dependencies = [ "quote 1.0.21", "syn 1.0.101", @@ -3571,7 +3584,7 @@ dependencies = [ [[package]] name = "vyper-utils" version = "0.1.0" -source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#772c72a8b5c7fe29784a64a4cf25aeae58a60447" +source = "git+https://github.com/vyper-protocol/vyper-core?branch=main#b67b24fe75752429027046be1af3f283d53d76a8" dependencies = [ "anchor-lang", "anchor-spl", diff --git a/Cargo.toml b/Cargo.toml index 60f3dae..358550f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,5 @@ redeem-logic-forward = { git = "https://github.com/vyper-protocol/vyper-core", b rate-switchboard = { git = "https://github.com/vyper-protocol/vyper-core", branch = "main", features = ["no-entrypoint"] } console = "0.15.1" rust_decimal = "1.26" -rust_decimal_macros = "1.26" \ No newline at end of file +rust_decimal_macros = "1.26" +redeem-logic-settled-forward = { git = "https://github.com/vyper-protocol/vyper-core", branch = "main", features = ["no-entrypoint"] } \ No newline at end of file diff --git a/src/args.rs b/src/args.rs index 38a6ce0..46b2da4 100644 --- a/src/args.rs +++ b/src/args.rs @@ -7,6 +7,7 @@ use { config_args::ConfigOptions, redeem_logic_plugin_args:: { redeem_logic_forward_args::RedeemLogicForwardCommand, + redeem_logic_settle_forward_args::RedeemLogicSettleForwardCommand, }, rate_plugin_args::rate_switchboard_args::RateSwitchboardCommand, clap::{ @@ -36,6 +37,9 @@ pub enum Vyper { /// Used to access redeem logic forward commands RedeemLogicForward(RedeemLogicForwardCommand), /// Used to access rate-switchboard plugin - RateSwitchboard(RateSwitchboardCommand) + RateSwitchboard(RateSwitchboardCommand), + /// Used to access redeem logic settle forward plugin + RedeemLogicSettleForward(RedeemLogicSettleForwardCommand), + } diff --git a/src/args/redeem_logic_plugin_args.rs b/src/args/redeem_logic_plugin_args.rs index 0f72fa3..1ce8967 100644 --- a/src/args/redeem_logic_plugin_args.rs +++ b/src/args/redeem_logic_plugin_args.rs @@ -1 +1,2 @@ -pub mod redeem_logic_forward_args; \ No newline at end of file +pub mod redeem_logic_forward_args; +pub mod redeem_logic_settle_forward_args; \ No newline at end of file diff --git a/src/args/redeem_logic_plugin_args/redeem_logic_settle_forward_args.rs b/src/args/redeem_logic_plugin_args/redeem_logic_settle_forward_args.rs new file mode 100644 index 0000000..8cbf0cd --- /dev/null +++ b/src/args/redeem_logic_plugin_args/redeem_logic_settle_forward_args.rs @@ -0,0 +1,50 @@ +use { + clap::{ + Args, + Subcommand + }, + anchor_client:: { + solana_sdk::{ + pubkey::Pubkey + } + } +}; + + + +#[derive(Debug, Args)] +pub struct RedeemLogicSettleForwardCommand { + #[clap(subcommand)] + pub command : RedeemLogicSettleForwardSubcommand +} + +#[derive(Debug, Subcommand)] +pub enum RedeemLogicSettleForwardSubcommand { + /// Gets the state of redeem logic settle forward plugin from the given public key. + Fetch(FetchState), + /// Creates a redeem logic settle forward state with given configuration + Create(PluginState) +} + +#[derive(Debug, Args)] +pub struct FetchState { + /// Public key of state of plugin. + pub state_id: Pubkey +} + +#[derive(Debug, Args)] +pub struct PluginState { + #[clap(long)] + /// notinal value for plugim + pub notional: u64, + /// strike value for plugim + #[clap(long)] + pub strike: f64, + /// linear value for plugin + #[clap(long="linear", parse(try_from_str))] + pub is_linear: bool, + /// standard value for plugin + #[clap(long="standard", parse(try_from_str))] + pub is_standard: bool, + +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 8373bbd..98ea408 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ use { ops::core_ops::handle_core_command, ops::redeem_logic_plugin_ops::{ redeem_logic_forward_ops::handle_redeem_logic_forward_command, + redeem_logic_settle_forward_ops::handle_redeem_logic_settle_forward_command, }, ops::rate_plugin_ops::{ rate_switchboard_ops::handle_rate_switchboard_command @@ -34,6 +35,7 @@ use { const VYPER_CORE_ID: &str = "vyPErCcGJKQQBeeQ59gXcWrDyU4vBrq8qQfacwmsAsp"; const REDEEM_LOGIC_FORWARD: &str = "BrpV1re8MshA8qskKVxcEG8zXG3vf2uLX6myeTKAyhsK"; const RATE_SWITCHBOARD: &str = "2hGXiH1oEQwjCXRx8bNdHTi49ScZp7Mj2bxcjxtULKe1"; +const REDEEM_LOGIC_SETTLE_FORWARD: &str = "6vBg1GMtKj7EYDLWWt6tkHoDWLAAksNPbKWiXMic99qU"; fn main() { @@ -101,6 +103,13 @@ fn main() { let rate_switchboard_program = client.program(rate_switchboard_program_id); // command handler handle_rate_switchboard_command(rate_switchboard_command, &rate_switchboard_program); - } + }, + Vyper::RedeemLogicSettleForward(redeem_logic_command) => { + // redem logic forward program + let redeem_logic_settle_forward_program_id: Pubkey = Pubkey::new(&bs58::decode(&REDEEM_LOGIC_SETTLE_FORWARD).into_vec().expect("Invalid redeem logic forward program id")); + let redeem_logic_settle_forward_program = client.program(redeem_logic_settle_forward_program_id); + // command handler + handle_redeem_logic_settle_forward_command(redeem_logic_command, &redeem_logic_settle_forward_program); + }, } } diff --git a/src/ops/redeem_logic_plugin_ops.rs b/src/ops/redeem_logic_plugin_ops.rs index 7b94f1e..4235053 100644 --- a/src/ops/redeem_logic_plugin_ops.rs +++ b/src/ops/redeem_logic_plugin_ops.rs @@ -1 +1,2 @@ -pub mod redeem_logic_forward_ops; \ No newline at end of file +pub mod redeem_logic_forward_ops; +pub mod redeem_logic_settle_forward_ops; \ No newline at end of file diff --git a/src/ops/redeem_logic_plugin_ops/redeem_logic_settle_forward_ops.rs b/src/ops/redeem_logic_plugin_ops/redeem_logic_settle_forward_ops.rs new file mode 100644 index 0000000..c9e4b5d --- /dev/null +++ b/src/ops/redeem_logic_plugin_ops/redeem_logic_settle_forward_ops.rs @@ -0,0 +1,89 @@ +use { + std::process::exit, + crate::args::redeem_logic_plugin_args, + redeem_logic_plugin_args::redeem_logic_settle_forward_args:: { + RedeemLogicSettleForwardCommand, + RedeemLogicSettleForwardSubcommand + }, + anchor_client::{ + Program, + ClientError, + solana_sdk:: { + signer::keypair::Keypair, + signer::Signer, + system_program + } + }, + redeem_logic_settled_forward:: { + RedeemLogicConfig, + accounts::InitializeContext, + instruction::Initialize, + }, + crate::utils:: { + println_name_value, + println_error + }, + rust_decimal::{ + Decimal + }, +}; + + + +pub fn handle_redeem_logic_settle_forward_command(redeem_logic_command: RedeemLogicSettleForwardCommand, program: &Program) { + let command = redeem_logic_command.command; + match command { + RedeemLogicSettleForwardSubcommand::Fetch(fetch_state) => { + let account:Result = program.account(fetch_state.state_id); + let account = match account { + Ok(redeem_config) => redeem_config, + Err(err) => { + match err { + ClientError::AccountNotFound => println_error("Could not find a state with given public key"), + ClientError::AnchorError(_) => println_error("Anchor not working"), + ClientError::ProgramError(_) => println_error("Redeem Logic Settle Forward program is not working"), + ClientError::SolanaClientError(_) => println_error("Solana client is not working"), + ClientError::SolanaClientPubsubError(_) => println_error("Solana client is not working") , + ClientError::LogParseError(_)=> println_error("Could not parse the given public key") + } + exit(1); + } + }; + println_name_value("notional", &account.notional); + println_name_value("is_linear", &account.is_linear); + println_name_value("strike",&Decimal::deserialize(account.strike)); + println_name_value("is_standard", &account.is_standard); + println_name_value("owner", &account.owner); + }, + RedeemLogicSettleForwardSubcommand::Create(plugin_state) => { + let plugin_config = Keypair::new(); + let authority = program.payer(); + let signature = program.request() + .signer(&plugin_config) + .accounts(InitializeContext { + redeem_logic_config: plugin_config.pubkey(), + owner: authority, + payer: authority, + system_program: system_program::ID, + }) + .args(Initialize { notional: plugin_state.notional,is_linear:plugin_state.is_linear, strike:plugin_state.strike, is_standard:plugin_state.is_standard}) + .send(); + let signature = match signature { + Ok(transaction) => transaction, + Err(err) => { + match err { + ClientError::AccountNotFound => println_error("Could not find a state with given public key"), + ClientError::AnchorError(_) => println_error("Anchor not working"), + ClientError::ProgramError(_) => println_error("Redeem Logic Settle Forward program is not working"), + ClientError::SolanaClientError(_) => println_error("Solana client is not working"), + ClientError::SolanaClientPubsubError(_) => println_error("Solana client is not working") , + ClientError::LogParseError(_)=> println_error("Could not parse the given input") + } + exit(1); + } + }; + println_name_value("Redeem Logic Setle Forward State successfully create at", &plugin_config.pubkey()); + println_name_value("Transaction Id", &signature); + } + } +} \ No newline at end of file From 2d3eeb2023c89682d215651ffb0d48967fd030e1 Mon Sep 17 00:00:00 2001 From: Akshat Mangal Date: Sat, 29 Oct 2022 13:56:03 +0530 Subject: [PATCH 03/17] Fixed typo in comment --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 98ea408..6602508 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,7 +105,7 @@ fn main() { handle_rate_switchboard_command(rate_switchboard_command, &rate_switchboard_program); }, Vyper::RedeemLogicSettleForward(redeem_logic_command) => { - // redem logic forward program + // redem logic settle forward program let redeem_logic_settle_forward_program_id: Pubkey = Pubkey::new(&bs58::decode(&REDEEM_LOGIC_SETTLE_FORWARD).into_vec().expect("Invalid redeem logic forward program id")); let redeem_logic_settle_forward_program = client.program(redeem_logic_settle_forward_program_id); // command handler From 9c6fc66f39fd527ec37ebe7557be29da35df698f Mon Sep 17 00:00:00 2001 From: thegreat-vanderlinde Date: Thu, 3 Nov 2022 15:46:09 +0000 Subject: [PATCH 04/17] Create cargo-docs.yml --- .github/workflows/cargo-docs.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/cargo-docs.yml diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml new file mode 100644 index 0000000..dfe7b8b --- /dev/null +++ b/.github/workflows/cargo-docs.yml @@ -0,0 +1,21 @@ +name: Deploy Book +on: + push: + branches: + - dev + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions-rs/cargo@v1.0.1 + with: + command: docs --no-deps + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc From a1899dfafb5d4a1e29138b45c4251f07e83bdecd Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 15:47:36 +0000 Subject: [PATCH 05/17] fixed doc subcommand --- .github/workflows/cargo-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml index dfe7b8b..a612e39 100644 --- a/.github/workflows/cargo-docs.yml +++ b/.github/workflows/cargo-docs.yml @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 - uses: actions-rs/cargo@v1.0.1 with: - command: docs --no-deps + command: doc --no-deps - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From 6ba17d88817abbfdf31b0e907e7c07ef4035d52a Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 15:49:30 +0000 Subject: [PATCH 06/17] fixed doc subcommand --- .github/workflows/cargo-docs.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml index a612e39..760afef 100644 --- a/.github/workflows/cargo-docs.yml +++ b/.github/workflows/cargo-docs.yml @@ -1,4 +1,4 @@ -name: Deploy Book +name: deploy cargo docs on: push: branches: @@ -11,10 +11,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: actions-rs/cargo@v1.0.1 + - uses: actions-rs/cargo@v1 with: - command: doc --no-deps - - name: Deploy + command: doc + args: --no-deps + - name: deploy ghp uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} From c1ca57696845b0ee25b103a2b96f8bef2d62a92b Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 16:00:28 +0000 Subject: [PATCH 07/17] toolchain --- .github/workflows/cargo-docs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml index 760afef..f376d9f 100644 --- a/.github/workflows/cargo-docs.yml +++ b/.github/workflows/cargo-docs.yml @@ -11,6 +11,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true - uses: actions-rs/cargo@v1 with: command: doc From c0ade7c7a4e5c8155dc93ed0a42b964e713a6773 Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 16:08:22 +0000 Subject: [PATCH 08/17] install libudev-dev --- .github/workflows/cargo-docs.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml index f376d9f..029a744 100644 --- a/.github/workflows/cargo-docs.yml +++ b/.github/workflows/cargo-docs.yml @@ -8,15 +8,14 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: git checkout + uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 + - name: install libudev-dev + run: sudo apt-get install -yq libudev-dev + - name: compile docs + uses: actions-rs/cargo@v1 with: command: doc args: --no-deps From f475dd77e6a73c0c6086926a1218229e5aaf8fe9 Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 16:09:58 +0000 Subject: [PATCH 09/17] removed names --- .github/workflows/cargo-docs.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cargo-docs.yml b/.github/workflows/cargo-docs.yml index 029a744..7c2ae4e 100644 --- a/.github/workflows/cargo-docs.yml +++ b/.github/workflows/cargo-docs.yml @@ -8,19 +8,16 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: git checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: install libudev-dev run: sudo apt-get install -yq libudev-dev - - name: compile docs - uses: actions-rs/cargo@v1 + - uses: actions-rs/cargo@v1 with: command: doc args: --no-deps - - name: deploy ghp - uses: peaceiris/actions-gh-pages@v3 + - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./target/doc From 4fd49327c8c362b6091fd68f763e14623525422c Mon Sep 17 00:00:00 2001 From: dutch Date: Thu, 3 Nov 2022 16:14:05 +0000 Subject: [PATCH 10/17] workflow badges --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4400cdd..7d7e9e7 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,34 @@ # Vyper-Cli + Command Line to interact with on chain Vyper program suite +[![Rust Checks](https://github.com/vyper-protocol/vyper-cli/actions/workflows/rust-checks.yml/badge.svg)](https://github.com/vyper-protocol/vyper-cli/actions/workflows/rust-checks.yml) + +[![deploy cargo docs](https://github.com/vyper-protocol/vyper-cli/actions/workflows/cargo-docs.yml/badge.svg)](https://github.com/vyper-protocol/vyper-cli/actions/workflows/cargo-docs.yml) + ## Installation ### 1. Download the source code. + ```bash $ git clone git@github.com:vyper-protocol/vyper-cli.git $ cd vyper-cli ``` ### 2. Build + ```bash $ cargo build ``` ### 3. Install + ```bash $ cargo install --path . ``` ## Usage + ```bash $ vyper