Skip to content

Lesson2: Why am i getting a prompt from remix IDE that pure and view cost gas? #5243

Answered by pacelliv
yeskaydee asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @yeskaydee, those gas estimates only apply when the pure and view functions are called by a contract, in that case gas will be charged.

view and pure function execute a READ operation as long they are invoked by an Externally Owned Account; this is an account that knows its private key, e.g. your Metamask wallet. In this case no gas will be charged.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@yeskaydee
Comment options

@yeskaydee
Comment options

@kartik-giri
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by yeskaydee
Comment options

You must be logged in to vote
5 replies
@kartik-giri
Comment options

@yeskaydee
Comment options

@alymurtazamemon
Comment options

@yeskaydee
Comment options

@alymurtazamemon
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants