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.

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, privacy policy and cookie policy

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