Skip to content

Commit a381041

Browse files
committed
v1.0.1 - merge BasicJurisdiction audit fixes in
1 parent 90cba02 commit a381041

27 files changed

+5024
-1879
lines changed

.solcover.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
testCommand: 'node --max-old-space-size=4096 ./scripts/testBasicCoverage.js && node --max-old-space-size=4096 ./scripts/testExtendedCoverage.js && node --max-old-space-size=4096 ./scripts/testBasicOnExtendedCoverage.js',
3+
compileCommand: '../node_modules/.bin/truffle compile',
4+
copyPackages: ['web3']
5+
}

.solhint.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "default",
3+
"rules": {
4+
"max-line-length": 131,
5+
"no-inline-assembly": false,
6+
"avoid-tx-origin": false,
7+
"multiple-sends": false,
8+
"function-max-lines": false,
9+
"code-complexity": 9,
10+
"func-param-name-mixedcase": false,
11+
"compiler-fixed": false,
12+
"avoid-throw": false,
13+
"avoid-suicide": "error",
14+
"avoid-sha3": "warn",
15+
"indent": ["warn", 2]
16+
}
17+
}

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ services:
77
before_install:
88
# ganache-cli
99
- docker pull trufflesuite/ganache-cli
10-
- docker run -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0
10+
- docker run -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0 --gasLimit 8000000
1111
# yarn
1212
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
1313
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
1414
- sudo apt-get update -qq
1515
- sudo apt-get install -y -qq yarn
1616
install:
17-
- yarn global add truffle
1817
- yarn global add coveralls
1918
- yarn install
2019
script:
20+
- yarn run coverage && cat coverage/lcov.info | coveralls
2121
- yarn test
22-
##- yarn run coverage && cat coverage/lcov.info | coveralls
2322
cache:
2423
yarn: true

README.md

Lines changed: 59 additions & 27 deletions
Large diffs are not rendered by default.

contracts/AttributeRegistry.sol

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
pragma solidity ^0.4.25;
2+
3+
4+
/**
5+
* @title Attribute Registry interface. EIP-165 ID: 0x5f46473f
6+
*/
7+
interface AttributeRegistryInterface {
8+
/**
9+
* @notice Check if an attribute of the type with ID `attributeTypeID` has
10+
* been assigned to the account at `account` and is still valid.
11+
* @param account address The account to check for a valid attribute.
12+
* @param attributeTypeID uint256 The ID of the attribute type to check for.
13+
* @return True if the attribute is assigned and valid, false otherwise.
14+
*/
15+
function hasAttribute(
16+
address account,
17+
uint256 attributeTypeID
18+
) external view returns (bool);
19+
20+
/**
21+
* @notice Retrieve the value of the attribute of the type with ID
22+
* `attributeTypeID` on the account at `account`, assuming it is valid.
23+
* @param account address The account to check for the given attribute value.
24+
* @param attributeTypeID uint256 The ID of the attribute type to check for.
25+
* @return The attribute value if the attribute is valid, reverts otherwise.
26+
*/
27+
function getAttributeValue(
28+
address account,
29+
uint256 attributeTypeID
30+
) external view returns (uint256);
31+
32+
/**
33+
* @notice Count the number of attribute types defined by the registry.
34+
* @return The number of available attribute types.
35+
*/
36+
function countAttributeTypes() external view returns (uint256);
37+
38+
/**
39+
* @notice Get the ID of the attribute type at index `index`.
40+
* @param index uint256 The index of the attribute type in question.
41+
* @return The ID of the attribute type.
42+
*/
43+
function getAttributeTypeID(uint256 index) external view returns (uint256);
44+
}

0 commit comments

Comments
 (0)