Use import rebindings to extract the dispacter proxy and zeppelin sub-repos.
|
@ -1,3 +1,4 @@
|
|||
import distutils
|
||||
import itertools
|
||||
import os
|
||||
|
||||
|
@ -6,10 +7,12 @@ from solc import install_solc, compile_files
|
|||
|
||||
|
||||
class SolidityCompiler:
|
||||
__default_version = 'v0.4.21' # TODO: Update to 4.22
|
||||
__default_version = 'v0.4.22'
|
||||
__default_configuration_path = os.path.join(dirname(abspath(__file__)), './compiler.json')
|
||||
|
||||
__default_sol_binary_path = os.path.join(os.environ['VIRTUAL_ENV'], 'bin', 'solc') # TODO: Does not work with pytest w/o intervention
|
||||
__bin_path = os.path.dirname(distutils.spawn.find_executable('python'))
|
||||
__default_sol_binary_path = os.path.join(__bin_path, 'solc')
|
||||
|
||||
__default_contract_dir = os.path.join(dirname(abspath(__file__)), 'source', 'contracts')
|
||||
__default_chain_name = 'tester'
|
||||
|
||||
|
@ -52,10 +55,19 @@ class SolidityCompiler:
|
|||
|
||||
# Compile with remappings
|
||||
# https://github.com/ethereum/py-solc
|
||||
remappings = ["contracts={}".format(self._solidity_source_dir)]
|
||||
project_root = dirname(self._solidity_source_dir)
|
||||
|
||||
remappings = ["contracts={}".format(self._solidity_source_dir),
|
||||
"zeppelin={}".format(os.path.join(project_root, 'zeppelin')),
|
||||
"proxy={}".format(os.path.join(project_root, 'proxy'))
|
||||
]
|
||||
|
||||
compiled_sol = compile_files(source_files=source_paths,
|
||||
import_remappings=remappings,
|
||||
allow_paths=project_root,
|
||||
optimize=True)
|
||||
# libraries="AdditionalMath:0x00000000000000000000 Heap:0xABCDEF0123456"
|
||||
# "LinkedList::0x00000000000000000000 Heap:0xABCDEF0123456")
|
||||
|
||||
# Cleanup the compiled data keys
|
||||
interfaces = {name.split(':')[-1]: compiled_sol[name] for name in compiled_sol}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"language": "Solidity",
|
||||
"sources": {
|
||||
"Issuer.sol": {"urls": ["Issuer.sol"]}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "./NuCypherKMSToken.sol";
|
||||
import "./zeppelin/math/SafeMath.sol";
|
||||
import "./proxy/Upgradeable.sol";
|
||||
import "contracts/NuCypherKMSToken.sol";
|
||||
import "zeppelin/math/SafeMath.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "./zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "./zeppelin/math/Math.sol";
|
||||
import "zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "zeppelin/math/Math.sol";
|
||||
import "./lib/AdditionalMath.sol";
|
||||
import "./Issuer.sol";
|
||||
import "contracts/Issuer.sol";
|
||||
|
||||
/**
|
||||
* @notice PolicyManager interface
|
||||
|
@ -14,9 +14,8 @@ contract PolicyManagerInterface {
|
|||
function escrow() public view returns (address);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notice Contract holds and locks nodes tokens.
|
||||
* @notice Contract holds and locks nodes tokens.self._solidity_source_dir
|
||||
Each node that lock its tokens will receive some compensation
|
||||
**/
|
||||
contract MinersEscrow is Issuer {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "./zeppelin/token/ERC20/BurnableToken.sol";
|
||||
import "./zeppelin/token/ERC20/StandardToken.sol";
|
||||
import "./zeppelin/token/ERC20/DetailedERC20.sol";
|
||||
import "zeppelin/token/ERC20/BurnableToken.sol";
|
||||
import "zeppelin/token/ERC20/StandardToken.sol";
|
||||
import "zeppelin/token/ERC20/DetailedERC20.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "./zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "./zeppelin/math/SafeMath.sol";
|
||||
import "./zeppelin/math/Math.sol";
|
||||
import "zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "zeppelin/math/SafeMath.sol";
|
||||
import "zeppelin/math/Math.sol";
|
||||
import "./lib/AdditionalMath.sol";
|
||||
import "./MinersEscrow.sol";
|
||||
import "./NuCypherKMSToken.sol";
|
||||
import "./proxy/Upgradeable.sol";
|
||||
import "contracts/MinersEscrow.sol";
|
||||
import "contracts/NuCypherKMSToken.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
import "zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "zeppelin/ownership/Ownable.sol";
|
||||
import "zeppelin/math/SafeMath.sol";
|
||||
import "contracts/NuCypherKMSToken.sol";
|
||||
import "contracts/MinersEscrow.sol";
|
||||
import "contracts/PolicyManager.sol";
|
||||
|
||||
import "./zeppelin/token/ERC20/SafeERC20.sol";
|
||||
import "./zeppelin/ownership/Ownable.sol";
|
||||
import "./zeppelin/math/SafeMath.sol";
|
||||
import "./NuCypherKMSToken.sol";
|
||||
import "./MinersEscrow.sol";
|
||||
import "./PolicyManager.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "../zeppelin/math/SafeMath.sol";
|
||||
import "zeppelin/math/SafeMath.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "../zeppelin/math/SafeMath.sol";
|
||||
import "zeppelin/math/SafeMath.sol";
|
||||
import "./Dispatcher.sol";
|
||||
import "./Upgradeable.sol";
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "../zeppelin/ownership/Ownable.sol";
|
||||
import "zeppelin/ownership/Ownable.sol";
|
||||
|
||||
|
||||
/**
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@ pragma solidity ^0.4.18;
|
|||
|
||||
|
||||
import "./ContractInterface.sol";
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
contract ContractV2Bad is ContractInterface, Upgradeable {
|
||||
|
|
|
@ -2,7 +2,7 @@ pragma solidity ^0.4.18;
|
|||
|
||||
|
||||
import "./ContractInterface.sol";
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@ pragma solidity ^0.4.18;
|
|||
|
||||
|
||||
import "./ContractInterface.sol";
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "contracts/proxy/Government.sol";
|
||||
import "proxy/Government.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
import "contracts/proxy/Upgradeable.sol";
|
||||
import "proxy/Upgradeable.sol";
|
||||
|
||||
|
||||
/**
|
||||
|
|