Cadence: the resource-oriented smart contract programming language of the Flow network. Capability-based security, type safety, and move semantics
See the code
Cadence is the native smart contract programming language of the Flow network. It is resource-oriented, capability-based, and designed by smart contract engineers to prevent the vulnerability classes that plague Solidity development.
Core design principles:
Here is a minimal Cadence contract that declares a public hello() function. This is the same example used by the @onflow/cadence-parser package to demonstrate parsing:
access(all) contract HelloWorld {
access(all) fun hello() {
log("Hello, world!")
}
}
For a full walkthrough of resources, capabilities, and transactions, see the Cadence tutorial on cadence-lang.org.
To get started writing Cadence, try the Cadence Playground (browser).
If you want to develop locally, use these tools:
The canonical language reference is at cadence-lang.org. Additional developer guides, tutorials, and integration docs live on the Flow Developer Portal.
Development documentation specific to the Cadence implementation can be found in the /docs directory.
Cadence is the native smart contract programming language of the Flow network. It is resource-oriented, capability-based, and designed to prevent entire vulnerability classes at compile time rather than relying on developer discipline.
Cadence treats assets as first-class resources with move semantics enforced by the compiler. Resources cannot be duplicated, implicitly destroyed, or accessed after being moved. Reentrancy attacks are significantly mitigated by Cadence's resource ownership model because references are invalidated at runtime when a resource transfers. Access control is capability-based via entitlements rather than msg.sender checks.
Resource-oriented programming pairs linear types with object capabilities. A resource can only exist in one location at a time, cannot be copied, and cannot be accidentally lost or deleted. This models digital ownership declaratively and is enforced by the compiler.
Cadence 1.0 is the current major language version. It introduced entitlements for fine-grained access control on references, view functions, and a number of other language improvements. The latest release is v1.10.2.
No. Any Flow Access Node can accept Cadence transactions. For local development, use the Flow CLI and the bundled Flow emulator.
The Cadence implementation in this repository is designed as the runtime for the Flow network. The language and its interpreter are licensed under Apache 2.0, so forking and embedding are permitted, but the canonical execution environment is Flow.
Start with cadence-lang.org for the language reference, work through the Cadence tutorial, and try examples in the Cadence Playground (browser). The Flow Developer Portal covers end-to-end application development.
The language reference and specification materials live at cadence-lang.org and in the /docs directory of this repository.
See SECURITY.md for the responsible disclosure process. Do not open public issues for vulnerabilities.
If you would like to contribute to Cadence, have a look at the contributing guide.
You can also join the next Cadence Working Group meeting to participate in language design discussions.
Cadence is the native language of the Flow network, a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale. Flow powers NBA Top Shot, NFL All Day, Disney Pinnacle (built by Dapper Labs), and Ticketmaster NFT ticketing, all in live production.
Overall
Maintained
Code review
Go module
Latest release
Releases this year
2,118 followers · starred Jul 2022
245 followers · starred Sep 2023
39 followers · starred Jun 2021
418 followers · starred Jun 2026
Cadence: the resource-oriented smart contract programming language of the Flow network. Capability-based security, type safety, and move semantics
See the code
Cadence is the native smart contract programming language of the Flow network. It is resource-oriented, capability-based, and designed by smart contract engineers to prevent the vulnerability classes that plague Solidity development.
Core design principles:
Here is a minimal Cadence contract that declares a public hello() function. This is the same example used by the @onflow/cadence-parser package to demonstrate parsing:
access(all) contract HelloWorld {
access(all) fun hello() {
log("Hello, world!")
}
}
For a full walkthrough of resources, capabilities, and transactions, see the Cadence tutorial on cadence-lang.org.
To get started writing Cadence, try the Cadence Playground (browser).
If you want to develop locally, use these tools:
The canonical language reference is at cadence-lang.org. Additional developer guides, tutorials, and integration docs live on the Flow Developer Portal.
Development documentation specific to the Cadence implementation can be found in the /docs directory.
Cadence is the native smart contract programming language of the Flow network. It is resource-oriented, capability-based, and designed to prevent entire vulnerability classes at compile time rather than relying on developer discipline.
Cadence treats assets as first-class resources with move semantics enforced by the compiler. Resources cannot be duplicated, implicitly destroyed, or accessed after being moved. Reentrancy attacks are significantly mitigated by Cadence's resource ownership model because references are invalidated at runtime when a resource transfers. Access control is capability-based via entitlements rather than msg.sender checks.
Resource-oriented programming pairs linear types with object capabilities. A resource can only exist in one location at a time, cannot be copied, and cannot be accidentally lost or deleted. This models digital ownership declaratively and is enforced by the compiler.
Cadence 1.0 is the current major language version. It introduced entitlements for fine-grained access control on references, view functions, and a number of other language improvements. The latest release is v1.10.2.
No. Any Flow Access Node can accept Cadence transactions. For local development, use the Flow CLI and the bundled Flow emulator.
The Cadence implementation in this repository is designed as the runtime for the Flow network. The language and its interpreter are licensed under Apache 2.0, so forking and embedding are permitted, but the canonical execution environment is Flow.
Start with cadence-lang.org for the language reference, work through the Cadence tutorial, and try examples in the Cadence Playground (browser). The Flow Developer Portal covers end-to-end application development.
The language reference and specification materials live at cadence-lang.org and in the /docs directory of this repository.
See SECURITY.md for the responsible disclosure process. Do not open public issues for vulnerabilities.
If you would like to contribute to Cadence, have a look at the contributing guide.
You can also join the next Cadence Working Group meeting to participate in language design discussions.
Cadence is the native language of the Flow network, a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale. Flow powers NBA Top Shot, NFL All Day, Disney Pinnacle (built by Dapper Labs), and Ticketmaster NFT ticketing, all in live production.
Overall
Maintained
Code review
Go module
Latest release
Releases this year
2,118 followers · starred Jul 2022
245 followers · starred Sep 2023
39 followers · starred Jun 2021
418 followers · starred Jun 2026