From 3505149381c15c07bd990600a7a721e62b560df6 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 26 Jan 2022 17:03:43 +0100 Subject: [PATCH] Remove {.constant.} pragma Has not been allowed in Solidity since 0.5.0. --- ethers/contract.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ethers/contract.nim b/ethers/contract.nim index 520e5b5..e0620b6 100644 --- a/ethers/contract.nim +++ b/ethers/contract.nim @@ -87,8 +87,6 @@ func isConstant(procedure: NimNode): bool = return true elif pragma.eqIdent "pure": return true - elif pragma.eqIdent "constant": - return true false func addContractCall(procedure: var NimNode) = @@ -123,7 +121,7 @@ func checkReturnType(procedure: NimNode) = let returntype = procedure[3][0] if returntype.kind != nnkEmpty and not procedure.isConstant: const message = - "only contract functions with {.constant.}, {.pure.} or {.view.} " & + "only contract functions with {.view.} or {.pure.} " & "can have a return type" error(message, returntype) @@ -144,4 +142,3 @@ macro contract*(procedure: untyped{nkProcDef|nkMethodDef}): untyped = template view* {.pragma.} template pure* {.pragma.} -template constant* {.pragma.}