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,370 points
616 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
• 26,740 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,100 points
737 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 6, 2018 in Blockchain by aryya
• 7,460 points
825 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,370 points
1,213 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
1,953 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,479 views
+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,610 points
1,480 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
• 26,740 points
1,601 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
• 26,740 points
1,177 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP