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

Improve the Gov Module Mechanism by BLV Labs #529

Open
wants to merge 101 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
cff38ea
[tutm][Proposal1][initialize]: added note props#1 file
TuSoict Sep 29, 2024
a92ee1b
add new param, custom module gov
duonghb53 Sep 29, 2024
ee4aa1a
add proto
duonghb53 Sep 30, 2024
5af0ad2
Merge commit 'ee4aa1a1b867660050d89d924802aeff99312988' into origin/b…
TuSoict Sep 30, 2024
02fc71c
generated pb.go files
TuSoict Oct 1, 2024
062774b
added value in 500$ for param: minUusdDeposit
TuSoict Oct 1, 2024
03990d2
added TotalDepositKey func
TuSoict Oct 1, 2024
4e366a6
Implemented a logic:
TuSoict Oct 1, 2024
9b22f54
Updated the converting logic in SubmitProposal Func
TuSoict Oct 1, 2024
22141bd
marshall amount before store in SetPriceLuncBaseUusd func
TuSoict Oct 2, 2024
6d7fa29
Handle the CheckLimitlDeposit rule in AddDeposit func:
TuSoict Oct 2, 2024
b80170f
Updated the HandleCheckMinInitialDeposit logic in ante of auth module
TuSoict Oct 3, 2024
76927b6
Overided keeper instance in keeper.go (gov module)
TuSoict Oct 3, 2024
2badfc1
chang proto
duonghb53 Oct 3, 2024
e26da00
Overided keeper instance in keeper.go (gov module)
TuSoict Oct 3, 2024
f63eefb
add get query cmd
duonghb53 Oct 3, 2024
b422289
move gov types to v2lunc1
duonghb53 Oct 4, 2024
5e4b632
update types the HandleCheckMinInitialDeposit logic in ante of auth m…
TuSoict Oct 4, 2024
562e610
move gov types to v2lunc1
duonghb53 Oct 4, 2024
7df5045
Merge commit 'b422289350edcdd7fcb55e6cb55badba6de5f74e' into blv-labs…
TuSoict Oct 4, 2024
d1213e8
Merge commit '562e6101037a665964ae29f5b5e80e0a50ddf568' into blv-labs…
TuSoict Oct 4, 2024
435086a
Updated a logic in genesis module
TuSoict Oct 7, 2024
c7429a4
Fixed types in MinInitialDeposit.go
TuSoict Oct 8, 2024
869d296
add keys_test.go (unitest for keys.go)
TuSoict Oct 10, 2024
5387458
- add tax module
StrathCole Oct 11, 2024
254e6e2
- working version of reverse charge handling
StrathCole Oct 11, 2024
7a73828
add upgrade handler and linting
StrathCole Oct 11, 2024
553d870
- remove unnecessary context values
StrathCole Oct 11, 2024
79b8b25
- use upstream wasm message server
StrathCole Oct 11, 2024
579f5db
- fix in tax exemption
StrathCole Oct 12, 2024
eeef11a
Completed migrate from version 4 to 5.
TuSoict Oct 12, 2024
5bf6106
added missing file
TuSoict Oct 12, 2024
a4cc750
Merge branch 'blv-labs/gov-improve' into blv-labs/gov-unitest
TuSoict Oct 12, 2024
fb0f953
Update codec & fix config test
TuSoict Oct 13, 2024
a749a91
Done min_initial_deposit_test.go
TuSoict Oct 13, 2024
f8a724e
Done Genesis_test.go
TuSoict Oct 13, 2024
0c594e7
add keeper & proposal unit test
duonghb53 Oct 13, 2024
6870149
- fix tax rate
StrathCole Oct 14, 2024
4dad6d3
- swagger
StrathCole Oct 14, 2024
92ec3f5
- gofump
StrathCole Oct 14, 2024
20630a1
- linting
StrathCole Oct 14, 2024
5411b6c
move tax payment to post handler
StrathCole Oct 14, 2024
2e22c9c
- add tax post
StrathCole Oct 14, 2024
ef8a0f6
- fix api urls
StrathCole Oct 14, 2024
094409a
- fix proto
StrathCole Oct 14, 2024
6a0e730
make tax query response backwards compatible
StrathCole Oct 14, 2024
80a0d2d
- proto fixes
StrathCole Oct 14, 2024
fa14819
add deposit test
duonghb53 Oct 14, 2024
61ea499
remove debug
duonghb53 Oct 14, 2024
e322cd9
- refund tax on contract execution
StrathCole Oct 14, 2024
79c22a8
- fix for e2e
StrathCole Oct 14, 2024
624702f
- change hermes gas adjustment
StrathCole Oct 14, 2024
6e9ed9b
added files for unitest:
TuSoict Oct 15, 2024
6265c9d
added migrator_test.go
TuSoict Oct 15, 2024
03ec02b
add msg server test
duonghb53 Oct 16, 2024
6fcd6e5
- set gas price in ic test setup
StrathCole Oct 17, 2024
fa06f7e
add min uusd to genesis and debug error
duonghb53 Oct 19, 2024
5240f63
fix bug and run chain ok
duonghb53 Oct 20, 2024
10bcfdc
remove log
duonghb53 Oct 21, 2024
6e3bb23
- fix ictest
StrathCole Oct 21, 2024
909c3ed
Merge branch 'blv-labs/gov-unitest' into duonghb/add-msg-server-test
duonghb53 Oct 21, 2024
3fa6092
fix msg query server and test
duonghb53 Oct 25, 2024
2c81f7b
add upgrade plan
duonghb53 Oct 26, 2024
00dfc79
add integration test upgrade chain and sub mit proposal ok
duonghb53 Oct 26, 2024
eb941ca
Review, clean and fix some bugs
TuSoict Oct 27, 2024
9e52573
revert register distribution codec
TuSoict Oct 27, 2024
6e0cf5e
update scripts, logic get min deposit
TuSoict Oct 27, 2024
a5ae5fa
added script for intergration testing
TuSoict Oct 28, 2024
68f6d12
review and clean code
TuSoict Oct 28, 2024
36a1f6e
added README.md for custom gov module
TuSoict Oct 28, 2024
3914bc8
revert register code from gov in others module
TuSoict Oct 28, 2024
6035640
Review and clean code (if needed)
TuSoict Oct 28, 2024
bec6d63
fixed checking rule: MinInitialDeposit in ante of auth module
TuSoict Oct 28, 2024
e957bfa
removed unused import in proto files
TuSoict Oct 28, 2024
a7ad120
Fixed error (unknown field "min_uusd_deposit" in v1.Params) e2e test…
TuSoict Oct 28, 2024
6e3a28c
fixed bugs when build & Test / liveness-test in testnet.go
TuSoict Oct 28, 2024
30c7ccc
fixed golangci-lint-Related Bugs
ntluongdev95 Oct 30, 2024
0832c67
removed .history files
ntluongdev95 Oct 30, 2024
4cd9346
add logic get uusd
duonghb53 Nov 3, 2024
ae8d370
fix lint
duonghb53 Nov 3, 2024
2f33b29
Merge pull request #2 from BLV-Labs/fix/get-uusd-price
duonghb53 Nov 4, 2024
d780c04
fix generate address by order
duonghb53 Nov 4, 2024
0f2fd74
- change v9 to v10 due to tax2gas conflict
StrathCole Nov 5, 2024
4c44c75
Deleted useless file to clean code
TuSoict Nov 6, 2024
f286f6d
- fix subtraction leading to negative amount
StrathCole Nov 7, 2024
7955ba0
added offset buffet to reduce limit initial deposit when creating prop
TuSoict Nov 10, 2024
2f1168f
Updated unitest
TuSoict Nov 10, 2024
75951e1
- move minGasPrices inside the oracle check block
StrathCole Nov 13, 2024
6a03590
- remove dependency
StrathCole Nov 13, 2024
69c5019
update uusd amount
duonghb53 Nov 16, 2024
4ca2078
- remove commented code
StrathCole Nov 16, 2024
1de4dd8
- fix fee check
StrathCole Nov 21, 2024
71143d8
Merge branch 'blv/gov' into blv-labs/optimize-calculation-deposit-gov…
TuSoict Nov 25, 2024
43ef592
resolve comment
duonghb53 Nov 29, 2024
7c07829
Updating urls string for LegacyAminoCodec
TuSoict Dec 6, 2024
b5fbe60
Merge branch 'main' into blv/gov
StrathCole Dec 7, 2024
85514a5
- merge fixes
StrathCole Dec 7, 2024
50770a2
change version upgrade name
duonghb53 Dec 8, 2024
d77ea7a
Merge branch 'blv/gov' into blv-labs/optimize-calculation-deposit-gov…
TuSoict Dec 8, 2024
79631f0
change v10 -> v10_1
duonghb53 Dec 8, 2024
20ed559
change name uusd -> usd
duonghb53 Dec 9, 2024
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
marshall amount before store in SetPriceLuncBaseUusd func
TuSoict committed Oct 2, 2024
commit 22141bdc186b4440ba891855f8c03ea31a018bd6
8 changes: 6 additions & 2 deletions custom/gov/keeper/proposal.go
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat

// Get exchange rate betweent Lunc/uusd from oracle
// save it to store
amt := sdk.NewInt(10)
amt := sdk.NewInt(1000000)
offerCoin := sdk.NewCoin(core.MicroUSDDenom, amt)
price, err := keeper.oracleKeeper.GetLunaExchangeRate(ctx, offerCoin.Denom)
if err != nil {
@@ -131,5 +131,9 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat
func (keeper Keeper) SetPriceLuncBaseUusd(ctx sdk.Context, proposalID uint64, amount sdk.Dec) {
store := ctx.KVStore(keeper.storeKey)
key := v2luncv1types.TotalDepositKey(proposalID)
store.Set(key, []byte(amount.String()))

bz, err := amount.Marshal()
if err == nil {
store.Set(key, bz)
}
}