diff --git a/services/smelter_rpc.go b/services/smelter_rpc.go index 593487d..e553bb2 100644 --- a/services/smelter_rpc.go +++ b/services/smelter_rpc.go @@ -5,6 +5,7 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/common" + "github.com/rahul0tripathi/smelter/entity" ) type SmelterRpc struct { @@ -48,3 +49,13 @@ func (s *SmelterRpc) GetState(ctx context.Context) (json.RawMessage, error) { return v, nil } + +func (s *SmelterRpc) SetStateOverrides(ctx context.Context, overrides entity.StateOverrides) error { + execCtx, err := s.execStorage.GetOrCreate(ctx) + if err != nil { + return err + } + + execCtx.Overrides = overrides + return nil +}