I deployed smart contract, not verified I need same deployed code. I have live smart contract but not its code and sol file
Related
Remix is telling me "Currently you have no contract instances to interact with." But that's because Remix Won't Allow me to deploy my contract. Please Help I'm new to thisPicture of my remix smart contract
You have not compiled your smart contract. You need to first compile your smart contract only then you can deploy your smart contract.
For a number of reasons, Ethereum Remix is great for developing in Solidity. However, I need to integrate what I develop there into some other Web3 front end stuff. So after each time I deploy a smart contract in Remix I have to copy and paste the contracts address as well as the ABI into another IDE so it can interact with the Web3 frontend.
Is there some sort of way to do the step of copying the contract address and ABI from Remix into a text file on my local system? I couldn't find a Remix API. Was wondering if anyone has another idea.
Is there a way to automate an ERC20 token deploy? Can a contract receive some parameters to configure the new token and then deploy it returning the new token address?
I'm trying to create a contract that speaks with a dapp which instructs the contract to create and then deploy a given ERC20 token with the given parameters (name, sym, decimals...)
Is this possible?
I've found that a Dapp can deploy a contract:
https://ethereum.stackexchange.com/questions/36698/deploying-a-smart-contract-using-dapp
But can a contract deploy a contract? Is this too pricy?
But can a contract deploy a contract?
Yes. A contract can deploy a contract.
See for example Uniswap v2 UniswapV#Factory deploying pair contracts using CREATE2 (deterministic deployed contract addresses).
Is this too pricy?
This is a business model question and cannot be answered based on the information you provided in the question.
as most of the BEP20-Tokens-Contracts are online available on GitHub or BSCScan you should be able to just copy the code and paste it into remix.ethereum.org and deploy it. I did that and the contract deployed successfully to the BSC but the token information are missing. What do I do wrong?
Here is the code I copied: https://bscscan.com/address/0x0cF011A946f23a03CeFF92A4632d5f9288c6C70D#code
and here is my contract deployed to the BSC: https://bscscan.com/address/0xf5be6f7f00a4870b46f3ab6d16f5095731da97d7
I have just changed the name of the token, but the token information are not showing up on BscScan nor do I see the token in my Wallet. Any help is appreciated!
Your contract's bytecode contains just the Address contract bytecode. Since it's the first contract in the list (sorted alphabetically), I assume you simply forgot to select the contract that you wanted to compile.
You need to select the NyanCatToken contract (which effectively imports the Address as well) when compiling in Remix.
I am trying to write upgradable smart contract in ethereum. Can anyone give an example of upgradable smart contract in ethereum and accessing data.
To write an upgradable smart contract I suggest you do the following (works for me):
Create a storage contract on which you will store all your map and variables. Add a modifier to the functions changing state. This modifier should require that an address must be present in a specific map (let’s call it authorized) to change the state of map or variable. Place the owner’s address in that map.
Write a function to authorize external address on the storage contract
Deploy another contract containing the logic of your app.
Autorise the logic contract on the storage contract.
Upon upgrade of the logic, deny access to the storage contract from the logic contract, deploy your upgraded logic and link the new contract to the storage.
Tadaa you now have an upgradable set of smart contracts.
Smart Contract cannot be replaced, but you can create a smart contract proxy to be able to replace the calling of all new Smart Contract functions (previous smart contracts cannot be removed on the main network ethereum).
Complete explanation and examples can be seen Here
You can implement follow Proxy Pattern
Blog
https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357
Smart contract upgradability is a state of the art area. Currently, there are a few solutions, but each of them has its own pros and cons. Here are the solutions with examples:
https://consensys.github.io/smart-contract-best-practices/software_engineering/