Skip to content

Commit

Permalink
fix some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Aug 15, 2024
1 parent b83da18 commit 4e2b31f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions precompiles/avs/avs.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,45 +96,45 @@ func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readOnly bool) (bz [
bz, err = p.DeregisterAVS(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodUpdateAVS:
bz, err = p.UpdateAVS(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodRegisterOperatorToAVS:
bz, err = p.BindOperatorToAVS(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodDeregisterOperatorFromAVS:
bz, err = p.UnbindOperatorToAVS(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodCreateAVSTask:
bz, err = p.CreateAVSTask(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodRegisterBLSPublicKey:
bz, err = p.RegisterBLSPublicKey(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodGetOptinOperators:
bz, err = p.GetOptedInOperatorAccAddrs(ctx, contract, method, args)
case MethodSubmitProof:
bz, err = p.SubmitProof(ctx, evm.Origin, contract, stateDB, method, args)
if err != nil {
ctx.Logger().Error("internal error when calling avs precompile", "module", "avs precompile", "method", method.Name, "err", err)
bz, err = method.Outputs.Pack(false, new(big.Int))
bz, err = method.Outputs.Pack(false)
}
case MethodGetRegisteredPubkey:
bz, err = p.GetRegisteredPubkey(ctx, contract, method, args)
Expand Down

0 comments on commit 4e2b31f

Please sign in to comment.