Skip to content

Commit

Permalink
feat: Updating protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrix10 authored and mehcode committed Mar 4, 2021
1 parent 23b20a0 commit c89a661
Show file tree
Hide file tree
Showing 170 changed files with 1,858 additions and 1,501 deletions.
11 changes: 9 additions & 2 deletions contract_update_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,19 @@ func (transaction *ContractUpdateTransaction) GetExpirationTime() time.Time {
// SetContractMemo sets the memo associated with the contract (max 100 bytes)
func (transaction *ContractUpdateTransaction) SetContractMemo(memo string) *ContractUpdateTransaction {
transaction.requireNotFrozen()
transaction.pb.Memo = memo
transaction.pb.GetMemoWrapper().Value = memo
return transaction
}

func (transaction *ContractUpdateTransaction) GetContractMemo() string {
return transaction.pb.GetMemo()
switch transaction.pb.GetMemoField().(type) {
case *proto.ContractUpdateTransactionBody_Memo:
return transaction.pb.GetMemo()
case *proto.ContractUpdateTransactionBody_MemoWrapper:
return transaction.pb.GetMemoWrapper().Value
default:
return ""
}
}

//
Expand Down
338 changes: 338 additions & 0 deletions proto/AccountBalanceFile.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c89a661

Please sign in to comment.