Skip to content

Commit

Permalink
Mark unused methods as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
nozim committed Sep 26, 2023
1 parent 7b84bf2 commit f00d5bb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions templates/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package templates

import (
"encoding/hex"
"fmt"
"strings"

Expand All @@ -43,6 +44,18 @@ type Contract struct {
Source string
}

// Deprecated
// SourceBytes returns the UTF-8 encoded source code (Source) of the contract.
func (c Contract) SourceBytes() []byte {
return []byte(c.Source)
}

// Deprecated
// SourceHex returns the UTF-8 encoded source code (Source) of the contract as a hex string.
func (c Contract) SourceHex() string {
return hex.EncodeToString(c.SourceBytes())
}

func exportType(t sema.Type) cadence.Type {
return runtime.ExportType(t, map[sema.TypeID]cadence.Type{})
}
Expand Down

0 comments on commit f00d5bb

Please sign in to comment.