Skip to content

Commit

Permalink
Update to match changes in master
Browse files Browse the repository at this point in the history
  • Loading branch information
SupunS committed Jan 22, 2024
1 parent d3a7e3b commit 6806845
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 123 deletions.
7 changes: 6 additions & 1 deletion cmd/util/ledger/migrations/change_contract_code_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ func SystemContractChanges(chainID flow.ChainID) []SystemContractChange {
systemContracts.FlowToken,
coreContracts.FlowToken(
systemContracts.FungibleToken.Address.HexWithPrefix(),
fungibleTokenMetadataViewsAddress.HexWithPrefix(),
systemContracts.MetadataViews.Address.HexWithPrefix(),
systemContracts.ViewResolver.Address.HexWithPrefix(),
),
Expand All @@ -296,6 +297,7 @@ func SystemContractChanges(chainID flow.ChainID) []SystemContractChange {
NewContractCode: string(ftContracts.FungibleTokenMetadataViews(
systemContracts.FungibleToken.Address.HexWithPrefix(),
systemContracts.MetadataViews.Address.HexWithPrefix(),
systemContracts.ViewResolver.Address.HexWithPrefix(),
)),
},
{
Expand All @@ -309,13 +311,16 @@ func SystemContractChanges(chainID flow.ChainID) []SystemContractChange {
// NFT related contracts
NewSystemContractChange(
systemContracts.NonFungibleToken,
nftContracts.NonFungibleToken(),
nftContracts.NonFungibleToken(
sdk.Address(systemContracts.ViewResolver.Address),
),
),
NewSystemContractChange(
systemContracts.MetadataViews,
nftContracts.MetadataViews(
sdk.Address(systemContracts.FungibleToken.Address),
sdk.Address(systemContracts.NonFungibleToken.Address),
sdk.Address(systemContracts.ViewResolver.Address),
),
),
NewSystemContractChange(
Expand Down
2 changes: 1 addition & 1 deletion engine/execution/computation/computer/computer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ func Test_ExecutingSystemCollection(t *testing.T) {
noopCollector := metrics.NewNoopCollector()

expectedNumberOfEvents := 3
expectedEventSize := 1484
expectedEventSize := 1497

// bootstrapping does not cache programs
expectedCachedPrograms := 0
Expand Down
2 changes: 1 addition & 1 deletion engine/execution/state/bootstrap/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestBootstrapLedger(t *testing.T) {
}

func TestBootstrapLedger_ZeroTokenSupply(t *testing.T) {
expectedStateCommitmentBytes, _ := hex.DecodeString("e1f393d24398b4e4de149073f126a93f309f34a50e80d7421e27afd9a387972f")
expectedStateCommitmentBytes, _ := hex.DecodeString("63e2f2cfd7d22aeebafe460e4b08aa6debcae8add3b285a4d4f06955554fc8c2")
expectedStateCommitment, err := flow.ToStateCommitment(expectedStateCommitmentBytes)
require.NoError(t, err)

Expand Down
6 changes: 3 additions & 3 deletions fvm/evm/stdlib/contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,7 @@ func TestEVMEncodeABIWithSignature(t *testing.T) {
}
encodedABI := cadence.NewArray(
cdcBytes,
).WithType(cadence.NewVariableSizedArrayType(cadence.TheUInt8Type))
).WithType(cadence.NewVariableSizedArrayType(cadence.UInt8Type))

assert.Equal(t,
encodedABI,
Expand Down Expand Up @@ -2394,7 +2394,7 @@ func TestEVMDecodeABIWithSignature(t *testing.T) {
}
encodedABI := cadence.NewArray(
cdcBytes,
).WithType(cadence.NewVariableSizedArrayType(cadence.TheUInt8Type))
).WithType(cadence.NewVariableSizedArrayType(cadence.UInt8Type))

result, err := rt.ExecuteScript(
runtime.Script{
Expand Down Expand Up @@ -2509,7 +2509,7 @@ func TestEVMDecodeABIWithSignatureMismatch(t *testing.T) {
}
encodedABI := cadence.NewArray(
cdcBytes,
).WithType(cadence.NewVariableSizedArrayType(cadence.TheUInt8Type))
).WithType(cadence.NewVariableSizedArrayType(cadence.UInt8Type))

_, err := rt.ExecuteScript(
runtime.Script{
Expand Down
4 changes: 2 additions & 2 deletions fvm/fvm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ func TestEVM(t *testing.T) {
script := fvm.Script([]byte(fmt.Sprintf(`
import EVM from %s
pub fun main() {
access(all) fun main() {
let bal = EVM.Balance(flow: 1.0);
let acc <- EVM.createBridgedAccount();
// withdraw insufficient balance
Expand Down Expand Up @@ -2917,7 +2917,7 @@ func TestEVM(t *testing.T) {
script := fvm.Script([]byte(fmt.Sprintf(`
import EVM from %s
pub fun main() {
access(all) fun main() {
destroy <- EVM.createBridgedAccount();
}
`, chain.ServiceAddress().HexWithPrefix())))
Expand Down
44 changes: 23 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ require (
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.5.9
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/google/uuid v1.3.1
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.2
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
github.com/hashicorp/go-multierror v1.1.1
Expand All @@ -51,25 +51,25 @@ require (
github.com/multiformats/go-multiaddr-dns v0.3.1
github.com/multiformats/go-multihash v0.2.3
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f
github.com/onflow/cadence v1.0.0-preview.2.0.20240120000236-f3397a0efdad
github.com/onflow/cadence v1.0.0-preview.2.0.20240122125204-5ce1f36f95bb
github.com/onflow/flow v0.3.4
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240120002724-ff3d1a4bab55
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240120002724-ff3d1a4bab55
github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2.0.20240120000948-4c9b2354a373
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240122220432-a5993d06ce1b
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240122220432-a5993d06ce1b
github.com/onflow/flow-go-sdk v0.44.0-stable-cadence.2.0.20240122164005-147ad40664ca
github.com/onflow/flow-go/crypto v0.25.0
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2
github.com/onflow/go-bitswap v0.0.0-20230703214630-6d3db958c73d
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/pierrec/lz4 v2.6.1+incompatible
github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.7.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.16.0
github.com/rs/cors v1.8.0
github.com/rs/zerolog v1.29.0
github.com/schollz/progressbar/v3 v3.13.1
github.com/sethvargo/go-retry v0.2.3
github.com/shirou/gopsutil/v3 v3.22.2
github.com/spf13/cobra v1.6.1
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.4
Expand All @@ -89,8 +89,8 @@ require (
golang.org/x/time v0.3.0
golang.org/x/tools v0.16.0
google.golang.org/api v0.126.0
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98
google.golang.org/grpc v1.58.3
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.59.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
google.golang.org/protobuf v1.31.0
gotest.tools v2.2.0+incompatible
Expand All @@ -106,21 +106,22 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.2
github.com/mitchellh/mapstructure v1.5.0
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20231212194336-a2802ba36596
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240120002146-9f1763b66d80
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240122215824-10d8a31d1991
github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d
github.com/slok/go-http-metrics v0.10.0
github.com/sony/gobreaker v0.5.0
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc
gopkg.in/yaml.v2 v2.4.0
)

require (
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.21.0 // indirect
cloud.google.com/go v0.110.7 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/OneOfOne/xxhash v1.2.8 // 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
Expand Down Expand Up @@ -159,7 +160,7 @@ require (
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
Expand All @@ -185,7 +186,7 @@ require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/s2a-go v0.1.4 // indirect
Expand All @@ -196,7 +197,7 @@ require (
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/boxo v0.10.0 // indirect
github.com/ipfs/go-bitswap v0.9.0 // indirect
Expand Down Expand Up @@ -256,6 +257,7 @@ require (
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multistream v0.4.1 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
Expand All @@ -267,7 +269,7 @@ require (
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/psiemens/sconfig v0.1.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
Expand Down Expand Up @@ -305,12 +307,12 @@ require (
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/term v0.15.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
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
Expand Down
Loading

0 comments on commit 6806845

Please sign in to comment.