Merge pull request #5570 from filecoin-project/feat/read-state-code
add code cid to stateReadState output
This commit is contained in:
commit
39540b8a0a
@ -650,6 +650,7 @@ type Message struct {
|
|||||||
|
|
||||||
type ActorState struct {
|
type ActorState struct {
|
||||||
Balance types.BigInt
|
Balance types.BigInt
|
||||||
|
Code cid.Cid
|
||||||
State interface{}
|
State interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4405,6 +4405,9 @@ Response:
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Balance": "0",
|
"Balance": "0",
|
||||||
|
"Code": {
|
||||||
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
|
},
|
||||||
"State": {}
|
"State": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -473,6 +473,7 @@ func (a *StateAPI) StateReadState(ctx context.Context, actor address.Address, ts
|
|||||||
|
|
||||||
return &api.ActorState{
|
return &api.ActorState{
|
||||||
Balance: act.Balance,
|
Balance: act.Balance,
|
||||||
|
Code: act.Code,
|
||||||
State: oif,
|
State: oif,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user