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: tax2gas #500

Merged
merged 77 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
419ce91
Add tax2gas module and move all handle fees logic to tax2gas module
phamminh0811 Jun 24, 2024
7500c39
lint
phamminh0811 Jun 24, 2024
1599911
proto lint
phamminh0811 Jun 24, 2024
8fe545d
revert change in protocgen
phamminh0811 Jun 24, 2024
c40fa96
add tax2gas module and implementation
expertdicer Jul 8, 2024
22a7186
remove redundant files
expertdicer Jul 8, 2024
ef4264f
remove wasm file
expertdicer Jul 8, 2024
226de57
remove wasm file
expertdicer Jul 8, 2024
a2ae5c9
change proto
expertdicer Jul 8, 2024
4cd85c9
v8_1 upgrade handler
expertdicer Jul 8, 2024
cce285f
rename var and add comment
expertdicer Jul 9, 2024
af547c2
remove redundant check
expertdicer Jul 9, 2024
1203f0f
add comment and rename var
expertdicer Jul 9, 2024
b272150
correctly set ctx.Value
expertdicer Jul 9, 2024
c131733
remove tax2gas subspace and add authority
expertdicer Jul 11, 2024
bb99053
register msg service
expertdicer Jul 11, 2024
92ef82c
add msg update params
expertdicer Jul 11, 2024
c016cc6
register codec and unit tests
expertdicer Jul 11, 2024
e6d8242
proto update
expertdicer Jul 11, 2024
023cdfe
refactor tax2gas querier
expertdicer Jul 11, 2024
2fc2c60
refactor structure
expertdicer Jul 15, 2024
2d94166
adding unit tests
expertdicer Jul 16, 2024
a16d4df
deduct from tx origin
expertdicer Jul 16, 2024
ed0ad82
Allow to paid by multiple fees denom
phamminh0811 Jul 16, 2024
d57e4ce
consume tax gas in wasm plugin
expertdicer Jul 16, 2024
3c9b03a
Compute feeRequired base on gasPrice and gasRemaining
phamminh0811 Jul 16, 2024
0b55dd8
Handle fee grant in post handle
phamminh0811 Jul 17, 2024
ee60e0c
Handle fee grant in post handle
phamminh0811 Jul 17, 2024
9131a18
Add test scenario to tax2gas
phamminh0811 Jul 17, 2024
f615e83
Merge branch 'minh/tax2gas' of github-expertdicer:classic-terra/core …
expertdicer Jul 17, 2024
d83b8b3
add simulate condition
expertdicer Jul 17, 2024
052f7fb
update tests and checkTxFee
expertdicer Jul 17, 2024
e2b6dc1
lint
phamminh0811 Jul 17, 2024
2f779bf
lint
phamminh0811 Jul 17, 2024
8ecad7e
fix interchain test
phamminh0811 Jul 17, 2024
b7aa915
update tests and minor fix
expertdicer Jul 17, 2024
d66c1f4
Merge branch 'minh/tax2gas' of github-expertdicer:classic-terra/core …
expertdicer Jul 17, 2024
3e816ea
Move burn tax process to post handler
phamminh0811 Jul 18, 2024
af2336c
add bypass msg types and max gas, unit tests
expertdicer Jul 18, 2024
3f22cf0
Merge branch 'minh/tax2gas' of github-expertdicer:classic-terra/core …
expertdicer Jul 18, 2024
75bd097
update tests
expertdicer Jul 18, 2024
693a641
Merge branch 'main' into minh/tax2gas
expertdicer Jul 22, 2024
fb0344f
update post handler
expertdicer Jul 22, 2024
3deac13
Use taxGasMeter in sdk to handle tax2Gas logic (#499)
phamminh0811 Jul 23, 2024
56ea70b
fix e2e test
phamminh0811 Jul 23, 2024
1327e9d
fix test
expertdicer Jul 24, 2024
644d5f4
Merge branch 'minh/tax2gas' of github-expertdicer:classic-terra/core …
expertdicer Jul 24, 2024
29ac9ad
Add e2e tests to cover test scenario in tax2gas
phamminh0811 Jul 25, 2024
c98c617
lint
phamminh0811 Jul 25, 2024
4523ec5
fix ante test
phamminh0811 Jul 26, 2024
87437f1
lint
phamminh0811 Jul 26, 2024
9be68ba
fix e2e-test
phamminh0811 Jul 26, 2024
dd5eda3
fix tax2gas keeper test
phamminh0811 Jul 26, 2024
c21b748
fix msg server test
phamminh0811 Jul 26, 2024
d3f4005
fix sim test
expertdicer Jul 26, 2024
c1d0a11
lint
expertdicer Jul 26, 2024
da4d9d5
Add test for fee tax non value token denom
phamminh0811 Jul 27, 2024
240caaa
lint
phamminh0811 Jul 27, 2024
997910f
Change taxGas to sdkmath.Int
phamminh0811 Jul 27, 2024
1cb33dd
Fix tax exemption test
phamminh0811 Jul 29, 2024
b4e3896
Make gas auto work
phamminh0811 Jul 29, 2024
a2d402b
Move taxRate to tax2gas module params
phamminh0811 Jul 30, 2024
a1a12ac
Add upgrade handler
phamminh0811 Jul 30, 2024
56f61a5
fix exemption test
phamminh0811 Jul 30, 2024
c34c82d
combine all computeTax to one
phamminh0811 Jul 30, 2024
eb0097d
rename v8_2 to v9
phamminh0811 Jul 30, 2024
e355e02
lint
phamminh0811 Jul 30, 2024
d4eb832
Use more precise way to estimate gas and change e2e test for using ga…
phamminh0811 Jul 30, 2024
b4b813f
Deduct all fees and handle tx priority
phamminh0811 Aug 1, 2024
5abf3a9
lint
phamminh0811 Aug 1, 2024
7dcbf74
merge main
phamminh0811 Aug 1, 2024
bac6f8b
doc
phamminh0811 Aug 1, 2024
3c86903
fix wasmbinding test
phamminh0811 Aug 1, 2024
5f4d877
consume taxgas only on simulate
phamminh0811 Aug 1, 2024
b3d175d
revert logic to deduct correct amount needed for gas and tax
phamminh0811 Aug 1, 2024
eed10ea
lint
phamminh0811 Aug 1, 2024
e584267
final version of Tax2Gas
phamminh0811 Aug 2, 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
4 changes: 3 additions & 1 deletion x/tax2gas/post/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func (tgd Tax2gasPostDecorator) PostHandle(ctx sdk.Context, tx sdk.Tx, simulate
taxGasUint64 := taxGas.Uint64()
// Check if gas not overflow
if totalGasConsumed+taxGasUint64 >= totalGasConsumed && totalGasConsumed+taxGasUint64 >= taxGasUint64 {
ctx.GasMeter().ConsumeGas(taxGasUint64, "consume tax gas")
if simulate {
ctx.GasMeter().ConsumeGas(taxGasUint64, "consume tax gas")
phamminh0811 marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

Expand Down
Loading