The Oraclize API has a bunch of methods that my contract doesn't use. I was going to delete a bunch of them to save on gas costs for deployment. Are there any other considerations I should be aware of? Couldn't find this practice recommended in the docs.

1 Answer 1


If you mean you're going to delete some methods in an interface you're consuming, there should be no harm, but I don't believe you'll see any gas savings. Interfaces you use shouldn't end up in the code you deploy in your contract.

  • 1
    The compiler figures out which functions your contract uses, so deleting unused API functions doesn't matter.
    – MaxBov
    Dec 21, 2017 at 18:56
  • That may be true, but interfaces shouldn't end up in the code at all ("used" or "unused"), because they're needed at compile time but aren't needed at all at runtime.
    – user19510
    Dec 21, 2017 at 19:05

Your Answer

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

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