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

feat: add module mint, feeburn #157

Merged
merged 60 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
fa6db55
feat: add NewMinGasPriceDecorator
Dec 20, 2022
65407dc
feat: add module feeburn
Dec 21, 2022
d6a96e7
refactor fee burn
Dec 22, 2022
08d4519
update proto and add some test
Dec 22, 2022
1606b27
add integration test
Dec 23, 2022
90af238
add test send batch transaction
Dec 23, 2022
9240375
update integration test
Dec 26, 2022
605cc5b
refactor add ante test
Dec 27, 2022
52f99f2
add integration test feeburn
Dec 28, 2022
564bf70
dev/mint (#155)
LampardNguyen234 Dec 28, 2022
0a2cc60
chore: remove proto unused
Dec 28, 2022
e95415e
test: fix unittest invalid denom
Dec 28, 2022
50c50f3
chore: remove code unused
Dec 28, 2022
e9dea88
Merge remote-tracking branch 'origin/module/feeburn' into astra
Dec 28, 2022
c45452c
refactor: update astra app
Dec 28, 2022
229a8fa
docs: add module feeburn
Dec 28, 2022
e7d17ef
fix: miss feeburn in ante handler
Dec 28, 2022
9edf7db
refactor: reorder module
Dec 29, 2022
8cfc678
chore(mint): add queryCirculatingSupply and queryBondedRatio methods
LampardNguyen234 Dec 30, 2022
22e273b
test(mint): update unit tests
LampardNguyen234 Dec 30, 2022
020ca98
feat: add feeburn rest api
Dec 31, 2022
9dc768a
chore: update swagger
Dec 31, 2022
9a5606f
chore: update script gen
Dec 31, 2022
6d12dc1
refactor: update proto
Dec 31, 2022
fd8da6d
test: add feeburn integration test
Dec 31, 2022
7f537ea
chore: upadte init.sh
Dec 31, 2022
ba08f65
feat: add get total_fee_burn in module fee
Dec 31, 2022
42930b3
chore: update init.sh
Jan 3, 2023
9ac6a01
test: update integration test feeburn
Jan 3, 2023
84d3056
test: add integration test evm tx
Jan 3, 2023
571425b
test: update integration test
Jan 3, 2023
b25af35
test: upadte integration tests for mint
LampardNguyen234 Jan 3, 2023
2a2cf73
Merge branch 'astra' of github.com:AstraProtocol/astra into astra
LampardNguyen234 Jan 3, 2023
6c68b8b
test: update integration test cases
LampardNguyen234 Jan 3, 2023
6ea7f3a
fix: totalBurnAmount incorrect
Jan 4, 2023
2ddc466
test: update integration tests for mint
LampardNguyen234 Jan 4, 2023
f10215e
test: update test_fee_payer
Jan 4, 2023
aeb3aab
test: update test_fee_payer (#159)
hoanguyenkh Jan 4, 2023
85246ba
test: update integration tests
LampardNguyen234 Jan 4, 2023
ef8ca4b
Merge remote-tracking branch 'origin/astra' into astra
Jan 4, 2023
2609375
Merge branch 'astra' of github.com:AstraProtocol/astra into astra
LampardNguyen234 Jan 4, 2023
d8cf3d0
Merge branch 'astra' of github.com:AstraProtocol/astra into astra
LampardNguyen234 Jan 4, 2023
e3a923a
test: update unittest for mint module
LampardNguyen234 Jan 5, 2023
6db8239
refactor: add handler errror (#160)
hoanguyenkh Jan 5, 2023
6f0b4b5
test(mint): disable integration tests
LampardNguyen234 Jan 5, 2023
fd347dd
Merge branch 'astra' of github.com:AstraProtocol/astra into astra
LampardNguyen234 Jan 5, 2023
03cece2
fix: integer overflow (#161)
hoanguyenkh Jan 5, 2023
4921651
refactor: add default DefaultMinGasPrice, DefaultMinGasMultiplier
Jan 5, 2023
092b845
refactor: remove upgrade handler
Jan 11, 2023
1b81258
refactor: remove default MinGasPrice
Jan 11, 2023
e338c18
add fork code update voting period (#163)
hoanguyenkh Jan 12, 2023
3879927
update UpgradeHeight
Jan 12, 2023
3adf727
update UpgradeHeight
Jan 12, 2023
56d9fa3
change update name
Jan 12, 2023
7f78292
test: check fee burn when test fail
Jan 16, 2023
a5647ef
chore: update changelog
Jan 31, 2023
3ac5161
chore: update Genesis Distribution
Jan 31, 2023
aab862a
deps: bump ginkgo to v2.7.1, gomega to v1.26.0
Jan 31, 2023
b3b3bee
chore: update CHANGELOG.md and refactor go.mod
Jan 31, 2023
40ae284
refactor: update logic check burn amount
Jan 31, 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
133 changes: 128 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,126 @@
<a name="v2.2.4"></a>
## [v2.2.4](https://github.com/AstraProtocol/astra/compare/v2.1.3...v2.2.4) (2023-01-31)

### Chore

* update init.sh
* update script gen
* update swagger
* remove code unused
* remove proto unused

### Docs

* add module feeburn

### Feat

* add get total_fee_burn in module fee
* add feeburn rest api
* add module feeburn
* add NewMinGasPriceDecorator

### Fix

* integer overflow ([#161](https://github.com/AstraProtocol/astra/issues/161))
* totalBurnAmount incorrect
* miss feeburn in ante handler

### Refactor
* remove default MinGasPrice
* remove upgrade handler
* add default DefaultMinGasPrice, DefaultMinGasMultiplier
* add handler errror ([#160](https://github.com/AstraProtocol/astra/issues/160))
* update proto
* reorder module
* update astra app

### Test

* update unittest for mint module
* update integration tests
* update test_fee_payer ([#159](https://github.com/AstraProtocol/astra/issues/159))
* update test_fee_payer
* update integration tests for mint
* update integration test cases
* upadte integration tests for mint
* update integration test
* add integration test evm tx
* update integration test feeburn
* add feeburn integration test
* fix unittest invalid denom


<a name="v2.1.3"></a>
## [v2.1.3](https://github.com/AstraProtocol/astra/compare/v2.1.2...v2.1.3) (2022-11-11)

### Chore

* update go release amd64 ([#136](https://github.com/AstraProtocol/astra/issues/136))


<a name="v2.1.2"></a>
## [v2.1.2](https://github.com/AstraProtocol/astra/compare/v2.1.1...v2.1.2) (2022-10-24)

### Deps

* upgrade evmos to v6.1.3-astra ([#129](https://github.com/AstraProtocol/astra/issues/129))
* upgrade evmos to cosmos-sdk v0.45.9 ([#128](https://github.com/AstraProtocol/astra/issues/128))


<a name="v2.1.1"></a>
## [v2.1.1](https://github.com/AstraProtocol/astra/compare/v2.1.0...v2.1.1) (2022-10-20)


<a name="v2.1.0"></a>
## [v2.1.0](https://github.com/AstraProtocol/astra/compare/v2.0.1...v2.1.0) (2022-09-19)


<a name="v2.0.1"></a>
## [v2.0.1](https://github.com/AstraProtocol/astra/compare/v2.0.0...v2.0.1) (2022-09-13)

### Fix

* double supply when add genesis vesting ([#108](https://github.com/AstraProtocol/astra/issues/108))


<a name="v2.0.0"></a>
## [v2.0.0](https://github.com/AstraProtocol/astra/compare/v1.2.2...v2.0.0) (2022-08-23)

### Chore

* update go version and remove package.json ([#100](https://github.com/AstraProtocol/astra/issues/100))

### Deps

* bump ethermint, go-ethereum version ([#98](https://github.com/AstraProtocol/astra/issues/98))

### Docs

* update inflation specs ([#96](https://github.com/AstraProtocol/astra/issues/96))


<a name="v1.2.2"></a>
## [v1.2.2](https://github.com/AstraProtocol/astra/compare/v1.2.1...v1.2.2) (2022-08-15)

### Deps

* Bump cosmos-sdk to v0.45.7, ibc-go to v3.2.0 ([#94](https://github.com/AstraProtocol/astra/issues/94))
* Bump Ethermint version to v0.18.0 ([#90](https://github.com/AstraProtocol/astra/issues/90))

### Docs

* update tokenomics numbers ([#88](https://github.com/AstraProtocol/astra/issues/88))

### Fix

* update docs ([#87](https://github.com/AstraProtocol/astra/issues/87))
* build tag rocksdb ([#84](https://github.com/AstraProtocol/astra/issues/84))

### Test

* update inflation unit-tests ([#92](https://github.com/AstraProtocol/astra/issues/92))


<a name="v1.2.1"></a>
## [v1.2.1](https://github.com/AstraProtocol/astra/compare/v1.2.0...v1.2.1) (2022-08-03)
Expand Down Expand Up @@ -79,7 +202,7 @@


<a name="v0.3.0"></a>
## [v0.3.0](https://github.com/AstraProtocol/astra/compare/v0.2.1...v0.3.0) (2022-06-10)
## [v0.3.0](https://github.com/AstraProtocol/astra/compare/v0.2.0...v0.3.0) (2022-06-10)

### Deps

Expand All @@ -90,12 +213,12 @@
* buf protoc was moved to buf alpha protoc ([#25](https://github.com/AstraProtocol/astra/issues/25))


<a name="v0.2.1"></a>
## [v0.2.1](https://github.com/AstraProtocol/astra/compare/v0.2.0...v0.2.1) (2022-05-18)
<a name="v0.2.0"></a>
## [v0.2.0](https://github.com/AstraProtocol/astra/compare/v0.2.1...v0.2.0) (2022-05-18)


<a name="v0.2.0"></a>
## [v0.2.0](https://github.com/AstraProtocol/astra/compare/v0.1.0...v0.2.0) (2022-05-18)
<a name="v0.2.1"></a>
## [v0.2.1](https://github.com/AstraProtocol/astra/compare/v0.1.0...v0.2.1) (2022-05-18)

### Refactor

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ proto-format:
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;

proto-lint:
@$(DOCKER_BUF) lint --error-format=json
@$(DOCKER_BUF) lint proto --error-format=json

proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
Expand Down Expand Up @@ -513,7 +513,7 @@ proto-update-deps:



.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
.PHONY: proto-all proto-gen proto-gen-any proto-format proto-lint proto-check-breaking proto-update-deps

###############################################################################
### Localnet ###
Expand Down
14 changes: 12 additions & 2 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ante

import (
feeBurnKeeper "github.com/AstraProtocol/astra/v2/x/feeburn/keeper"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
Expand All @@ -14,6 +15,8 @@ import (
ethante "github.com/evmos/ethermint/app/ante"
evmtypes "github.com/evmos/ethermint/x/evm/types"

feeburnante "github.com/AstraProtocol/astra/v2/x/feeburn/ante"
feeburntypes "github.com/AstraProtocol/astra/v2/x/feeburn/types"
vestingtypes "github.com/evmos/evmos/v6/x/vesting/types"
)

Expand All @@ -22,11 +25,13 @@ import (
type HandlerOptions struct {
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
BankKeeperFork feeburntypes.BankKeeper
IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper evmtypes.FeeMarketKeeper
StakingKeeper vestingtypes.StakingKeeper
EvmKeeper ethante.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
FeeBurnKeeper feeBurnKeeper.Keeper
SignModeHandler authsigning.SignModeHandler
SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
Cdc codec.BinaryCodec
Expand Down Expand Up @@ -59,8 +64,9 @@ func (options HandlerOptions) Validate() error {
// newCosmosAnteHandler creates the default ante handler for Ethereum transactions
func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first
ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices
ethante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first
ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices
ethante.NewEthMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), // Check eth effective gas price against the global MinGasPrice
ethante.NewEthValidateBasicDecorator(options.EvmKeeper),
ethante.NewEthSigVerificationDecorator(options.EvmKeeper),
ethante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper),
Expand All @@ -80,11 +86,13 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
ante.NewSetUpContextDecorator(),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
ethante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
feeburnante.NewFeeBurnDecorator(options.BankKeeperFork, options.FeeBurnKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper, options.Cdc),
NewValidatorCommissionDecorator(options.Cdc),
// SetPubKeyDecorator must be called before all signature verification decorators
Expand All @@ -105,10 +113,12 @@ func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
ante.NewSetUpContextDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewValidateBasicDecorator(),
ethante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
feeburnante.NewFeeBurnDecorator(options.BankKeeperFork, options.FeeBurnKeeper),
NewVestingDelegationDecorator(options.AccountKeeper, options.StakingKeeper, options.Cdc),
NewValidatorCommissionDecorator(options.Cdc),
// SetPubKeyDecorator must be called before all signature verification decorators
Expand Down
Loading