Skip to content

Commit 2d09e83

Browse files
authored
Merge pull request #842 from jshufro/jms/statefields
Builds the state cli tool, updates json state to have correctly cased field names
2 parents f5f1160 + 0b2cab6 commit 2d09e83

3 files changed

Lines changed: 31 additions & 10 deletions

File tree

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ LOCAL_PLATFORM=${LOCAL_OS}/${LOCAL_ARCH}
88

99
BUILD_DIR=build
1010
BIN_DIR=${BUILD_DIR}/${VERSION}/bin
11+
TOOLS_DIR=${BUILD_DIR}/${VERSION}/tools
1112

1213
CLI_TARGET_OOS:=linux darwin
1314
ARCHS:=arm64 amd64
@@ -93,6 +94,8 @@ ${BUILD_DIR}:
9394
mkdir -p ${BUILD_DIR}
9495
${BIN_DIR}:
9596
mkdir -p ${BIN_DIR}
97+
${TOOLS_DIR}:
98+
mkdir -p ${TOOLS_DIR}
9699

97100
$(foreach oos,$(CLI_TARGET_OOS),$(foreach arch,$(ARCHS),$(eval $(call rocketpool-cli-template,$(oos),$(arch)))))
98101

@@ -114,6 +117,24 @@ else
114117
${local_build_cmd_arm64} -o $@ ./treegen/.
115118
endif
116119

120+
# amd64 state-cli build
121+
.PHONY: ${TOOLS_DIR}/state-cli-linux-amd64
122+
${TOOLS_DIR}/state-cli-linux-amd64: ${bin_deps}
123+
ifndef NO_DOCKER
124+
${docker_build_cmd_amd64} -o $@ ./shared/services/state/cli/.
125+
else
126+
${local_build_cmd_amd64} -o $@ ./shared/services/state/cli/.
127+
endif
128+
129+
# arm64 state-cli build
130+
.PHONY: ${TOOLS_DIR}/state-cli-linux-arm64
131+
${TOOLS_DIR}/state-cli-linux-arm64: ${bin_deps}
132+
ifndef NO_DOCKER
133+
${docker_build_cmd_arm64} -o $@ ./shared/services/state/cli/.
134+
else
135+
${local_build_cmd_arm64} -o $@ ./shared/services/state/cli/.
136+
endif
137+
117138
# Multiarch builder
118139
${BUILD_DIR}/docker-buildx-builder: ${BUILD_DIR}
119140
docker buildx create --name smartnode-builder --driver docker-container --platform linux/amd64,linux/arm64 || true

bindings/utils/state/minipool.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ type NativeMinipoolDetails struct {
6363
UserShareOfBeaconBalance *big.Int `json:"user_share_of_beacon_balance"`
6464

6565
// Atlas
66-
UserDistributed bool
67-
Slashed bool
68-
IsVacant bool
69-
LastBondReductionTime *big.Int
70-
LastBondReductionPrevValue *big.Int
71-
LastBondReductionPrevNodeFee *big.Int
72-
ReduceBondTime *big.Int
73-
ReduceBondCancelled bool
74-
ReduceBondValue *big.Int
75-
PreMigrationBalance *big.Int
66+
UserDistributed bool `json:"user_distributed"`
67+
Slashed bool `json:"slashed"`
68+
IsVacant bool `json:"is_vacant"`
69+
LastBondReductionTime *big.Int `json:"last_bond_reduction_time"`
70+
LastBondReductionPrevValue *big.Int `json:"last_bond_reduction_prev_value"`
71+
LastBondReductionPrevNodeFee *big.Int `json:"last_bond_reduction_prev_node_fee"`
72+
ReduceBondTime *big.Int `json:"reduce_bond_time"`
73+
ReduceBondCancelled bool `json:"reduce_bond_cancelled"`
74+
ReduceBondValue *big.Int `json:"reduce_bond_value"`
75+
PreMigrationBalance *big.Int `json:"pre_migration_balance"`
7676
}
7777

7878
var sixteenEth = big.NewInt(0).Mul(big.NewInt(16), oneEth)
Binary file not shown.

0 commit comments

Comments
 (0)