Interact with deployed contract with ABI using Remix - ethereum

How can I interact with an already deployed contract on ether(not mine) using Remix without the source code, but I have the ABI.
The reason I want to do it is because some contract has more than 20 .sol files which I dont want to manually copy and paste into Remix.

Create a file with the name of the contract with .abi extension and paste the abi code inside of it.
Then go to" deploy and run transaction" tap and paste the contract address in the "At Address" file and press the button to get access to the functions that the contract exposes.

If you have the address of where the contract is deployed, in the "deploy and run" section of the remix, click on AtAdress under the Deploy button and enter your address. It will show you the deployed contracts.

Related

How does uniswap call the approve function

I am trying to build a no-code tool for users, I want to be able to transfer tokens on the user's behalf.
anytime I call the IERC20(token address).approvefunction, my metamask does not a return a screen like the attached image and the IERC20(token address).transferFrom function does not execute.
Approve function
tps://i.stack.imgur.com/NfyMC.png
Calling approve() function from within your contract would just approve tokens to be spend from your contract address - not from the user.
You need to invoke MetaMask popup from your frontend app - not from the contract.
Either using their request method, requesting a transaction to the token contract, with data field of the approve() function and its arguments.
Or with more high-level approach: Creating a frontend instance of web3js, ethers.js, or whichever library you prefer, connecting to the window.ethereum local provider, and then invoking the approve() function on the token contract from here. This will also open the MetaMask popup windows asking the user to sign the transaction.

Export contract address and ABI from Ethereum Remix

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.

My fork of Uniswap will not show my liquidity pools

How to recreate problem:
Go to this build...
https://gateway.pinata.cloud/ipfs/QmYv2TAkFNcDGG5jj9TT4G2qpVubgVP2NgHNoqn2wB71CR/build/#/swap
*DO NOT USE THIS IN MAINNET-ONLY RINKEBY
Click on the "pool" tab on the navbar after connecting your web3 enabled wallet such as metamask (make sure that your network is set to rinkeby, I only deployed contracts to that testnet!), and create a pool by clicking on "add liquidity" or "create".
The interface should let you go through with the transaction so make sure you have some test ETH on hand. The contracts created from that transaction will produce "Sushi LP Tokens"(Again not real ones, that just what I set the name to be so that it would be easily recognized.)I made sure to replace all of the contract addresses precompiled in the frontend interface with my own contracts that are listed below, even the uniswap/sdk mods.
The problem that I am having specifically is that the pool doesn't show up on the list of pairs in the modal as it usually does if you have used uniswap before. The strange thing is that it will show pools that I created on the live uniswap site using the rinkeby network.
I even created an init code hash just as instructed in this tutorial:https://blockchain.news/wiki/how-to-build-an-uniswap-exchange
I apologize in advance if this is not the correct way, place, or time to ask for help, but here I am, I am willing to work with anyone that knows how to set this up correctly.
Github:https://github.com/DarriusAlexander/uniswap-interface
My reputation is not very high so please refer to this reddit post that I created to get the contract address and metadata links.
https://www.reddit.com/r/ethdev/comments/n0hegy/please_helpi_forked_uniswap_for_a_personal/

How to deploy a contract from BSCScan onto the Binance Smart Chain?

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.

Ethereum contract code visualization

I am using Ethereum with testnet Rinkeby, I created a contract and deployed it. Is there a way to display the source code of that contract? I know that contact are immutable but I want just to have a look on the code.
There is currently no way to do this and probably will not be for a while, because the code is not published on the blockchain, just the byte code from the compilation. There are certain block explorers that can help like ether.camp that you can upload solidity code to then it can check against a given address to see if it matches. There is also a project that is scraping git to find the source code to match byte code.
http://etherscrape.com/about
So no once the code is deployed there is no easy way to see it.