Skip to content

Commit 8be4cb2

Browse files
committed
feat: canoto tags for gas.State
1 parent 93a22bd commit 8be4cb2

File tree

2 files changed

+208
-2
lines changed

2 files changed

+208
-2
lines changed

vms/components/gas/state.canoto.go

Lines changed: 204 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vms/components/gas/state.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import (
1313

1414
var ErrInsufficientCapacity = errors.New("insufficient capacity")
1515

16+
//go:generate go run github.com/StephenButtolph/canoto/canoto $GOFILE
17+
1618
type State struct {
17-
Capacity Gas `serialize:"true" json:"capacity"`
18-
Excess Gas `serialize:"true" json:"excess"`
19+
Capacity Gas `serialize:"true" json:"capacity" canoto:"fint64,1"`
20+
Excess Gas `serialize:"true" json:"excess" canoto:"fint64,2"`
1921
}
2022

2123
// AdvanceTime adds maxPerSecond to capacity and subtracts targetPerSecond

0 commit comments

Comments
 (0)