Skip to content

Commit

Permalink
update to Cadence v1.2.1 and onflow/flow-go#6571
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Oct 21, 2024
1 parent 9286180 commit a545558
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2,025 deletions.
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.20241021221952-af9cd6e99de1
github.com/onflow/flow-go-sdk v1.2.1
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

0 comments on commit a545558

Please sign in to comment.