Skip to content

Commit

Permalink
Shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbogle committed Jul 16, 2023
1 parent 2abcf9a commit bdcbf56
Show file tree
Hide file tree
Showing 20 changed files with 101 additions and 0 deletions.
2 changes: 2 additions & 0 deletions programs/cardinal-paid-claim-approver/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ pub enum ErrorCode {
InvalidPaymentMint,
#[msg("Invalid mint")]
InvalidMint,
#[msg("Cardinal Protocols are shutting down. Please read latest twitter post for more information")]
ProtocolsShutdown,
}
2 changes: 2 additions & 0 deletions programs/cardinal-paid-claim-approver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ pub mod cardinal_paid_claim_approver {
use super::*;

pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> {

Check warning on line 14 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-paid-claim-approver/src/lib.rs:14:40 | 14 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 14 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-paid-claim-approver/src/lib.rs:14:17 | 14 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` | = note: `#[warn(unused_variables)]` on by default
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
init::handler(ctx, ix)

Check warning on line 16 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-paid-claim-approver/src/lib.rs:16:9 | 15 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 16 | init::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default
}

pub fn pay<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, PayCtx<'info>>) -> Result<()> {

Check warning on line 19 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-paid-claim-approver/src/lib.rs:19:5 | 19 | pub fn pay<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, PayCtx<'info>>) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 19 - pub fn pay<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, PayCtx<'info>>) -> Result<()> { 19 + pub fn pay<'info>(ctx: Context<'_, '_, '_, 'info, PayCtx<'info>>) -> Result<()> { |

Check warning on line 19 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-paid-claim-approver/src/lib.rs:19:52 | 19 | pub fn pay<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, PayCtx<'info>>) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
pay::handler(ctx)

Check warning on line 21 in programs/cardinal-paid-claim-approver/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-paid-claim-approver/src/lib.rs:21:9 | 20 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 21 | pay::handler(ctx) | ^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand Down
2 changes: 2 additions & 0 deletions programs/cardinal-time-invalidator/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ pub enum ErrorCode {
InvalidMint,
#[msg("Invalid new max expiration")]
InvalidNewMaxExpiration,
#[msg("Cardinal Protocols are shutting down. Please read latest twitter post for more information")]
ProtocolsShutdown,
}
2 changes: 2 additions & 0 deletions programs/cardinal-time-invalidator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub mod cardinal_time_invalidator {
}

pub fn extend_expiration<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendExpirationCtx<'info>>, seconds_to_add: u64) -> Result<()> {

Check warning on line 18 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-time-invalidator/src/lib.rs:18:5 | 18 | pub fn extend_expiration<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendExpirationCtx<'info>>, seconds_to_add: u64) -> Result<()... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 18 - pub fn extend_expiration<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendExpirationCtx<'info>>, seconds_to_add: u64) -> Result<()> { 18 + pub fn extend_expiration<'info>(ctx: Context<'_, '_, '_, 'info, ExtendExpirationCtx<'info>>, seconds_to_add: u64) -> Result<()> { |

Check warning on line 18 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `seconds_to_add`

warning: unused variable: `seconds_to_add` --> programs/cardinal-time-invalidator/src/lib.rs:18:144 | 18 | ...pirationCtx<'info>>, seconds_to_add: u64) -> Result<()> { | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_seconds_to_add`

Check warning on line 18 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-time-invalidator/src/lib.rs:18:66 | 18 | ..., 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendExpirationCtx<'info>>, seconds_to_add: u64) -> ... | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` | = note: `#[warn(unused_variables)]` on by default
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
extend_expiration::handler(ctx, seconds_to_add)

Check warning on line 20 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-time-invalidator/src/lib.rs:20:9 | 19 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 20 | extend_expiration::handler(ctx, seconds_to_add) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default
}

Expand All @@ -24,6 +25,7 @@ pub mod cardinal_time_invalidator {
}

pub fn update_max_expiration(ctx: Context<UpdateMaxExpirationCtx>, ix: UpdateMaxExpirationIx) -> Result<()> {

Check warning on line 27 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-time-invalidator/src/lib.rs:27:72 | 27 | pub fn update_max_expiration(ctx: Context<UpdateMaxExpirationCtx>, ix: UpdateMaxExpirationIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 27 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-time-invalidator/src/lib.rs:27:34 | 27 | pub fn update_max_expiration(ctx: Context<UpdateMaxExpirationCtx>, ix: UpdateMaxExpirationIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
update_max_expiration::handler(ctx, ix)

Check warning on line 29 in programs/cardinal-time-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-time-invalidator/src/lib.rs:29:9 | 28 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 29 | update_max_expiration::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand Down
2 changes: 2 additions & 0 deletions programs/cardinal-token-manager/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@ pub enum ErrorCode {
CannotMigrateDelegatedToken,
#[msg("Invalid return target")]
InvalidReturnTarget,
#[msg("Cardinal Protocols are shutting down. Please read latest twitter post for more information")]
ProtocolsShutdown,
}
4 changes: 4 additions & 0 deletions programs/cardinal-token-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub mod cardinal_token_manager {
use super::*;

pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> {

Check warning on line 15 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-token-manager/src/lib.rs:15:40 | 15 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 15 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-token-manager/src/lib.rs:15:17 | 15 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` | = note: `#[warn(unused_variables)]` on by default
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
init::handler(ctx, ix)

Check warning on line 17 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-token-manager/src/lib.rs:17:9 | 16 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 17 | init::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default
}

Expand Down Expand Up @@ -45,10 +46,12 @@ pub mod cardinal_token_manager {
}

pub fn claim_receipt_mint(ctx: Context<ClaimReceiptMintCtx>, name: String) -> Result<()> {

Check warning on line 48 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `name`

warning: unused variable: `name` --> programs/cardinal-token-manager/src/lib.rs:48:66 | 48 | pub fn claim_receipt_mint(ctx: Context<ClaimReceiptMintCtx>, name: String) -> Result<()> { | ^^^^ help: if this is intentional, prefix it with an underscore: `_name`

Check warning on line 48 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-token-manager/src/lib.rs:48:31 | 48 | pub fn claim_receipt_mint(ctx: Context<ClaimReceiptMintCtx>, name: String) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
claim_receipt_mint::handler(ctx, name)

Check warning on line 50 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-token-manager/src/lib.rs:50:9 | 49 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 50 | claim_receipt_mint::handler(ctx, name) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

pub fn issue<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, IssueCtx<'info>>) -> Result<()> {

Check warning on line 53 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-token-manager/src/lib.rs:53:5 | 53 | pub fn issue<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, IssueCtx<'info>>) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 53 - pub fn issue<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, IssueCtx<'info>>) -> Result<()> { 53 + pub fn issue<'info>(ctx: Context<'_, '_, '_, 'info, IssueCtx<'info>>) -> Result<()> { |

Check warning on line 53 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-token-manager/src/lib.rs:53:54 | 53 | pub fn issue<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, IssueCtx<'info>>) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
issue::handler(ctx)

Check warning on line 55 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-token-manager/src/lib.rs:55:9 | 54 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 55 | issue::handler(ctx) | ^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand All @@ -57,6 +60,7 @@ pub mod cardinal_token_manager {
}

pub fn claim<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ClaimCtx<'info>>) -> Result<()> {

Check warning on line 62 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-token-manager/src/lib.rs:62:5 | 62 | pub fn claim<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ClaimCtx<'info>>) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 62 - pub fn claim<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ClaimCtx<'info>>) -> Result<()> { 62 + pub fn claim<'info>(ctx: Context<'_, '_, '_, 'info, ClaimCtx<'info>>) -> Result<()> { |

Check warning on line 62 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-token-manager/src/lib.rs:62:54 | 62 | pub fn claim<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ClaimCtx<'info>>) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
claim::handler(ctx)

Check warning on line 64 in programs/cardinal-token-manager/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-token-manager/src/lib.rs:64:9 | 63 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 64 | claim::handler(ctx) | ^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand Down
2 changes: 2 additions & 0 deletions programs/cardinal-transfer-authority/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ pub enum ErrorCode {
InvalidRemainingAccountsSize,
#[msg("Invalid payer payment token account")]
InvalidPayerPaymentTokenAccount,
#[msg("Cardinal Protocols are shutting down. Please read latest twitter post for more information")]
ProtocolsShutdown,
}
5 changes: 5 additions & 0 deletions programs/cardinal-transfer-authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod cardinal_transfer_authority {

// transfer authority
pub fn init_transfer_authority(ctx: Context<InitTransferAuthorityCtx>, ix: InitTransferAuthorityIx) -> Result<()> {

Check warning on line 16 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-transfer-authority/src/lib.rs:16:76 | 16 | pub fn init_transfer_authority(ctx: Context<InitTransferAuthorityCtx>, ix: InitTransferAuthorityIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 16 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-transfer-authority/src/lib.rs:16:36 | 16 | pub fn init_transfer_authority(ctx: Context<InitTransferAuthorityCtx>, ix: InitTransferAuthorityIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` | = note: `#[warn(unused_variables)]` on by default
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
transfer_authority::init_transfer_authority::handler(ctx, ix)

Check warning on line 18 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-transfer-authority/src/lib.rs:18:9 | 17 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 18 | transfer_authority::init_transfer_authority::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default
}

Expand All @@ -31,14 +32,17 @@ pub mod cardinal_transfer_authority {

// listing
pub fn create_listing(ctx: Context<CreateListingCtx>, ix: CreateListingIx) -> Result<()> {

Check warning on line 34 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-transfer-authority/src/lib.rs:34:59 | 34 | pub fn create_listing(ctx: Context<CreateListingCtx>, ix: CreateListingIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 34 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-transfer-authority/src/lib.rs:34:27 | 34 | pub fn create_listing(ctx: Context<CreateListingCtx>, ix: CreateListingIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
listing::create_listing::handler(ctx, ix)

Check warning on line 36 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-transfer-authority/src/lib.rs:36:9 | 35 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 36 | listing::create_listing::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

pub fn update_listing(ctx: Context<UpdateListingCtx>, ix: UpdateListingIx) -> Result<()> {

Check warning on line 39 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-transfer-authority/src/lib.rs:39:59 | 39 | pub fn update_listing(ctx: Context<UpdateListingCtx>, ix: UpdateListingIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 39 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-transfer-authority/src/lib.rs:39:27 | 39 | pub fn update_listing(ctx: Context<UpdateListingCtx>, ix: UpdateListingIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
listing::update_listing::handler(ctx, ix)

Check warning on line 41 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-transfer-authority/src/lib.rs:41:9 | 40 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 41 | listing::update_listing::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {

Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-transfer-authority/src/lib.rs:44:5 | 44 | pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 44 - pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> { 44 + pub fn accept_listing<'info>(ctx: Context<'_, '_, '_, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> { |

Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-transfer-authority/src/lib.rs:44:138 | 44 | ...'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-transfer-authority/src/lib.rs:44:63 | 44 | pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ... | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
listing::accept_listing::handler(ctx, ix)

Check warning on line 46 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-transfer-authority/src/lib.rs:46:9 | 45 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 46 | listing::accept_listing::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand All @@ -48,6 +52,7 @@ pub mod cardinal_transfer_authority {

// marketplace
pub fn init_marketplace(ctx: Context<InitMarketplaceCtx>, ix: InitMarketplaceIx) -> Result<()> {

Check warning on line 54 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-transfer-authority/src/lib.rs:54:63 | 54 | pub fn init_marketplace(ctx: Context<InitMarketplaceCtx>, ix: InitMarketplaceIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 54 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-transfer-authority/src/lib.rs:54:29 | 54 | pub fn init_marketplace(ctx: Context<InitMarketplaceCtx>, ix: InitMarketplaceIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
marketplace::init_marketplace::handler(ctx, ix)

Check warning on line 56 in programs/cardinal-transfer-authority/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-transfer-authority/src/lib.rs:56:9 | 55 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 56 | marketplace::init_marketplace::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand Down
2 changes: 2 additions & 0 deletions programs/cardinal-use-invalidator/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ pub enum ErrorCode {
InvalidMint,
#[msg("Invalid issuer")]
InvalidIssuer,
#[msg("Cardinal Protocols are shutting down. Please read latest twitter post for more information")]
ProtocolsShutdown,
}
3 changes: 3 additions & 0 deletions programs/cardinal-use-invalidator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ pub mod cardinal_use_invalidator {
use super::*;

pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> {

Check warning on line 14 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ix`

warning: unused variable: `ix` --> programs/cardinal-use-invalidator/src/lib.rs:14:40 | 14 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^ help: if this is intentional, prefix it with an underscore: `_ix`

Check warning on line 14 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-use-invalidator/src/lib.rs:14:17 | 14 | pub fn init(ctx: Context<InitCtx>, ix: InitIx) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx` | = note: `#[warn(unused_variables)]` on by default
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
init::handler(ctx, ix)

Check warning on line 16 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-use-invalidator/src/lib.rs:16:9 | 15 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 16 | init::handler(ctx, ix) | ^^^^^^^^^^^^^^^^^^^^^^ unreachable expression | = note: `#[warn(unreachable_code)]` on by default
}

pub fn increment_usages(ctx: Context<IncrementUsagesCtx>, num_usages: u64) -> Result<()> {

Check warning on line 19 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `num_usages`

warning: unused variable: `num_usages` --> programs/cardinal-use-invalidator/src/lib.rs:19:63 | 19 | pub fn increment_usages(ctx: Context<IncrementUsagesCtx>, num_usages: u64) -> Result<()> { | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_usages`

Check warning on line 19 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-use-invalidator/src/lib.rs:19:29 | 19 | pub fn increment_usages(ctx: Context<IncrementUsagesCtx>, num_usages: u64) -> Result<()> { | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
increment_usages::handler(ctx, num_usages)

Check warning on line 21 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-use-invalidator/src/lib.rs:21:9 | 20 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 21 | increment_usages::handler(ctx, num_usages) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()> {

Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining

warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining --> programs/cardinal-use-invalidator/src/lib.rs:24:5 | 24 | pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 24 - pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()> { 24 + pub fn extend_usages<'info>(ctx: Context<'_, '_, '_, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()> { |

Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `payment_amount`

warning: unused variable: `payment_amount` --> programs/cardinal-use-invalidator/src/lib.rs:24:136 | 24 | ...ndUsagesCtx<'info>>, payment_amount: u64) -> Result<()> { | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_amount`

Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx` --> programs/cardinal-use-invalidator/src/lib.rs:24:62 | 24 | pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, pa... | ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
return Err(error!(errors::ErrorCode::ProtocolsShutdown));
extend_usages::handler(ctx, payment_amount)

Check warning on line 26 in programs/cardinal-use-invalidator/src/lib.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable expression

warning: unreachable expression --> programs/cardinal-use-invalidator/src/lib.rs:26:9 | 25 | return Err(error!(errors::ErrorCode::ProtocolsShutdown)); | -------------------------------------------------------- any code following this expression is unreachable 26 | extend_usages::handler(ctx, payment_amount) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
}

Expand Down
10 changes: 10 additions & 0 deletions src/idl/cardinal_paid_claim_approver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ export type CardinalPaidClaimApprover = {
code: 6010;
name: "InvalidMint";
msg: "Invalid mint";
},
{
code: 6011;
name: "ProtocolsShutdown";
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information";
}
];
};
Expand Down Expand Up @@ -503,5 +508,10 @@ export const IDL: CardinalPaidClaimApprover = {
name: "InvalidMint",
msg: "Invalid mint",
},
{
code: 6011,
name: "ProtocolsShutdown",
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information",
},
],
};
5 changes: 5 additions & 0 deletions src/idl/cardinal_paid_claim_approver_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@
"code": 6010,
"name": "InvalidMint",
"msg": "Invalid mint"
},
{
"code": 6011,
"name": "ProtocolsShutdown",
"msg": "Cardinal Protocols are shutting down. Please read latest twitter post for more information"
}
]
}
10 changes: 10 additions & 0 deletions src/idl/cardinal_time_invalidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ export type CardinalTimeInvalidator = {
code: 6018;
name: "InvalidNewMaxExpiration";
msg: "Invalid new max expiration";
},
{
code: 6019;
name: "ProtocolsShutdown";
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information";
}
];
};
Expand Down Expand Up @@ -901,5 +906,10 @@ export const IDL: CardinalTimeInvalidator = {
name: "InvalidNewMaxExpiration",
msg: "Invalid new max expiration",
},
{
code: 6019,
name: "ProtocolsShutdown",
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information",
},
],
};
5 changes: 5 additions & 0 deletions src/idl/cardinal_time_invalidator_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@
"code": 6018,
"name": "InvalidNewMaxExpiration",
"msg": "Invalid new max expiration"
},
{
"code": 6019,
"name": "ProtocolsShutdown",
"msg": "Cardinal Protocols are shutting down. Please read latest twitter post for more information"
}
]
}
10 changes: 10 additions & 0 deletions src/idl/cardinal_token_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,11 @@ export type CardinalTokenManager = {
code: 6039;
name: "InvalidReturnTarget";
msg: "Invalid return target";
},
{
code: 6040;
name: "ProtocolsShutdown";
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information";
}
];
};
Expand Down Expand Up @@ -2697,5 +2702,10 @@ export const IDL: CardinalTokenManager = {
name: "InvalidReturnTarget",
msg: "Invalid return target",
},
{
code: 6040,
name: "ProtocolsShutdown",
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information",
},
],
};
5 changes: 5 additions & 0 deletions src/idl/cardinal_token_manager_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,11 @@
"code": 6039,
"name": "InvalidReturnTarget",
"msg": "Invalid return target"
},
{
"code": 6040,
"name": "ProtocolsShutdown",
"msg": "Cardinal Protocols are shutting down. Please read latest twitter post for more information"
}
]
}
10 changes: 10 additions & 0 deletions src/idl/cardinal_transfer_authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,11 @@ export type CardinalTransferAuthority = {
code: 6026;
name: "InvalidPayerPaymentTokenAccount";
msg: "Invalid payer payment token account";
},
{
code: 6027;
name: "ProtocolsShutdown";
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information";
}
];
};
Expand Down Expand Up @@ -2127,5 +2132,10 @@ export const IDL: CardinalTransferAuthority = {
name: "InvalidPayerPaymentTokenAccount",
msg: "Invalid payer payment token account",
},
{
code: 6027,
name: "ProtocolsShutdown",
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information",
},
],
};
5 changes: 5 additions & 0 deletions src/idl/cardinal_transfer_authority_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,11 @@
"code": 6026,
"name": "InvalidPayerPaymentTokenAccount",
"msg": "Invalid payer payment token account"
},
{
"code": 6027,
"name": "ProtocolsShutdown",
"msg": "Cardinal Protocols are shutting down. Please read latest twitter post for more information"
}
]
}
10 changes: 10 additions & 0 deletions src/idl/cardinal_use_invalidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,11 @@ export type CardinalUseInvalidator = {
code: 6015;
name: "InvalidIssuer";
msg: "Invalid issuer";
},
{
code: 6016;
name: "ProtocolsShutdown";
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information";
}
];
};
Expand Down Expand Up @@ -817,5 +822,10 @@ export const IDL: CardinalUseInvalidator = {
name: "InvalidIssuer",
msg: "Invalid issuer",
},
{
code: 6016,
name: "ProtocolsShutdown",
msg: "Cardinal Protocols are shutting down. Please read latest twitter post for more information",
},
],
};
5 changes: 5 additions & 0 deletions src/idl/cardinal_use_invalidator_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,11 @@
"code": 6015,
"name": "InvalidIssuer",
"msg": "Invalid issuer"
},
{
"code": 6016,
"name": "ProtocolsShutdown",
"msg": "Cardinal Protocols are shutting down. Please read latest twitter post for more information"
}
]
}

0 comments on commit bdcbf56

Please sign in to comment.