Non-Payable Contracts showing balance #4
Unanswered
gitshreevatsa
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I guess it's possible. I'm not familiar with hardhat plugin but it's possible to transfer some amount of tokens to non-existent contract. Then if you send external deployment message you pay for deployment from that tokens. Finally, you see the remaining amount of that tokens. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was writing a contract with the following code:
When I deploy the contract and set the pubKey using my deployment script :
After successfully deploying the contract, using the CLI I queried for the balance using the command:
This returned me the following:
My question is how did the contract get balance while there was no payable constructor nor did I send any amount to the contract address previously?
Beta Was this translation helpful? Give feedback.
All reactions