-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Disable CloseAccount for non-native token accounts #127
Merged
CriesofCarrots
merged 1 commit into
solana-labs:master
from
CriesofCarrots:token-close-native-only
Jul 15, 2020
Merged
Disable CloseAccount for non-native token accounts #127
CriesofCarrots
merged 1 commit into
solana-labs:master
from
CriesofCarrots:token-close-native-only
Jul 15, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvines
approved these changes
Jul 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, would be good to get @jackcmay's sign off as well of course
jackcmay
approved these changes
Jul 15, 2020
ngundotra
pushed a commit
to ngundotra/solana-program-library
that referenced
this pull request
Aug 16, 2022
…hine-cli Gumball Machine CLI
ngundotra
pushed a commit
to ngundotra/solana-program-library
that referenced
this pull request
Aug 30, 2022
…hine-cli Gumball Machine CLI
mschneider
pushed a commit
to blockworks-foundation/solana-program-library
that referenced
this pull request
Dec 10, 2022
* feat: Use proposal seed instead of index * chore: Rename and reset legacy1 to reserved1 * chore: Make Clippy happy * chore: Fix Chat tests compilation
SebastianBor
added a commit
that referenced
this pull request
Dec 15, 2022
* Governance: Remove proposal counter (#127) * feat: Use proposal seed instead of index * chore: Rename and reset legacy1 to reserved1 * chore: Make Clippy happy * chore: Fix Chat tests compilation * Governance: Remove Realm voting proposal count (#128) * feat: Remove Realm.voting_proposal_count * chore: Update comments * chore: Add tests and explicit assertions for non existing accounts * Governance: Remove TokenOwnerRecord total_votes_count (#130) * feat: Extend unrelinquished_votes_count to u64 * chore: Update comments and names * chore: Update asserts * chore: Update comments * chore: Use u32:MAX to trim unrelinquished_votes_count * chore: Make Clippy happy * chore: Update versioning cleanup comments * Governance: Active proposal count (#131) * feat: Add active_proposal_count to Governance * feat: Reallocate GovernanceV1 to GovernanceV2 * chore: test_create_proposal_and_migrate_v1_governance_to_v2 * chore: Cleanup code * chore: Update comments * chore: Use assert_is_valid_realm instead of deserializing the account * chore: Update comments * chore: Update comments * chore: Check for empty account first * chore: Update comments * fix: Assert new account size is greater than the existing one * Governance: Proposal deposit (#135) * feat: Add active_proposal_count to Governance * feat: Reallocate GovernanceV1 to GovernanceV2 * chore: test_create_proposal_and_migrate_v1_governance_to_v2 * chore: Cleanup code * chore: Update comments * chore: Use assert_is_valid_realm instead of deserializing the account * chore: Update comments * chore: Update comments * chore: Check for empty account first * feat: Add extra_lamports to create_and_serialize_account * chore: Make Clippy happy * feat: Implement Proposal security deposit * chore: Make Clippy happy * chore: Add proposal deposit amount tests * feat: Implement RefundProposalDeposit * chore: test_refund_proposal_deposit * chore: Make Clippy happy * chore: test_refund_proposal_deposit_with_cannot_refund_draft_proposal_error * chore: test_refund_proposal_deposit_with_invalid_proposal_owner_record_error * chore: test_refund_proposal_deposit_with_invalid_proposal_owner_error * fix: Return deposit to deposit payer * chore: Cleanup * chore: test_refund_proposal_deposit_with_invalid_proposal_deposit_account_error * fix: Remove unnecessary max(1) for account lamports * Governance: Review feedback (#139) * chore: Update active_proposal_count comment * chore: Update account indices in process_create_proposal * fix: Disallow u8::MAX for deposit_exempt_proposal_count * chore: Use u64 without option for extra_lamports * fix: Use explicit version 1 for TokenOwnerRecord migration * chore: Update math for RealmConfigAccount::get_max_size * fix: Flag ProposalCoolOffTimeNotSupported as legacy instead of reusing it * Governance: Add proposal and payer to ProposalDeposit account (#141) * feat: Add proposal and payer to ProposalDeposit account * chore: Update tests * feat: Use referential fields to check ProposalDeposit * chore: Make Clippy happy * chore: Update Proposal deposit amount comments * chore: Update deposit amount comment * chore: Update versions (#142)
codewithgun
pushed a commit
to MeteoraAg/solana-program-library
that referenced
this pull request
Apr 11, 2023
* 0xripleys outflow limits (solana-labs#125) Use a sliding window rate limiter to limit borrows and withdraws at the lending pool owner's discretion. * 0xripleys borrow coefficient (solana-labs#127) Add a borrow weight to the Reserve * Two Prices PR (solana-labs#129) - Add a smoothed_market_price to Reserve that is used to limit borrows and withdraws in cases where smoothed price and spot price diverge. - allowed_borrow_value now uses the min(smoothed_market_price, current spot price) - new field on obligation called borrowed_value_upper_bound that uses max(smoothed_market_price, current spot price) * audit nits * audit fixes pt 2 * disable rate limiter if window duration == 0 * cli changes for v2.0.1 (solana-labs#133)
codewithgun
added a commit
to MeteoraAg/solana-program-library
that referenced
this pull request
Apr 11, 2023
* allow loan_to_value_ratio == liquidation_threshold (solana-labs#85) * high rate map (solana-labs#86) * high rate map * prop test exception * adding more high rate cases * fix to support higher exponent for switchboard v2 (solana-labs#90) * trying take rate other way (solana-labs#89) * started take rate cleaning up all the boilerplate adding reserve config take rate claim fees config check + fixing/adding tests fix comment in instruction.rs fixed tests for native token and added pr feedback properly keeping track of availible amount when redeeming fees add in fees when compounding try other method * change to accumulating and redeem when can also added staleness checks * fixed tests * cleanup * sliding down borrow limit and 1 percent close factor (solana-labs#91) * sliding down borrow limit and 1 percent close factor * fix tests * final dates set * only redeem as much collateral as liquidity allows during liquidate (solana-labs#88) * only redeem as much collateral as liquidity allows * added test for where not enough liquidity to fully redeem and liquidation * ignore redeem if no collateral to withdraw * rebase and fix tests * undo borrow limit and close factor change and cap liquidation amount (solana-labs#92) * undo borrow limit and close factor change, but keep caps on borrow limits * fml changed the wrong variable * add new liquidation value cap * test coverage github action (solana-labs#94) * test coverage github action * move actions to another job * moving stuff around * grr * artifact error * try cobertura format with codecov * add decimal test * formatting * tests for decimal * rate tests * format * tests for calculate liquidation * enable github actions on commits to upcoming branch (solana-labs#96) * turn on liquidation fees and deprecate old liquidation instruction (solana-labs#100) * turn on liquidation fees and deprecate old liquidation instruction * fix tests * clippy * bump solana to 1.9.18 (solana-labs#97) * bump t o 1.9.18 * Solve clippy warnings after bump update * bump solana version in script * fixing various warnings * fix all clippy warnings in the tests * fmt Co-authored-by: Andrei Hrs <andrei_hristescu@yahoo.com> * flash loans (solana-labs#95) * copying kiplet's code * make flash loans more conservative * happy case test * adding more tests, fixed a bug * moar tests * clippy lints * fix assert * remove clock * remove old flash loan instruction, but keep the instruction packing code * saner flash loan fee calculation * add flash borrow ix arg to flash repay * cargo fmt * add cpi repay test * bump compute units, no idea why github actions is failing * test for malicious use case * remove unused variable * fix coverage, check reserve borrow limit in flash borrow * mark reserves as stale in flash borrow and repay * revert back to old nightly version, install grcov with stable * fix for [repay, borrow, repay] * refactor CPI * recheck stuff in flash repay * explicitly check for out of bounds in flash borrow loop * 0xripleys remove clock (solana-labs#99) * make clock sysvar optional * remove clock from instructions * add stack height check * fmt * bump cargo version (solana-labs#103) * make cli update only update if actually changing something and add an… (solana-labs#101) * make cli update only update if actually changing something and add anchor.toml * fix clippy * allow 0 ltv assets to be deposited + minor cleanup (solana-labs#104) * Obligation_owner should be readonly (solana-labs#87) Issue: As in description `WithdrawObligationCollateralAndRedeemReserveCollateral` combines `WithdrawObligationCollateral` and `RedeemReserveCollateral`. While `obligation_owner` in `WithdrawObligationCollateral` is readonly, it is writable in `WithdrawObligationCollateralAndRedeemReserveCollateral` is writable. Solution: Update `obligation_owner` readonly in `WithdrawObligationCollateralAndRedeemReserveCollateral` * allow passing just pyth to save bytes (solana-labs#105) * oallow passing just pyth to save bytes * fixing to check that there is a next account and 1 other check * use option instead * added a test * update debt limit (solana-labs#107) * 0xripleys manual liquidate (solana-labs#112) * kinda working cli liquidation * dynamically create atas if they don't exist * adding compute budget request * fix clippy * liquidate scripts * withdraw ctokens command * add redeem reserve collateral function * fix cli for updating oracle (solana-labs#114) * Use pyth sdk + tests (solana-labs#113) * Create a crate, relax solana dependencies in crate (solana-labs#118) * bump solana version to 1.14 (solana-labs#116) * (rfc) bump solana version to 1.14 * fix build * remove flag * update solana version * fix clippy * fix clippy * pin serde version * Refactor and improve tests (solana-labs#121) - use Reserve, LendingMarket, Obligation types directly instead of TestReserve, TestLendingMarket, TestObligation - more helper functions - check account state after every successful program call - check _all_ token accounts and mint accounts after every successful program call * changing util rate calc to exclude non-claimed fees (solana-labs#132) * Solend v2.0.1 (solana-labs#131) * 0xripleys outflow limits (solana-labs#125) Use a sliding window rate limiter to limit borrows and withdraws at the lending pool owner's discretion. * 0xripleys borrow coefficient (solana-labs#127) Add a borrow weight to the Reserve * Two Prices PR (solana-labs#129) - Add a smoothed_market_price to Reserve that is used to limit borrows and withdraws in cases where smoothed price and spot price diverge. - allowed_borrow_value now uses the min(smoothed_market_price, current spot price) - new field on obligation called borrowed_value_upper_bound that uses max(smoothed_market_price, current spot price) * audit nits * audit fixes pt 2 * disable rate limiter if window duration == 0 * cli changes for v2.0.1 (solana-labs#133) * div by zero fix (solana-labs#138) * div by zero fix * fmt * use cur slot instead of 0 * fix for withdraw case (solana-labs#140) --------- Co-authored-by: nope <83512286+nope-finance@users.noreply.github.com> Co-authored-by: Nope X <nope@solend.fi> Co-authored-by: 0xripleys <105607696+0xripleys@users.noreply.github.com> Co-authored-by: Andrei Hrs <andrei_hristescu@yahoo.com> Co-authored-by: andrewsource147 <31321699+andrewsource147@users.noreply.github.com>
HaoranYi
pushed a commit
to HaoranYi/solana-program-library
that referenced
this pull request
Jul 19, 2023
* Governance: Remove proposal counter (solana-labs#127) * feat: Use proposal seed instead of index * chore: Rename and reset legacy1 to reserved1 * chore: Make Clippy happy * chore: Fix Chat tests compilation * Governance: Remove Realm voting proposal count (solana-labs#128) * feat: Remove Realm.voting_proposal_count * chore: Update comments * chore: Add tests and explicit assertions for non existing accounts * Governance: Remove TokenOwnerRecord total_votes_count (solana-labs#130) * feat: Extend unrelinquished_votes_count to u64 * chore: Update comments and names * chore: Update asserts * chore: Update comments * chore: Use u32:MAX to trim unrelinquished_votes_count * chore: Make Clippy happy * chore: Update versioning cleanup comments * Governance: Active proposal count (solana-labs#131) * feat: Add active_proposal_count to Governance * feat: Reallocate GovernanceV1 to GovernanceV2 * chore: test_create_proposal_and_migrate_v1_governance_to_v2 * chore: Cleanup code * chore: Update comments * chore: Use assert_is_valid_realm instead of deserializing the account * chore: Update comments * chore: Update comments * chore: Check for empty account first * chore: Update comments * fix: Assert new account size is greater than the existing one * Governance: Proposal deposit (solana-labs#135) * feat: Add active_proposal_count to Governance * feat: Reallocate GovernanceV1 to GovernanceV2 * chore: test_create_proposal_and_migrate_v1_governance_to_v2 * chore: Cleanup code * chore: Update comments * chore: Use assert_is_valid_realm instead of deserializing the account * chore: Update comments * chore: Update comments * chore: Check for empty account first * feat: Add extra_lamports to create_and_serialize_account * chore: Make Clippy happy * feat: Implement Proposal security deposit * chore: Make Clippy happy * chore: Add proposal deposit amount tests * feat: Implement RefundProposalDeposit * chore: test_refund_proposal_deposit * chore: Make Clippy happy * chore: test_refund_proposal_deposit_with_cannot_refund_draft_proposal_error * chore: test_refund_proposal_deposit_with_invalid_proposal_owner_record_error * chore: test_refund_proposal_deposit_with_invalid_proposal_owner_error * fix: Return deposit to deposit payer * chore: Cleanup * chore: test_refund_proposal_deposit_with_invalid_proposal_deposit_account_error * fix: Remove unnecessary max(1) for account lamports * Governance: Review feedback (solana-labs#139) * chore: Update active_proposal_count comment * chore: Update account indices in process_create_proposal * fix: Disallow u8::MAX for deposit_exempt_proposal_count * chore: Use u64 without option for extra_lamports * fix: Use explicit version 1 for TokenOwnerRecord migration * chore: Update math for RealmConfigAccount::get_max_size * fix: Flag ProposalCoolOffTimeNotSupported as legacy instead of reusing it * Governance: Add proposal and payer to ProposalDeposit account (solana-labs#141) * feat: Add proposal and payer to ProposalDeposit account * chore: Update tests * feat: Use referential fields to check ProposalDeposit * chore: Make Clippy happy * chore: Update Proposal deposit amount comments * chore: Update deposit amount comment * chore: Update versions (solana-labs#142)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also a couple
cargo fmt
fixes