Skip to content

Commit

Permalink
feat(*): upstream public story repo (#7)
Browse files Browse the repository at this point in the history
* chore(*): update execution hash for story (#441)

Update execution hash corresponding to this change
(piplabs/story-geth#84)

issue: none

* feat(contract): charge fees on unsetting operator (#439)

Charge fees on `unsetOperator` and made changes for CLI to be compatible
with this change.

issue: #438

* chore(*): update story config (#444)

Update story default config

issue: none

* feat(api): add spendable balance api (#442)

add spendable balance API

issue: none

* feat(genesis): mainnet values in gen alloc and testing (#443)

- Unifies Timelock initialization across chains
- Refactor admin (if `KEEP_TIMELOCK_ADMIN_ROLE = true`)
- Refactor chain ids into utils library
- Sets min delay values in mainnet
- Test upgrade of last Predeploy proxy and scheduling over min delay

issue: none

* chore(staking): api and error codes (#445)

remove useless api and enhance event processing error codes

issue: none

---------

Signed-off-by: lutty <[email protected]>
Co-authored-by: haodi <[email protected]>
Co-authored-by: lutty <[email protected]>

---------

Signed-off-by: lutty <[email protected]>
Co-authored-by: Ze <[email protected]>
Co-authored-by: Rayden Ge <[email protected]>
Co-authored-by: Ramarti <[email protected]>
Co-authored-by: haodi <[email protected]>
Co-authored-by: lutty <[email protected]>
  • Loading branch information
6 people authored Dec 19, 2024
1 parent 12dd865 commit d10a025
Show file tree
Hide file tree
Showing 33 changed files with 3,561 additions and 2,601 deletions.
2,236 changes: 1,120 additions & 1,116 deletions client/cmd/abi/IPTokenStaking.abi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/cmd/cometconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func DefaultCometConfig(homeDir string) cfg.Config {
conf.StateSync.ChunkRequestTimeout = time.Minute // Increase timeout
conf.Mempool.Type = cfg.MempoolTypeNop // Disable cometBFT mempool
conf.Mempool.Broadcast = false // Disable mempool broadcast
conf.Consensus.TimeoutCommit = 2000 * time.Millisecond // Increase block time
conf.Consensus.TimeoutCommit = 1500 * time.Millisecond // Increase block time

return *conf
}
Expand Down
5 changes: 1 addition & 4 deletions client/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func bindSetOperatorFlags(cmd *cobra.Command, cfg *operatorConfig) {

func bindUnsetOperatorFlags(cmd *cobra.Command, cfg *operatorConfig) {
bindValidatorBaseFlags(cmd, &cfg.baseConfig)
cmd.Flags().StringVar(&cfg.Operator, "operator", "", "Unsets an operator from your delegator")
}

func bindSetWithdrawalAddressFlags(cmd *cobra.Command, cfg *withdrawalConfig) {
Expand Down Expand Up @@ -184,9 +183,7 @@ func validateValidatorCreateFlags(ctx context.Context, cmd *cobra.Command, cfg *
}

func validateOperatorFlags(cmd *cobra.Command) error {
return validateFlags(cmd, []string{
"operator",
})
return validateFlags(cmd, []string{})
}

func validateWithdrawalFlags(cmd *cobra.Command) error {
Expand Down
4 changes: 1 addition & 3 deletions client/cmd/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,6 @@ func unsetOperator(ctx context.Context, cfg operatorConfig) error {
return err
}

operatorAddress := common.HexToAddress(cfg.Operator)

result, err := prepareAndReadContract(ctx, &cfg.baseConfig, "fee")
if err != nil {
return err
Expand All @@ -551,7 +549,7 @@ func unsetOperator(ctx context.Context, cfg operatorConfig) error {
return errors.Wrap(err, "failed to unpack unsetOperatorFee")
}

_, err = prepareAndExecuteTransaction(ctx, &cfg.baseConfig, "unsetOperator", unsetOperatorFee, uncompressedPubKey, operatorAddress)
_, err = prepareAndExecuteTransaction(ctx, &cfg.baseConfig, "unsetOperator", unsetOperatorFee, uncompressedPubKey)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit d10a025

Please sign in to comment.