From 52e902bfdbf7cca5c9199fd42149ee454a1f8c5d Mon Sep 17 00:00:00 2001 From: lostin0x <111564065+lostin0x@users.noreply.github.com> Date: Sat, 21 Dec 2024 00:02:32 +0800 Subject: [PATCH] Update 'abstract contract Exttload' (#841) --- docs/contracts/v4/guides/07-read-pool-state.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contracts/v4/guides/07-read-pool-state.mdx b/docs/contracts/v4/guides/07-read-pool-state.mdx index bdb08fc3f..130da2c44 100644 --- a/docs/contracts/v4/guides/07-read-pool-state.mdx +++ b/docs/contracts/v4/guides/07-read-pool-state.mdx @@ -95,11 +95,11 @@ Moreover, using `extsload` instead of hand-written Solidity view functions lower ### TransientStateLibrary and `exttload` ```solidity -abstract contract Extsload is IExtsload { - /// @inheritdoc IExtsload - function extsload(bytes32 slot) external view returns (bytes32) { +abstract contract Exttload is IExttload { + /// @inheritdoc IExttload + function exttload(bytes32 slot) external view returns (bytes32) { assembly ("memory-safe") { - mstore(0, sload(slot)) + mstore(0, tload(slot)) return(0, 0x20) } } @@ -260,4 +260,4 @@ Global fee growth is essential for several advanced operations: --- -For additional reference, see [`StateLibrary`](/contracts/v4/reference/core/libraries/StateLibrary) and [`Extsload`](/contracts/v4/reference/core/Extsload) \ No newline at end of file +For additional reference, see [`StateLibrary`](/contracts/v4/reference/core/libraries/StateLibrary) and [`Extsload`](/contracts/v4/reference/core/Extsload)