Skip to content

Commit d4511c1

Browse files
authored
Merge pull request #2037 from OffchainLabs/better-stylus-caching-banner
Better stylus caching banner
2 parents a2031b9 + e280b8d commit d4511c1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

arbitrum-docs/stylus/how-tos/caching-contracts.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ target_audience: 'Developers deploying smart contracts using Stylus.'
77
sidebar_position: 3
88
---
99

10+
import { VanillaAdmonition } from '@site/src/components/VanillaAdmonition/';
11+
1012
<a data-quicklook-from="stylus">Stylus</a> is designed for fast computation and efficiency. However,
1113
the initialization process when entering a contract can be resource-intensive and time-consuming.
1214

1315
This initialization process, if repeated frequently, may lead to inefficiencies. To address this, we have implemented a caching strategy. By storing frequently accessed contracts in memory, we can avoid repeated initializations. This approach saves resources and time, significantly enhancing the speed and efficiency of contract execution.
1416

15-
**Note that Stylus smart contracts will need to be re-activated once per year (365 days) or whenever a upgrade to Stylus (which will always involve an ArbOS upgrade), even if they are in the cache. This re-activation can be done using [`cargo-stylus`](https://github.com/OffchainLabs/cargo-stylus), a cargo subcommand for building, verifying, and deploying Arbitrum Stylus WASM contracts in Rust.**
17+
<VanillaAdmonition type="note">
18+
**Note that Stylus smart contracts will need to be re-activated once per year (365 days) or
19+
whenever a upgrade to Stylus (which will always involve an ArbOS upgrade), even if they are in the
20+
cache. This re-activation can be done using
21+
[`cargo-stylus`](https://github.com/OffchainLabs/cargo-stylus), a cargo subcommand for building,
22+
verifying, and deploying Arbitrum Stylus WASM contracts in Rust.**
23+
</VanillaAdmonition>
1624

1725
## CacheManager contract
1826

0 commit comments

Comments
 (0)