-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow transfer agents to do exchange settlements with restricted coin…
…s. (#1835) * [1834]: Add tourmaline-rc2 upgrade handler since I'm about to make a state-breaking change that'll require an upgrade. * [1834]: Add context functions for passing in the transfer agent. * [1834]: Pay attention to the newly available transfer agent in the send restriction. Move the deposit check to SendRestrictionFn (from validateSendDenom) since don't need to repeat that check for every denom. Add a check for withdraw on the from addr since that might now be a marker account. Tweak a couple error messages to distinguish them from eachother. In the transfer endpoint, if the destination is also a marker, check for deposit access on that marker. * [1834]: Switch the TestAccountKeeperMintBurnCoins fix to provide the transfer agent instead of just bypassing the send restrictions. * [1834]: If no force transfer, and coming from a marker, make sure the admin has withdraw on that marker. Unit tests on the TransferCoin function. * [1834]: Unit tests on the send restriction function. * [1834]: Set the transfer agent in the exchange stuff that does bank stuff. * [1834]: Fix the unit tests that broke and add a couple new ones. * [1834]: tiny tweak to a couple unit tests. * [1834]: In AddSetNetAssetValues, emit the nav event even when the price denom's marker isn't found. * [1834]: Tweak TestKeeper_WithdrawMarketFunds again to make it a little easier on test setup. * [1834]: lint (kind of since it's in a test file that isn't linted, but whatever). * [1834]: Add access validator functions to the marker to standardize the errors when an address doesn't have a certain role. * [1834]: Remove redundant 'access' from error about not having access (the enum name starts with ACCESS_). * [1834]: Standardize the no-access errors. In WithdrawCoins, if going to a marker, make sure they've got deposit on that marker. Require a marker to be active in ordr to send its funds. * [1834]: Update TransferCoin. Add comment above authzHandler with the reason we don't check for withdraw and remove the check for withdraw. * [1834]: Fix the error in validateSendDenom for sends to a marker to reference the correct denom and address. * [1834]: Fix the tests that broke because I changed the error messages. * [1834]: Update AddSetNetAssetValues. Try all entries even if an earlier one has an error. If the price marker does not exist, only emit the event if the nav is valid. Put some unit tests on that thing. * [1834]: Add unit test on send restriction when we can't get attributes. * [1834]: Fix some comments in the mocks, add a unit test making sure force-transfer access is ignored in the send restriction, and add force transfer to a couple access unit tests. * [1834]: Update marker spec docs with all the recent chagnes. * [1834]: For the exchange stuff, pay attention to blocked addresses in the off-chance one gets used. * [1834]: Check that a marker is active before allowing a transfer. * [1834]: In WithdrawCoins, make sure the recipient is not a bank blocked address. * [1834]: Some tweaks to the spec docs to fix some typos, grammer, and flowchart stuff. * [1834]: Redo the flows so that denied is on the left for all of them. Add some links between flows. * [1834]: Fix the names of a bunch of keeper unit tests that claim to be testing account stuff. * [1834]: Unit tests on WithdrawCoins and on Transfer of non-active coins. * [1834]: Fix unit tests on WithdrawMarketFunds that broke because a call to BlockedAddr is now being made that wasn't expected previously. Add test for when the address is blocked. * [1834]: Fix TestKeeper_SettleCommitments that broke because of the added calls to BlockedAddr that weren't previously expected. * [1834]: Fix TestKeeper_DoTransfer that broke because we added calls to BlockedAddr that weren't listed as expected. Add a test for when an address is blocked. * [1834]: Fix TestKeeper_SettleOrders that broke when I added calls to BlockedAddr. * [1834]: Fix the FillAsks and FillBids unit tests that broke when I started calling BlockedAddr. * [1834]: Remove TODO that's TODONE (unit tests on blocked addresses). * [1834]: Update the exchange spec docs to include stuff about the transfer agent as well as a commitment settlement fee calc example. * [1834]: Add changelog entries.
- Loading branch information
1 parent
c3d8a9b
commit cdb1949
Showing
38 changed files
with
2,956 additions
and
401 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.