Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added doc/bmc.md
Empty file.
Empty file added docs/bsc/bmc.md
Empty file.
Empty file added docs/icon/bmc.md
Empty file.
3 changes: 3 additions & 0 deletions solidity/bts/.solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
skipFiles: ["BTSCoreV1.sol","BTSCoreV2.sol","libraries/DecodeBase64.sol","libraries/EncodeBase64.sol","libraries/RLPDecodeStruct.sol","libraries/RLPEncodeStruct.sol","libraries/RLPEncode.sol","test/Holder.sol","test/NonRefundable.sol","test/Refundable.sol"]
};
14 changes: 0 additions & 14 deletions solidity/bts/contracts/test/BMC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,10 @@ contract BMC is IBMCPeriphery {
uint256 _sn,
bytes memory _msg
) external override {
require(
msg.sender == address(this) || bshServices[_svc] == msg.sender,
"BMCRevertUnauthorized"
);
require(_sn >= 0, "BMCRevertInvalidSN");
// In case BSH sends a REQUEST_COIN_TRANSFER,
// but '_to' is a network which is not supported by BMC
// revert() therein
if (bmvServices[_to] == address(0)) {
revert("BMCRevertNotExistsBMV");
}
string memory _toBMC = connectedBMC[_to];
bytes memory _rlp = Types
.BMCMessage(bmcAddress, _toBMC, _svc, int256(_sn), _msg)
Expand Down Expand Up @@ -292,12 +285,6 @@ contract BMC is IBMCPeriphery {
@param _net Network Address of the blockchain
@param _addr Address of BMV
*/
function addVerifier(string memory _net, address _addr) external owner {
require(bmvServices[_net] == address(0), "BMCRevertAlreadyExistsBMV");
bmvServices[_net] = _addr;
listBMVNames.push(_net);
numOfBMVService++;
}

/**
@notice Initializes status information for the link.
Expand All @@ -307,7 +294,6 @@ contract BMC is IBMCPeriphery {
function addLink(string calldata _link) external owner {
string memory _net;
(_net, ) = _link.splitBTPAddress();
require(bmvServices[_net] != address(0), "BMCRevertNotExistsBMV");
require(
links[_link].isConnected == false,
"BMCRevertAlreadyExistsLink"
Expand Down
6 changes: 0 additions & 6 deletions solidity/bts/contracts/test/BTSCoreTestV1.sol

This file was deleted.

77 changes: 0 additions & 77 deletions solidity/bts/contracts/test/BTSCoreTestV2.sol

This file was deleted.

2 changes: 1 addition & 1 deletion solidity/bts/migrations/4_upgrade_btsCore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {upgradeProxy} = require('@openzeppelin/truffle-upgrades');
module.exports = async function (deployer, network) {
if (network !== "development") {
if ((network !== "development") && (network !=="soliditycoverage")) {
const argv = require('minimist')(process.argv.slice(2), {string: ['proxyAddr']});
const BTSCoreUpgrade = artifacts.require(argv.btsCore);
const existing = argv.proxyAddr
Expand Down
Loading