Remix
A guide to interacting with the IBCO contracts using Remix
Interacting with the IBCO contracts via the Remix IDE is a simple way to get started. It requires minimal background of working with Solidity and the Ethereum blockchain.
Remix allows you to compile Solidity contract code (provided by us), and use those compilation artefacts to connect to the deployed IBCO contract addresses (also provided by us).
You are then able to use the Remix interface to interact with the contract's interfaces: make swaps for sEURO, bond your sEURO, stake your TST etc.

Compilation

Let's compile the contracts on Remix.
  1. 1.
    Run the Remix IDE within your browser by going here
  2. 2.
    You should find a list of folders on the left-side of the editor window – right-click the contracts folder and select New File
  3. 3.
    Name this file SEuroOffering.sol, for example, and copy over the contents of our own SEuroOffering contract into the code editor
  4. 4.
    Select the Solidity compiler from the left-side menu
  5. 5.
    Ensure that the compiler selected is 0.8.15 version, to match the pragma from the contract code, and click the Compile SEuroOffering.sol button
  6. 6.
    There will be a compile error, as many of the SEuroOffering contract's local dependencies are yet to be compiled
  7. 7.
    Repeat the process by adding a file called Drainable.sol, and copying the contents of our own Drainable.sol
  8. 8.
    Continually repeat this process until you have replicated the project structure of our contracts, and you are able to compile the contracts without error

Connecting to the contracts

Once you have compiled all the contracts that we want to test, you are able to connect to the live deployed contracts. This allows you to interact with the contracts directly from Remix.
  1. 1.
    Compile the SEuroOffering contract again (for example)
  2. 2.
    Go to the Deploy and Run section of the Remix editor
  3. 3.
    All of our contracts are currently deployed on Görli Test Network, so you're going to want to connect to that – open Metamask and make sure you're connected to the network
    If you need help getting started with Metamask, or adding the Görli network to Metamask, there's tons of guides out there
  4. 4.
    Once our Metamask is connected to Görli, we're going to use that as our remix environment, using the Injected Provider option
  5. 5.
    The selected account should be your active connected account in Metamask
  6. 6.
    The selected contract should be the last one you compiled, so you can go back to your project structure to compile whichever you'd like to interact with
  7. 7.
    To connect to the contract, you need to find the address of our deployed version of that contract, from our index of live contract address. Put that address as the At Address value and click At Address. You should find the contract's in the Deployed Contracts section below
  8. 8.
    Expand this deployed contract to see all the contracts interfaces that you can interact with. For instance you can see the status of the contract by clicking the read-only status interface
  9. 9.
    You can also interact with the contract in a bit more of an exciting way by sending transactions to the contract. Let's swap some Görli ETH for sEURO using the SEuroOffering contract!
  10. 10.
    The SEuroOffering swapETH interface is a payable function. It converts the value of the transaction for sEURO. Let's add some value to the transaction via Remix in the value field above
    I've added 10^17 wei, i.e. 0.1ETH
  11. 11.
    Find the swapETH interface and run the transaction, after confirming with Metamask, you should see the transaction sent in the logs below
    swapETH then confirm with Metamask when prompted
    Transaction has been sent, and you can track its progress with Etherscan
  12. 12.
    Once everything is completed, and the transaction is mined successfully, you'll get another message in the logs
  13. 13.
    You can explore the details of the transaction on Etherscan
    The 0.1 Ether value of my transaction was swapped for 192.38 sEURO, which were transferred to my wallet during the transaction

Congratulations!
🎉

You can use these processes to compile and interact with any of our live deployed contracts.
Bear in mind that some contract interactions will require you to interact with some external contract beforehand. There are some interfaces that require approving ERC20 allowances for our contracts, before sending a transaction.
You can achieve this is much the same way as to what you've done above, by compiling the ERC20 interface, connecting to a token contract, and sending approval transactions.
Good luck out there
🌻
Copy link
On this page
Compilation
Connecting to the contracts
Congratulations!