0

I just have a question in my mind. can I use the contracts which are already deployed so that I can use them without even myself have to deploy it again.

For example, take SafeMath I think I would have been deployed already on the network.how can I use it.

2 Answers 2

1

Yes.

Any deployed contract is usable by invoking its public methods. Some contract method invocation maybe restricted using specific addresses (ex :onlyOwner modifiers).

To use a contract, you need to have their address :

address.call(bytes4(keccak256("MethodName(arguments)")),argumentsValue)

You should also check this answer for better understanding : Calling function from deployed contract

1

Yes, if you know the address and the function is public, anyone can call it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.