From c81aeb564f975acf6b4a457506e1721fb3d85454 Mon Sep 17 00:00:00 2001 From: Vectorized Date: Sat, 6 Apr 2024 06:50:41 +0700 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Change=20decimals=20to=20v?= =?UTF-8?q?iew=20(#128)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gas-snapshot | 4 ++-- src/DN404.sol | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index 47b1af9..07cfb81 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -89,12 +89,12 @@ DN404MirrorTest:testNameAndSymbol(string,string) (runs: 258, μ: 206468, ~: 2069 DN404MirrorTest:testNotLinked() (gas: 12777) DN404MirrorTest:testPullOwner() (gas: 112613) DN404MirrorTest:testPullOwnerWithOwnable() (gas: 3289101) -DN404MirrorTest:testSafeTransferFrom(uint32) (runs: 258, μ: 465942, ~: 465938) +DN404MirrorTest:testSafeTransferFrom(uint32) (runs: 258, μ: 465944, ~: 465938) DN404MirrorTest:testSetAndGetApprovalForAll() (gas: 325486) DN404MirrorTest:testSetAndGetApproved() (gas: 322728) DN404MirrorTest:testSupportsInterface() (gas: 7544) DN404MirrorTest:testTokenURI(string,uint256) (runs: 258, μ: 157416, ~: 135217) -DN404MirrorTest:testTransferFrom(uint32) (runs: 258, μ: 366989, ~: 366980) +DN404MirrorTest:testTransferFrom(uint32) (runs: 258, μ: 366988, ~: 366980) DN404MirrorTest:testTransferFromMixed(uint256) (runs: 258, μ: 684731, ~: 643712) DN404MirrorTest:test__codesize() (gas: 55040) DN404OnlyERC20Test:testApprove() (gas: 35803) diff --git a/src/DN404.sol b/src/DN404.sol index 2bfef15..44402e7 100644 --- a/src/DN404.sol +++ b/src/DN404.sol @@ -315,7 +315,7 @@ abstract contract DN404 { /// @dev Returns the decimals places of the token. Defaults to 18. /// Does not affect DN404's internal calculations. /// Will only affect the frontend UI on most protocols. - function decimals() public pure virtual returns (uint8) { + function decimals() public view virtual returns (uint8) { return 18; }