@onflow/cadence-language-server
Advanced tools
Changelog
v0.18.0 - 15 Jun 2021
PublicKey
type importable (#995) @SupunS[Changes][v0.18.0]
<a name="v0.17.0"></a>
Changelog
v0.17.0 - 09 Jun 2021
String.utf8
field (#954) @turbolentType
function declaration (#949) @turbolent[Changes][v0.17.0]
<a name="v0.16.1"></a>
Changelog
v0.16.0 - 18 May 2021
Add new crypto features (#852) @SupunS
Renamed the ECDSA_Secp256k1
signature algorithm to ECDSA_secp256k1
.
Please update existing contracts, transactions, and scripts to use the new name.
Remove the high-level storage API (#877) @turbolent
The internal interface's SetCadenceValue
function was removed.
This change does not affect Cadence programs (contracts, transactions, scripts).
Add non-local type inference for expressions (#875) @SupunS
The type of most declarations and expressions is now inferred in a uni-directional way, instead of only locally.
For example, this allows the following declarations to type-check without having to add static casts:
let numbers: [Int8] = [1, 2, 3]
let nestedNumbers: [[Int8]] = [[1, 2], [3, 4]]
let numberNames: {Int64: String} = {0: "zero", 1: "one"}
let sum: Int8 = 1 + 2
Add new crypto features (#852) @SupunS
Hash Algorithms
HashAlgorithm.KMAC128_BLS_BLS12_381
Signature Algorithms
SignatureAlgorithm.BLS_BLS12_381
PublicKey
Type
Added the field let isValid: Bool
. For example:
let publicKey = PublicKey(publicKey: [], signatureAlgorithm: SignatureAlgorithm.ECDSA_P256)
let valid = publicKey.isValid
Added the function verify
, which allows validating signatures:
pub fun verify(
signature: [UInt8],
signedData: [UInt8],
domainSeparationTag: String,
hashAlgorithm: HashAlgorithm
): Bool
For example:
let valid = publicKey.verify(
signature: [],
signedData: [],
domainSeparationTag: "something",
hashAlgorithm: HashAlgorithm.SHA2_256
)
Added the function hashWithTag
, which allows hashing with a tag:
pub fun hashWithTag(
_ data: [UInt8],
tag: string,
algorithm: HashAlgorithm
): [UInt8]
Direct contract function invoke (#878) @janezpodhostnik
Cadence now supports an additional function to allow the host environment to call contract functions directly.
Language Server: Add support for access check mode (#868) @turbolent
Record variable declaration ranges (#880) @turbolent
The performance of decoding and encoding values was significantly improved by @fxamacker and @SupunS:
This release contains major security fixes:
Declare post-condition result variable as reference if return type is a resource (#905) @turbolent
We would like to thank Deniz Mert Edincik for finding and reporting this critical issue responsibly through our Responsible Disclosure Policy.
See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-13
Fix dynamic subtype test for reference values (#914) @turbolent
We would like to thank Deniz Mert Edincik for finding and reporting this critical issue responsibly through our Responsible Disclosure Policy.
We would also like to thank Mikey Lemmon for finding this issue independently and reporting it responsibly, too.
See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-20
Check storability when value is written (before it is encoded) (#915) @turbolent
We would like to thank Deniz Mert Edincik for finding and reporting this medium issue responsibly through our Responsible Disclosure Policy.
See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-20
Check the index bounds for arrays (#917) @turbolent
We would like to thank Mário Silva for finding and reporting this medium issue responsibly through our Responsible Disclosure Policy.
StaticType
for StorageReferenceValue
and EphemeralReferenceValue
(#920) @turbolent[Changes][v0.16.0]
<a name="v0.15.1"></a>
Changelog
v0.14.4 - 25 Mar 2021
[Changes][v0.14.4]
<a name="v0.13.10"></a>
Changelog
v0.12.6 - 02 Feb 2021
Performance of checking and interpretation has been improved,
e.g. for BenchmarkCheckContractInterfaceFungibleTokenConformance
:
| Commit | Description | Ops | Time | |----------|------------------------------------------------|------:|--------------:| | 21764d89 | Baseline, v0.12.5 | 595 | 2018162 ns/op | | df2ba05d | Update hamt, use ForEach everywhere | 1821 | 658515 ns/op | | 6088ce01 | Optional occurrences and origins recording | 2258 | 530121 ns/op | | 429a7796 | Optimize activations, replace use of HAMT map | 3667 | 327368 ns/op |
[Changes][v0.12.6]
<a name="v0.10.6"></a>
Changelog
v0.12.4 - 20 Jan 2021
[Changes][v0.12.4]
<a name="v0.12.3"></a>