Skip to content
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

Add Net Asset Value to Markers #1640

Merged
Merged
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
3f24366
add an initial proto object for marker nav
nullpointer0x00 Jul 27, 2023
2d08783
fix update time proto
nullpointer0x00 Aug 1, 2023
c2634e2
add missing method comments
nullpointer0x00 Aug 1, 2023
cbcb223
add net asset value key as 0x04
nullpointer0x00 Aug 1, 2023
e238295
update keys for adding multiple navs, add iterator for navs, add miss…
nullpointer0x00 Aug 1, 2023
2612426
add spec entry
nullpointer0x00 Aug 1, 2023
4bf4e60
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Aug 1, 2023
815ccb9
spec modification
nullpointer0x00 Aug 1, 2023
0f43d8b
add change log entry
nullpointer0x00 Aug 2, 2023
bec8248
add marker nav to add marker msg
nullpointer0x00 Aug 2, 2023
123f7fb
change marker nav to non-nullable array, add constructor param, updat…
nullpointer0x00 Aug 2, 2023
d07cfe3
add marker nav validate method and test
nullpointer0x00 Aug 2, 2023
b7e2707
add constructor, add constructor test to make sure values are set, ad…
nullpointer0x00 Aug 2, 2023
f29b116
add marker nav validation in validate basic on add marker msg
nullpointer0x00 Aug 2, 2023
37d1a89
add msg server test file, move add deny list test from keeper_test to…
nullpointer0x00 Aug 3, 2023
39afe2b
move TestUpdateForcedTransfer to msg_server_test from keeper_test
nullpointer0x00 Aug 3, 2023
9ca3ad1
add add/delete net asset value endpoints
nullpointer0x00 Aug 3, 2023
bd5f5f3
refactor MarkerNetAssetValue to NetAssetValue, add new msgs to codec,…
nullpointer0x00 Aug 3, 2023
e8491fd
add validate basic impls for add/delete net asset value
nullpointer0x00 Aug 3, 2023
afd3938
refactor naming of proto property
nullpointer0x00 Aug 3, 2023
1a09579
update validate basics for nav msgs, add tests for nav msgs
nullpointer0x00 Aug 3, 2023
819be27
add start of impl for add/delete nav endpoints
nullpointer0x00 Aug 3, 2023
33e86fb
add impl to set net asset value to keystore in AddNetAssetValue endpoint
nullpointer0x00 Aug 3, 2023
2e53030
add impl to delete net asset value from keystore in DeleteNetAssetVal…
nullpointer0x00 Aug 3, 2023
06ed285
add events to msg server
nullpointer0x00 Aug 4, 2023
0ad7b47
add check for value denom before setting nav, add msg server test for…
nullpointer0x00 Aug 4, 2023
0a7a90c
add delete nav msg server test
nullpointer0x00 Aug 4, 2023
ca283ab
only allow update time to be block time and set by chain
nullpointer0x00 Aug 7, 2023
739c0fe
fix constructor, update tests
nullpointer0x00 Aug 8, 2023
2305b24
remove invalid tests
nullpointer0x00 Aug 8, 2023
24ae2f4
add navs to addfinalizeactivate tx, add navs to param signature
nullpointer0x00 Aug 8, 2023
1a59112
add navs to constructor, add validation basic checks for add finalize…
nullpointer0x00 Aug 8, 2023
d471e6d
fix some tests
nullpointer0x00 Aug 8, 2023
b2a37d3
fixed all tests
nullpointer0x00 Aug 8, 2023
c233245
create shared method for adding navs
nullpointer0x00 Aug 8, 2023
f0ec62b
fix bank send tests
nullpointer0x00 Aug 8, 2023
0c17faf
fix marker handler tests
nullpointer0x00 Aug 8, 2023
b22e287
fix more tests
nullpointer0x00 Aug 8, 2023
9214440
Refactor proto for design change
nullpointer0x00 Aug 9, 2023
b5b2d18
more refactoring cleanup
nullpointer0x00 Aug 9, 2023
9a90318
refactor and builds now
nullpointer0x00 Aug 9, 2023
987ab4a
merge main
nullpointer0x00 Aug 10, 2023
ad7ff5c
update nav validate for new pattern
nullpointer0x00 Aug 10, 2023
339d59e
fix remaining tests
nullpointer0x00 Aug 10, 2023
f53b44a
add cli flags, update constructor, fix tests
nullpointer0x00 Aug 10, 2023
4764415
update wasm encoding with new create marker values
nullpointer0x00 Aug 10, 2023
295d4c9
merge main
nullpointer0x00 Aug 11, 2023
2442958
merge main
nullpointer0x00 Aug 15, 2023
672b645
fix change log
nullpointer0x00 Aug 15, 2023
1bc933b
fix generated statik.go file
nullpointer0x00 Aug 15, 2023
21f6aa8
add const for usd cents denom
nullpointer0x00 Aug 15, 2023
3acd082
allow nav to be updated by gov or signer with any type of access perm…
nullpointer0x00 Aug 15, 2023
868229e
add net asset value query protos
nullpointer0x00 Aug 15, 2023
9dab583
remove outdated test
nullpointer0x00 Aug 15, 2023
378880a
add impl for navs query
nullpointer0x00 Aug 15, 2023
4e0a65f
add net asset values query command
nullpointer0x00 Aug 15, 2023
e23db7b
update spec
nullpointer0x00 Aug 15, 2023
265b530
fix broken test
nullpointer0x00 Aug 15, 2023
abd27f7
remove todo
nullpointer0x00 Aug 15, 2023
41740d8
remove RemoveNetAssetValue method
nullpointer0x00 Aug 15, 2023
0e1646b
move finalize test, add test case of no net asset value
nullpointer0x00 Aug 15, 2023
b0edf46
add test for checking add nav permissions
nullpointer0x00 Aug 15, 2023
50e19e8
add validate basic test for update height being set
nullpointer0x00 Aug 15, 2023
6bc7328
remove scar tissue code
nullpointer0x00 Aug 15, 2023
1c57dbd
fix proto-lint
nullpointer0x00 Aug 15, 2023
6d34194
add nav event
nullpointer0x00 Aug 16, 2023
e7d7946
add nav event emit
nullpointer0x00 Aug 16, 2023
52b6483
add refactored name
nullpointer0x00 Aug 16, 2023
dc80f8f
add rolling average method
nullpointer0x00 Aug 16, 2023
6e91cd2
add module name for source, check that total volume is not 0
nullpointer0x00 Aug 16, 2023
e6e92b0
emit nav at before averaging
nullpointer0x00 Aug 16, 2023
572640a
check that volume does not exceed supply
nullpointer0x00 Aug 16, 2023
98b040f
rename proto from value to price per token
nullpointer0x00 Aug 16, 2023
d677fd0
add genesis init and export
nullpointer0x00 Aug 16, 2023
2e019a6
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Aug 17, 2023
9087b07
remove type
nullpointer0x00 Aug 17, 2023
08ada35
add query test
nullpointer0x00 Aug 17, 2023
327cc97
add tests for volume and usd cents flag
nullpointer0x00 Aug 17, 2023
052da54
add method comments, make rolling average public
nullpointer0x00 Aug 17, 2023
410eaaf
fix appending logic in genesis export
nullpointer0x00 Aug 17, 2023
76fa8cf
add event spec
nullpointer0x00 Aug 17, 2023
4dbc457
rename event attribute
nullpointer0x00 Aug 17, 2023
e85d1e3
fix spec formatting
nullpointer0x00 Aug 17, 2023
8a2fbba
remove net asset value on destroyed marker
nullpointer0x00 Aug 17, 2023
be70b8d
refactor and fix lint
nullpointer0x00 Aug 17, 2023
0159d31
merge main
nullpointer0x00 Aug 18, 2023
c50fd1c
update test with nav
nullpointer0x00 Aug 18, 2023
fa57436
rename msg server endpoint, update test
nullpointer0x00 Aug 18, 2023
eda96c4
moving add marker test
nullpointer0x00 Aug 18, 2023
7afb78d
completely move test and test for events
nullpointer0x00 Aug 18, 2023
dbf71fd
add command for adding navs
nullpointer0x00 Aug 18, 2023
a79517a
add command to new cmd tx
nullpointer0x00 Aug 18, 2023
2507057
update parsing of net asset values, add tests
nullpointer0x00 Aug 18, 2023
eb99085
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Aug 22, 2023
4c572f7
update cli tests
nullpointer0x00 Aug 22, 2023
9c28904
add rolling average test
nullpointer0x00 Aug 22, 2023
2b244b0
update spec for net asset value
nullpointer0x00 Aug 22, 2023
b3ef235
add spec for add/updating net asset value
nullpointer0x00 Aug 22, 2023
03bae17
merge main
nullpointer0x00 Aug 22, 2023
ffd7d5e
should be administor not module as source
nullpointer0x00 Aug 22, 2023
82870e7
merge main, fix statik.go
nullpointer0x00 Aug 28, 2023
70d3a16
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
iramiller Aug 28, 2023
9227bfb
rename price_per_token to price
nullpointer0x00 Aug 29, 2023
649122f
remove rolling average, fix test
nullpointer0x00 Aug 29, 2023
624d29a
fix typo
nullpointer0x00 Aug 30, 2023
7429bc3
update documentation
nullpointer0x00 Aug 30, 2023
e54de96
update volume doc again
nullpointer0x00 Aug 30, 2023
d3c9da6
rename comment
nullpointer0x00 Aug 31, 2023
a16398a
rename method
nullpointer0x00 Aug 31, 2023
47d83e4
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Aug 31, 2023
ab4bc28
merge main
nullpointer0x00 Aug 31, 2023
119588b
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Aug 31, 2023
2d23b89
Merge branch 'main' into nullpointer0x00/1470-add-share-pricing-to-ma…
nullpointer0x00 Sep 5, 2023
bdb13b5
merge main, fix conflict
nullpointer0x00 Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove outdated test
nullpointer0x00 committed Aug 15, 2023
commit 9dab5839bc4c068113d4f2078a4efa30a9a5cce6
36 changes: 0 additions & 36 deletions x/marker/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -1208,39 +1208,3 @@ func TestGetAuthority(t *testing.T) {
app := simapp.Setup(t)
require.Equal(t, "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", app.MarkerKeeper.GetAuthority())
}

func TestRemoveIsSendEnabledEntries(t *testing.T) {
app := simapp.Setup(t)
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
markerAddr := types.MustGetMarkerAddress("testcoin").String()

err := app.MarkerKeeper.AddMarkerAccount(ctx, &types.MarkerAccount{
BaseAccount: &authtypes.BaseAccount{
Address: markerAddr,
AccountNumber: 23,
},
AccessControl: []types.AccessGrant{
{
Address: "cosmos1w6t0l7z0yerj49ehnqwqaayxqpe3u7e23edgma",
Permissions: types.AccessListByNames("deposit,withdraw"),
},
},
Denom: "testcoin",
Supply: sdk.NewInt(1000),
MarkerType: types.MarkerType_Coin,
Status: types.StatusActive,
})
require.NoError(t, err, "should have added marker")
app.BankKeeper.SetSendEnabled(ctx, "testcoin", false)
app.BankKeeper.SetSendEnabled(ctx, "nonmarkercoin", false)

sendEnabledItems := app.BankKeeper.GetAllSendEnabledEntries(ctx)
assert.Len(t, sendEnabledItems, 2, "before removal")

app.MarkerKeeper.RemoveIsSendEnabledEntries(ctx)
sendEnabledItems = app.BankKeeper.GetAllSendEnabledEntries(ctx)
assert.Equal(t, len(sendEnabledItems), 1, "denom without a marker should only exist")
assert.Equal(t, sendEnabledItems[0].Denom, "nonmarkercoin", "denom without a marker should only exist")
assert.False(t, app.BankKeeper.IsSendEnabledDenom(ctx, "nonmarkercoin"), "should be in table as false since there is not a marker associated with it")
assert.True(t, app.BankKeeper.IsSendEnabledDenom(ctx, "testcoin"), "should not exist in table therefore default to true")
}