Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Cadence v1.2.1 and flow-go PR 6571 #765

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions emulator/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func TestCreateAccount(t *testing.T) {
nil,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -231,7 +231,7 @@ func TestCreateAccount(t *testing.T) {
nil,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -272,7 +272,7 @@ func TestCreateAccount(t *testing.T) {
nil,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -321,7 +321,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -393,7 +393,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -444,7 +444,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -495,7 +495,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -547,7 +547,7 @@ func TestCreateAccount(t *testing.T) {
nil,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -583,7 +583,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -619,7 +619,7 @@ func TestCreateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

tx.SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
SetProposalKey(b.ServiceKey().Address, b.ServiceKey().Index, b.ServiceKey().SequenceNumber).
Expand Down Expand Up @@ -1037,7 +1037,7 @@ func TestImportAccountCode(t *testing.T) {
}

address, err := adapter.CreateAccount(context.Background(), nil, accountContracts)
assert.NoError(t, err)
require.NoError(t, err)

script := []byte(fmt.Sprintf(`
// address imports can omit leading zeros
Expand Down Expand Up @@ -1107,7 +1107,7 @@ func TestAccountAccess(t *testing.T) {
[]*flowsdk.AccountKey{accountKey1},
accountContracts,
)
assert.NoError(t, err)
require.NoError(t, err)

// Deploy another contract B to the same account
// which accesses the field in contract A
Expand Down Expand Up @@ -1163,7 +1163,7 @@ func TestAccountAccess(t *testing.T) {
[]*flowsdk.AccountKey{accountKey2},
nil,
)
assert.NoError(t, err)
require.NoError(t, err)

// Deploy a contract C to the second account
// which accesses the field in contract A of the first account
Expand Down
2 changes: 1 addition & 1 deletion emulator/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestEventEmitted(t *testing.T) {
[]*flowsdk.AccountKey{publicKey},
accountContracts,
)
assert.NoError(t, err)
require.NoError(t, err)

script := []byte(fmt.Sprintf(`
import 0x%s
Expand Down
16 changes: 8 additions & 8 deletions emulator/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func TestSubmitTransaction_Invalid(t *testing.T) {
accountKeyB.Weight = flowsdk.AccountKeyWeightThreshold

accountAddressB, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKeyB}, nil)
assert.NoError(t, err)
require.NoError(t, err)

tx := flowsdk.NewTransaction().
SetScript([]byte(`
Expand Down Expand Up @@ -611,7 +611,7 @@ func TestSubmitTransaction_Authorizers(t *testing.T) {
accountKeyB.SetWeight(flowsdk.AccountKeyWeightThreshold)

accountAddressB, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKeyB}, nil)
assert.NoError(t, err)
require.NoError(t, err)

t.Run("Extra authorizers", func(t *testing.T) {
// script only supports one account
Expand Down Expand Up @@ -873,7 +873,7 @@ func TestSubmitTransaction_EnvelopeSignature(t *testing.T) {
accountKeyB.SetWeight(flowsdk.AccountKeyWeightThreshold / 2)

accountAddressA, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKeyA, accountKeyB}, nil)
assert.NoError(t, err)
require.NoError(t, err)

script := []byte(`
transaction {
Expand Down Expand Up @@ -942,7 +942,7 @@ func TestSubmitTransaction_PayloadSignatures(t *testing.T) {
accountKeyB.SetWeight(flowsdk.AccountKeyWeightThreshold)

accountAddressB, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKeyB}, nil)
assert.NoError(t, err)
require.NoError(t, err)

tx := flowsdk.NewTransaction().
SetScript([]byte(addTwoScript)).
Expand Down Expand Up @@ -981,7 +981,7 @@ func TestSubmitTransaction_PayloadSignatures(t *testing.T) {
accountKeyB.SetWeight(flowsdk.AccountKeyWeightThreshold)

accountAddressB, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKeyB}, nil)
assert.NoError(t, err)
require.NoError(t, err)

multipleAccountScript := []byte(`
transaction {
Expand Down Expand Up @@ -1693,7 +1693,7 @@ func TestHelloWorld_UpdateAccount(t *testing.T) {
contracts,
b.ServiceKey().Address,
)
assert.NoError(t, err)
require.NoError(t, err)

createAccountTx.
SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit).
Expand Down Expand Up @@ -1821,7 +1821,7 @@ func TestInfiniteTransaction(t *testing.T) {
accountKeys := test.AccountKeyGenerator()
accountKey, signer := accountKeys.NewWithSigner()
accountAddress, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKey}, nil)
assert.NoError(t, err)
require.NoError(t, err)

// Sign the transaction using the new account.
// Do not test using the service account,
Expand Down Expand Up @@ -1887,7 +1887,7 @@ func TestTransactionExecutionLimit(t *testing.T) {
accountKeys := test.AccountKeyGenerator()
accountKey, signer := accountKeys.NewWithSigner()
accountAddress, err := adapter.CreateAccount(context.Background(), []*flowsdk.AccountKey{accountKey}, nil)
assert.NoError(t, err)
require.NoError(t, err)

// Sign the transaction using the new account.
// Do not test using the service account,
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ require (
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/improbable-eng/grpc-web v0.15.0
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/onflow/cadence v1.1.0
github.com/onflow/cadence v1.2.1
github.com/onflow/crypto v0.25.2
github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1
github.com/onflow/flow-go v0.38.0-preview.0.0.20241018193026-4b778232480b
github.com/onflow/flow-go-sdk v1.1.0
github.com/onflow/flow-nft/lib/go/contracts v1.2.1
github.com/onflow/flow-core-contracts/lib/go/templates v1.4.0
github.com/onflow/flow-go v0.38.0-preview.0.0.20241022154145-6a254edbec23
github.com/onflow/flow-go-sdk v1.2.2
github.com/onflow/flow-nft/lib/go/contracts v1.2.2
github.com/onflow/flow/protobuf/go/flow v0.4.7
github.com/onflow/nft-storefront/lib/go/contracts v1.0.0
github.com/prometheus/client_golang v1.18.0
Expand Down Expand Up @@ -154,10 +154,10 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.8.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect
github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect
github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.4.0 // indirect
github.com/onflow/flow-ft/lib/go/contracts v1.0.1 // indirect
github.com/onflow/flow-ft/lib/go/templates v1.0.1 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.2.1 // indirect
github.com/onflow/go-ethereum v1.14.7 // indirect
github.com/onflow/sdks v0.6.0-preview.1 // indirect
github.com/onflow/wal v1.0.2 // indirect
Expand Down
Loading
Loading