How connect library to smart contract from external resources?

0 votes
pragma solidity ^0.4.15;

import './ERC20.sol';
import './SafeMath.sol';

How connect SafeMath.sol from external(non-local) resourses?

Sep 26, 2018 in Blockchain by slayer
• 29,050 points
21 views

1 answer to this question.

0 votes
pragma solidity ^0.4.0;

import "github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol";

contract MathExtended {
    using SafeMath for uint;
    function exec(uint a, uint b) returns (uint){
        return a.add(b);
    }
}
To know more, visit: http://solidity.readthedocs.io/en/develop/layout-of-source-files.html
answered Sep 26, 2018 by digger
• 27,630 points

Related Questions In Blockchain

0 votes
1 answer

How is a request sent from an app to a smart contract?

Yes, the contract is distributed by every node ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,010 points
44 views
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 5, 2018 in Blockchain by ariaholic
• 7,320 points
45 views
0 votes
1 answer

How to call smart contract methods from transactions?

You can do this using a wrapper. ...READ MORE

answered Aug 13, 2018 in Blockchain by slayer
• 29,050 points
37 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
123 views
0 votes
1 answer
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
127 views
0 votes
1 answer

How do I send ether from an EOA to a smart contract?

You include ether to send in the ...READ MORE

answered Sep 27, 2018 in Blockchain by digger
• 27,630 points
47 views
0 votes
1 answer

How to use real world/live data in my smart contract?

You cant access/embed real world data using ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 27,630 points
54 views