Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Weichert committed Mar 6, 2024
2 parents 770a3aa + 0c10b16 commit 8b820d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ TzGo contains a full set of features to read, monitor, decode, translate, analyz
- a **Contract library** `tzgo/contract` for smart contract calls and tokens
- a **Signer library** `tzgo/signer` to sign transactions local or remote
- helpers like an efficient base58 en/decoder, hash maps, etc
- a **Code generator** [TzGen](tree/master/cmd/tzgen) to produce pure Go clients for smart contract interfaces
- an **Automation Tool** [TzCompose](tree/master/cmd/tzcompose) to setup test cases and deploy complex contract ecosystems
- a **Code generator** [TzGen](https://github.com/blockwatch-cc/tzgo/tree/master/cmd/tzgen) to produce pure Go clients for smart contract interfaces
- an **Automation Tool** [TzCompose](https://github.com/blockwatch-cc/tzgo/tree/master/cmd/tzcompose) to setup test cases and deploy complex contract ecosystems

### TzGo Compatibility

Expand Down
14 changes: 7 additions & 7 deletions micheline/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ type Parameters struct {
Value Prim `json:"value"`
}

func (p Parameters) MarshalJSON() ([]byte, error) {
if p.Entrypoint == "" || (p.Entrypoint == DEFAULT && p.Value.OpCode == D_UNIT) {
return json.Marshal(p.Value)
}
type alias Parameters
return json.Marshal(alias(p))
}
// func (p Parameters) MarshalJSON() ([]byte, error) {
// if p.Entrypoint == "" || (p.Entrypoint == DEFAULT && p.Value.OpCode == D_UNIT) {
// return json.Marshal(p.Value)
// }
// type alias Parameters
// return json.Marshal(alias(p))
// }

func (p Parameters) MapEntrypoint(typ Type) (Entrypoint, Prim, error) {
var ep Entrypoint
Expand Down
3 changes: 3 additions & 0 deletions rpc/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ func (m *BlockMetadata) GetLevel() int64 {
if m.LevelInfo != nil {
return m.LevelInfo.Level
}
if m.Level == nil {
return 0
}
return m.Level.Level
}

Expand Down
4 changes: 2 additions & 2 deletions rpc/votes.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ type BallotSummary struct {

// Proposal holds information about a vote listing
type Proposal struct {
Proposal tezos.ProtocolHash
Upvotes int64
Proposal tezos.ProtocolHash `json:"proposal"`
Upvotes int64 `json:"upvotes,string"`
}

func (p *Proposal) UnmarshalJSON(data []byte) error {
Expand Down

0 comments on commit 8b820d5

Please sign in to comment.