Search code examples
ethereumsoliditysmartcontracts

How to publish smart contracts via computer without paying anything


my friends. There is a confusing question, and I did not find any answer to it that explains it directly. How to create a token and publish it on any Block Chain network or any other network, Ethereum, etc., etc., via the computer, and it is published without the need for a website. https://remix.ethereum.org/ Who requests payment every time in random amounts, and sometimes they are very expensive. Is there a solution to this question or an answer and an educational explanation of how to make it? Thank you.

I tried searching and did not find anything useful to solve this problem or request


Solution

    1. can we avoid fee? No.

    Deploying contracts, interacting with it(to change values, eg), making transfers... All these kind of transactions which will change the status of the chain shall cost fee, known as 'gas'. There is no way of doing such things without a payment. Think block chain as a book of notes, whenever you need to add/change/delete anything/something on/from it, you should pay some fee to the book keeper. Or no one would be willing to keep the book.

    1. can we avoid fee from 'deploying from computer instead of remix'? No.

    Consider remix to be a platform to easy the process of deploying/interacting. Some other popular frameworks(as 'via computer' in your question) like hardhat, foundry, waffle do pretty much the same thing from a code level(you write your own deployment script, etc).

    1. Why is the fee changing sometimes and why is it expensive sometimes. In a easiest way to explain this, 2 major reasons are,
    • The 'price' of the gas varies depending on where and how you deploy your contracts. (different books have different fee for you to alter)
    • The bigger/more complicated your contract/logic is, more gas shall be used for deploying/interacting.(the more you want to change on the book, the more you pay)
    1. suggestions

    If you are new to blockchain and are only interested in learning, remix does have a local network for you to deploy and interact with contracts in local environment which still cost fee, but just like a simulation. When you move on to 'via computer level', you should probably be familiar with the concept of how block chain works, then use test networks (bsc testnet / sepolia, etc), where you can claim currencies(the token to pay gas) for free, so you don't have to spend real money, either.