Skip to content

Commit

Permalink
update transactions to get go tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Jan 31, 2024
1 parent 2e80d9b commit b0e443d
Show file tree
Hide file tree
Showing 34 changed files with 335 additions and 243 deletions.
156 changes: 78 additions & 78 deletions lib/go/templates/internal/assets/assets.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions lib/go/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var (
placeholderMetadataViews = "\"MetadataViews\""
placeholderFTMetadataViews = "\"FungibleTokenMetadataViews\""
placeholderViewResolver = "\"ViewResolver\""
placeholderBurner = "\"Burner\""
)

type Environment struct {
Expand All @@ -34,6 +35,7 @@ type Environment struct {
MetadataViewsAddress string
FungibleTokenMetadataViewsAddress string
ViewResolverAddress string
BurnerAddress string
SwitchboardAddress string
}

Expand Down Expand Up @@ -93,6 +95,12 @@ func ReplaceAddresses(code string, env Environment) string {
withHexPrefix(env.ViewResolverAddress),
)

code = strings.ReplaceAll(
code,
placeholderBurner,
withHexPrefix(env.BurnerAddress),
)

code = strings.ReplaceAll(
code,
placeholderSwitchboard,
Expand Down
55 changes: 25 additions & 30 deletions lib/go/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,38 @@ module github.com/onflow/flow-ft/lib/go/test
go 1.18

require (
github.com/onflow/cadence v1.0.0-preview.2.0.20240120000236-f3397a0efdad
github.com/onflow/flow-emulator v0.59.1-0.20240122200325-58ef35ed4aed
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20231212194336-a2802ba36596
github.com/onflow/flow-ft/lib/go/templates v0.0.0-00010101000000-000000000000
github.com/onflow/flow-go-sdk v0.44.1-0.20240124213231-78d9f08eeae1
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240120002146-9f1763b66d80
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
github.com/onflow/cadence v1.0.0-M4
github.com/onflow/flow-emulator v1.0.0-M1
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01
github.com/onflow/flow-ft/lib/go/templates v0.7.1-0.20240125205519-2e80d9b4bd01
github.com/onflow/flow-go-sdk v1.0.0-M1
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad
github.com/rs/zerolog v1.29.0
github.com/stretchr/testify v1.8.4
)

require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/onflow/crypto v0.25.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/tools v0.16.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/SaveTheRbtz/mph v0.1.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand All @@ -54,6 +44,7 @@ require (
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/ethereum/go-ethereum v1.13.5 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect
Expand Down Expand Up @@ -110,6 +101,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
Expand All @@ -121,10 +113,10 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240120002724-ff3d1a4bab55 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240120002724-ff3d1a4bab55 // indirect
github.com/onflow/flow-go v0.33.2-0.20240122190738-254af677b873 // indirect
github.com/onflow/flow-go/crypto v0.25.0 // indirect
github.com/onflow/crypto v0.25.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-go v0.33.2-0.20240126002816-f0770a716d61 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
Expand All @@ -146,14 +138,15 @@ require (
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/slok/go-http-metrics v0.10.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -164,7 +157,6 @@ require (
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect
Expand All @@ -178,10 +170,12 @@ require (
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gonum.org/v1/gonum v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand All @@ -197,9 +191,10 @@ require (
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/sqlite v1.21.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/onflow/flow-nft/lib/go/contracts => ../../../../flow/flow-nft/lib/go/contracts
// replace github.com/onflow/flow-nft/lib/go/contracts => ../../../../flow/flow-nft/lib/go/contracts

replace github.com/onflow/flow-ft/lib/go/contracts => ../contracts

Expand Down
Loading

0 comments on commit b0e443d

Please sign in to comment.