diff --git a/contracts/RevocationRegistry.sol b/contracts/RevocationRegistry.sol index 07874b3..8f2d795 100644 --- a/contracts/RevocationRegistry.sol +++ b/contracts/RevocationRegistry.sol @@ -85,9 +85,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeStatus(revoked, namespace, revocationList, revocationKey); } - function _hashChangeStatus(bool revoked, address namespace, bytes32 revocationList, bytes32 revocationKey, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeStatus(bool revoked, address namespace, bytes32 revocationList, bytes32 revocationKey, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeStatus(bool revoked,address namespace,bytes32 revocationList,bytes32 revocationKey,address signer,uint nonce)"), + keccak256("ChangeStatus(bool revoked,address namespace,bytes32 revocationList,bytes32 revocationKey,address signer,uint256 nonce)"), revoked, namespace, revocationList, @@ -110,9 +110,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeStatus(revoked, namespace, revocationList, revocationKey); } - function _hashChangeStatusDelegated(bool revoked, address namespace, bytes32 revocationList, bytes32 revocationKey, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeStatusDelegated(bool revoked, address namespace, bytes32 revocationList, bytes32 revocationKey, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeStatusDelegated(bool revoked,address namespace,bytes32 revocationList,bytes32 revocationKey,address signer,uint nonce)"), + keccak256("ChangeStatusDelegated(bool revoked,address namespace,bytes32 revocationList,bytes32 revocationKey,address signer,uint256 nonce)"), revoked, namespace, revocationList, @@ -142,9 +142,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeStatusesInList(revoked, namespace, revocationList, revocationKeys); } - function _hashChangeStatusesInList(bool[] memory revoked, address namespace, bytes32 revocationList, bytes32[] memory revocationKeys, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeStatusesInList(bool[] memory revoked, address namespace, bytes32 revocationList, bytes32[] memory revocationKeys, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeStatusesInList(bool[] revoked,address namespace,bytes32 revocationList,bytes32[] revocationKeys,address signer,uint nonce)"), + keccak256("ChangeStatusesInList(bool[] revoked,address namespace,bytes32 revocationList,bytes32[] revocationKeys,address signer,uint256 nonce)"), keccak256(abi.encodePacked(revoked)), namespace, revocationList, @@ -167,9 +167,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeStatusesInList(revoked, namespace, revocationList, revocationKeys); } - function _hashChangeStatusesInListDelegated(bool[] memory revoked, address namespace, bytes32 revocationList, bytes32[] memory revocationKeys, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeStatusesInListDelegated(bool[] memory revoked, address namespace, bytes32 revocationList, bytes32[] memory revocationKeys, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeStatusesInListDelegated(bool[] revoked,address namespace,bytes32 revocationList,bytes32[] revocationKeys,address signer,uint nonce)"), + keccak256("ChangeStatusesInListDelegated(bool[] revoked,address namespace,bytes32 revocationList,bytes32[] revocationKeys,address signer,uint256 nonce)"), keccak256(abi.encodePacked(revoked)), namespace, revocationList, @@ -198,9 +198,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeListOwner(namespace, newOwner, revocationList); } - function _hashChangeListOwner(address namespace, address newOwner, bytes32 revocationList, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeListOwner(address namespace, address newOwner, bytes32 revocationList, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeListOwner(address namespace,address newOwner,bytes32 revocationList,address signer,uint nonce)"), + keccak256("ChangeListOwner(address namespace,address newOwner,bytes32 revocationList,address signer,uint256 nonce)"), namespace, newOwner, revocationList, @@ -227,9 +227,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _changeListStatus(revoked, namespace, revocationList); } - function _hashChangeListStatus(bool revoked, address namespace, bytes32 revocationList, address signer, uint nonce) internal view returns (bytes32) { + function _hashChangeListStatus(bool revoked, address namespace, bytes32 revocationList, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("ChangeListStatus(bool revoked,address namespace,bytes32 revocationList,address signer,uint nonce)"), + keccak256("ChangeListStatus(bool revoked,address namespace,bytes32 revocationList,address signer,uint256 nonce)"), revoked, namespace, revocationList, @@ -258,9 +258,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _addListDelegate(namespace, delegate, revocationList, validity); } - function _hashAddListDelegate(address namespace, address delegate, bytes32 revocationList, uint validity, address signer, uint nonce) internal view returns (bytes32) { + function _hashAddListDelegate(address namespace, address delegate, bytes32 revocationList, uint validity, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("AddListDelegate(address namespace,address delegate,bytes32 revocationList,uint validity,address signer,uint nonce)"), + keccak256("AddListDelegate(address namespace,address delegate,bytes32 revocationList,uint validity,address signer,uint256 nonce)"), namespace, delegate, revocationList, @@ -289,9 +289,9 @@ contract RevocationRegistry is Initializable, EIP712Upgradeable, PausableUpgrade _removeListDelegate(namespace, delegate, revocationList); } - function _hashRemoveListDelegate(address namespace, address delegate, bytes32 revocationList, address signer, uint nonce) internal view returns (bytes32) { + function _hashRemoveListDelegate(address namespace, address delegate, bytes32 revocationList, address signer, uint256 nonce) internal view returns (bytes32) { return _hashTypedDataV4(keccak256(abi.encode( - keccak256("RemoveListDelegate(address namespace,address delegate,bytes32 revocationList,address signer,uint nonce)"), + keccak256("RemoveListDelegate(address namespace,address delegate,bytes32 revocationList,address signer,uint256 nonce)"), namespace, delegate, revocationList, diff --git a/package.json b/package.json index edfea45..dd09cf5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spherity/ethr-revocation-registry", - "version": "1.0.13", + "version": "1.1.0", "description": "The Ethereum Revocation List types for smart contract interaction.", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/util.ts b/src/util.ts index 9ec0473..c8bb70d 100644 --- a/src/util.ts +++ b/src/util.ts @@ -9,7 +9,7 @@ export const EIP712ChangeStatusType = { {name: 'revocationList', type: 'bytes32'} as TypedDataField, {name: 'revocationKey', type: 'bytes32'} as TypedDataField, {name: 'signer', type: 'address'} as TypedDataField, - {name: 'nonce', type: 'uint'} as TypedDataField, + {name: 'nonce', type: 'uint256'} as TypedDataField, ] } @@ -20,7 +20,7 @@ export const EIP712ChangeStatusDelegatedType = { {name: 'revocationList', type: 'bytes32'} as TypedDataField, {name: 'revocationKey', type: 'bytes32'} as TypedDataField, {name: 'signer', type: 'address'} as TypedDataField, - {name: 'nonce', type: 'uint'} as TypedDataField, + {name: 'nonce', type: 'uint256'} as TypedDataField, ] } @@ -31,7 +31,7 @@ export const EIP712ChangeStatusesInListType = { {name: 'revocationList', type: 'bytes32'}, {name: 'revocationKeys', type: 'bytes32[]'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } @@ -42,7 +42,7 @@ export const EIP712ChangeStatusesInListDelegatedType = { {name: 'revocationList', type: 'bytes32'}, {name: 'revocationKeys', type: 'bytes32[]'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } @@ -52,7 +52,7 @@ export const EIP712ChangeListOwnerType = { {name: 'newOwner', type: 'address'}, {name: 'revocationList', type: 'bytes32'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } @@ -61,9 +61,9 @@ export const EIP712AddListDelegateType = { {name: 'namespace', type: 'address'}, {name: 'delegate', type: 'address'}, {name: 'revocationList', type: 'bytes32'}, - {name: 'validity', type: 'uint'}, + {name: 'validity', type: 'uint256'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } @@ -73,7 +73,7 @@ export const EIP712RemoveListDelegateType = { {name: 'delegate', type: 'address'}, {name: 'revocationList', type: 'bytes32'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } @@ -83,6 +83,6 @@ export const EIP712ChangeListStatusType = { {name: 'namespace', type: 'address'}, {name: 'revocationList', type: 'bytes32'}, {name: 'signer', type: 'address'}, - {name: 'nonce', type: 'uint'}, + {name: 'nonce', type: 'uint256'}, ] } \ No newline at end of file