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 v0.17.0 #789

Merged
merged 7 commits into from Jun 9, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/util/ledger/migrations/storage_v4.go
Expand Up @@ -295,7 +295,7 @@ func rewriteTokenForwarderStorageReference(key string, value interpreter.Value)

fmt.Printf(
"Rewriting TokenForwarding Forwarder: %s\n\treference: %#+v\n\tcapability: %#+v\n",
compositeValue.String(interpreter.StringResults{}),
compositeValue.String(),
recipientRef,
recipientCap,
)
Expand Down
6 changes: 3 additions & 3 deletions fvm/accounts_test.go
Expand Up @@ -1094,7 +1094,7 @@ func TestGetAccountKey(t *testing.T) {
"weight: 1000.00000000, "+
"isRevoked: false)",
keyIndex,
interpreter.ByteSliceToByteArrayValue(key.PublicKey.Encode()).String(interpreter.StringResults{}),
interpreter.ByteSliceToByteArrayValue(key.PublicKey.Encode()).String(),
)

assert.Equal(t, expected, tx.Logs[0])
Expand Down Expand Up @@ -1146,7 +1146,7 @@ func TestGetAccountKey(t *testing.T) {
"weight: 1000.00000000, "+
"isRevoked: false)",
keyIndex,
interpreter.ByteSliceToByteArrayValue(key.PublicKey.Encode()).String(interpreter.StringResults{}),
interpreter.ByteSliceToByteArrayValue(key.PublicKey.Encode()).String(),
)

assert.Equal(t, expected, tx.Logs[0])
Expand Down Expand Up @@ -1198,7 +1198,7 @@ func TestGetAccountKey(t *testing.T) {
"weight: 1000.00000000, "+
"isRevoked: false)",
i,
interpreter.ByteSliceToByteArrayValue(keys[i].PublicKey.Encode()).String(interpreter.StringResults{}),
interpreter.ByteSliceToByteArrayValue(keys[i].PublicKey.Encode()).String(),
)

assert.Equal(t, expected, tx.Logs[i])
Expand Down
4 changes: 2 additions & 2 deletions fvm/transactionInvocator.go
Expand Up @@ -277,13 +277,13 @@ func valueDeclarations(ctx *Context, env *hostEnv) []runtime.ValueDeclaration {
func(invocation interpreter.Invocation) interpreter.Value {
address, ok := invocation.Arguments[0].(interpreter.AddressValue)
if !ok {
panic(errors.NewValueErrorf(invocation.Arguments[0].String(interpreter.StringResults{}),
panic(errors.NewValueErrorf(invocation.Arguments[0].String(),
"first argument of setAccountFrozen must be an address"))
}

frozen, ok := invocation.Arguments[1].(interpreter.BoolValue)
if !ok {
panic(errors.NewValueErrorf(invocation.Arguments[0].String(interpreter.StringResults{}),
panic(errors.NewValueErrorf(invocation.Arguments[0].String(),
"second argument of setAccountFrozen must be a boolean"))
}
err := env.SetAccountFrozen(common.Address(address), bool(frozen))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -37,7 +37,7 @@ require (
github.com/m4ksio/wal v1.0.0
github.com/marten-seemann/qtls-go1-15 v0.1.4 // indirect
github.com/multiformats/go-multiaddr v0.3.1
github.com/onflow/cadence v0.16.1
github.com/onflow/cadence v0.17.0
github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a
github.com/onflow/flow-go-sdk v0.20.0-alpha.1
github.com/onflow/flow-go/crypto v0.12.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -854,8 +854,8 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onflow/cadence v0.15.0/go.mod h1:KMzDF6cIv6nb5PJW9aITaqazbmJX8MMeibFcpPP385M=
github.com/onflow/cadence v0.16.1 h1:Z82Eetlj2CBsA3qP8FSTR51iHKMDlVRhxKubA79HtfY=
github.com/onflow/cadence v0.16.1/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE=
github.com/onflow/cadence v0.17.0 h1:TFpwYVIs2b/bd6TlYxa3zMZN2S9CByMvW7Uk01KFP9Y=
github.com/onflow/cadence v0.17.0/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a h1:7d+9evYk21NhHivkqeyWXId2ai+YMnDxl05VfKlbkaY=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a/go.mod h1:IZ2e7UyLCYmpQ8Kd7k0A32uXqdqfiV1r2sKs5/riblo=
github.com/onflow/flow-ft/lib/go/contracts v0.5.0 h1:Cg4gHGVblxcejfNNG5Mfj98Wf4zbY76O0Y28QB0766A=
Expand Down
2 changes: 1 addition & 1 deletion integration/go.mod
Expand Up @@ -9,7 +9,7 @@ require (
github.com/docker/go-connections v0.4.0
github.com/go-openapi/strfmt v0.20.0 // indirect
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/onflow/cadence v0.16.1
github.com/onflow/cadence v0.17.0
github.com/onflow/flow-go v0.11.1 // replaced by version on-disk
github.com/onflow/flow-go-sdk v0.20.0-alpha.1
github.com/onflow/flow-go/crypto v0.12.0 // replaced by version on-disk
Expand Down
4 changes: 2 additions & 2 deletions integration/go.sum
Expand Up @@ -874,8 +874,8 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onflow/cadence v0.15.0/go.mod h1:KMzDF6cIv6nb5PJW9aITaqazbmJX8MMeibFcpPP385M=
github.com/onflow/cadence v0.16.1 h1:Z82Eetlj2CBsA3qP8FSTR51iHKMDlVRhxKubA79HtfY=
github.com/onflow/cadence v0.16.1/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE=
github.com/onflow/cadence v0.17.0 h1:TFpwYVIs2b/bd6TlYxa3zMZN2S9CByMvW7Uk01KFP9Y=
github.com/onflow/cadence v0.17.0/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a h1:7d+9evYk21NhHivkqeyWXId2ai+YMnDxl05VfKlbkaY=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a/go.mod h1:IZ2e7UyLCYmpQ8Kd7k0A32uXqdqfiV1r2sKs5/riblo=
github.com/onflow/flow-ft/lib/go/contracts v0.5.0 h1:Cg4gHGVblxcejfNNG5Mfj98Wf4zbY76O0Y28QB0766A=
Expand Down