We use three sections through-out the codebase -- standard, default, and
localmodule. This change updates the linter to enforce this pattern as
files are added or modified.
This resolves ASA-2024-008. Patched in 0.37.7 but that version has a breaking change which was reverted in 0.37.8.
The replace for golang.org/x/exp prevents breaking change in slices package causing compile error with gogoproto
* update golinter + add go sec
* add golangci.yml
Co-authored-by: @faddat jacobgadikian@gmail.com
* update
* update
* fix release version
* remove sec, update from pr comments, cleanup golangci.yml to not break on master
* remove @faddat, not valid codeowner
* remove unnecessary make command
* remove incorrectly named golangci.yml file
* add --new-from-rev
* use master instead of main
* remove extra echo
* set the exports properly
* add setup go to work with act
* add some docs to golangci linter
* test new-from-rev
* enable more linters, but app.go back
* verify issues-exit-code being gone
* put it back
* enable more linters
* remove exclusions
* add additional tests that attempt to borrow funds from the insolvent market(should fail), and attempt to borrow funds from the not insolvent market (it will fail, but shouldn't). The not insolvent market should continue to processs borrows
* remove unused code
* make tests less specific for string contains
* add new get total reserves for denoms functionality
* start utilizing GetTotalReservesForDenoms in ValidateBorrow
* update tests for Borrow to not fail when borrowing from an insolvent market
* use get total reseves in GetTotalReservesForDenoms for reusability
* refactor GetTotalReservesForDenoms to GetTotalReservesByCoinDenoms for more clarity
* change the structure for new and old tests and add more verbosity for other tests
* remove print
* remove unneeded code
* add paren
* adjust structure again after initial PR
* remove duplicate test case with invalid test name, and update to use error contains in places where it was validating if true for strings contains
* no need for keeper method
* add additional tests that attempt to borrow funds from the insolvent market(should fail), and attempt to borrow funds from the not insolvent market (it will fail, but shouldn't). The not insolvent market should continue to processs borrows
* remove unused code
* make tests less specific for string contains
* change the structure for new and old tests and add more verbosity for other tests
* remove print
* remove unneeded code
* add paren
* remove duplicate test case with invalid test name, and update to use error contains in places where it was validating if true for strings contains
---------
Co-authored-by: Sam Sheffield <sam.sheffield@kavalabs.io>
Module reserve represents fractional balances, so it should be hidden to consumers to not have a misleading total balance that doubles the fractional balances. This modifies GetBalance() and SpendableCoin() to always return zero coins when fetching the reserve address balance for fractional amounts.
Change GetBalance() to return full balances instead of spendable to align behavior with x/bank. Add SpendableCoin() method with support of akava for use in x/evm.
Emits the **total** akava amount for both ukava and akava send/mint/burns. If both akava,ukava are sent (not possible via x/evm nor cosmos messages but still an edge case), then the sum is emitted. No other denoms are emitted by x/precisebank as they will be emitted by the underlying x/bank
Fix reserve minting an extra coin when the recipient module both carries fractional over to integer balance AND remainder is insufficient. Adjusts fractional carry to simply send from reserve, instead of doing an additional mint. Add invariant to ensure reserve matches exactly with fractional balances + remainder, failing on both insufficient and excess funds.
for internal testnet deployment, record the desired deployment version
as an action variable that can be used by the checkout action instead of
using manual pull & checkout commands
* bump internal-testnet VERSION and genesis file for wbtc config
* Fix EOF on validate genesis by add missing modules; Fix validation by fixing gov params; update total escrow to default
* bump version for latest genesis
---------
Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
## What Changes
- add a native `wbtc` contract to internal-testnet for testing
- seed the dev wallet and some e2e test wallets with funds for this new contract