This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: contracts/libraries/SafeMath.sol | |
pragma solidity 0.4.24; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Submitted for verification at Etherscan.io on 2018-12-19 | |
*/ | |
pragma solidity 0.4.24; | |
// File: contracts/ERC677Receiver.sol | |
contract ERC677Receiver { | |
function onTokenTransfer(address _from, uint _value, bytes _data) external returns(bool); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Submitted for verification at Etherscan.io on 2018-12-19 | |
*/ | |
pragma solidity 0.4.24; | |
// File: contracts/ERC677Receiver.sol | |
contract ERC677Receiver { | |
function onTokenTransfer(address _from, uint _value, bytes _data) external returns(bool); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BRIDGE_MODE=ERC_TO_ERC | |
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=01F903CE0C960FF3A9E68E80FF5FFC344358D80CE1C221C3F9711AF07F83A3BD | |
DEPLOYMENT_GAS_LIMIT_EXTRA=0.2 | |
HOME_DEPLOYMENT_GAS_PRICE=1000000000 | |
FOREIGN_DEPLOYMENT_GAS_PRICE=1000000000 | |
GET_RECEIPT_INTERVAL_IN_MILLISECONDS=3000 | |
HOME_RPC_URL=https://api.s0.b.hmny.io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should prevent emitting the event twice when ERC677 used by relayTokens and ERC677 is not owned by token manager', async function() { | |
// Given | |
const erc677Token = await ERC677BridgeToken.new('test', 'TST', 18) | |
await erc677Token.mint(user, twoEthers, { from: owner }).should.be.fulfilled | |
contract = this.bridge | |
await contract.initialize( | |
bridgeContract.address, | |
mediatorContract.address, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "owner", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "address" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.11; | |
contract DepositsV2 { | |
event Deposited(address indexed payee, uint256 weiAmount); | |
event Withdrawn(address indexed payee, uint256 weiAmount); | |
mapping(address => uint256) private _deposits; | |
function deposit() public payable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.5.11; | |
contract Deposits { | |
event Deposited(address indexed payee, uint256 weiAmount); | |
event Withdrawn(address indexed payee, uint256 weiAmount); | |
function deposit() public payable { | |
emit Deposited(msg.sender, msg.value); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: contracts/libraries/SafeMath.sol | |
pragma solidity 0.4.24; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that throw on error | |
*/ | |
library SafeMath { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.24; | |
// File: contracts/IBridgeValidators.sol | |
interface IBridgeValidators { | |
function isValidator(address _validator) public view returns(bool); | |
function requiredSignatures() public view returns(uint256); | |
function owner() public view returns(address); | |
} |