Skip to content

Adding External Contracts to Eidolon

The Add Contract tool in Eidolon.Unity allows you to easily add external contracts for use within your Eidolon project. With this tool, you can specify contract details such as the contract name, address, ABI, and standard, making it simple to integrate external contracts into your blockchain-powered game. Here’s how to use the “Add Contract” tool:

Opening the “Add Contract” Window

  1. Launch the Unity Editor.

  2. Go to the Eidolon menu in the Unity Editor.

  3. Select My Contracts and then click on Add Contract.

Add Contract Menu

Adding External Contracts

The Add Contract window provides a straightforward interface for adding external contracts to your project:

Add Contract

Contract Name

  • Enter a suitable name for your contract in the Contract Name field.
  • This name will help you identify and reference the contract within your Eidolon project.

Contract Address

  • Specify the contract’s address in the Contract Address field.
  • Ensure that you provide the correct address to interact with the contract on the blockchain.

Contract ABI

  • Enter the contract’s ABI (Application Binary Interface) in the Contract ABI field.
  • The ABI defines how to interact with the contract’s methods and data.
  • Ensure that you provide the accurate ABI.

Contract Standard (Optional)

  • Optionally, you can specify the contract standard in the Contract Standard field.
  • This field is useful for indicating the contract’s standard, such as ERC-20 or ERC-721.
  • Leaving it blank is acceptable if the contract doesn’t adhere to a specific standard.

Adding the Contract

Once you’ve filled in all the required fields:

  1. Click the Add Contract button.

  2. The tool will validate the provided information and add the contract to your project.

  3. If the contract details are valid, you’ll see a “Contract saved!” message in the console.

  4. The Add Contract window will automatically close after successfully adding the contract.

Final Notes

The Add Contract tool simplifies the process of incorporating external contracts into your Eidolon project. By specifying contract details, you can seamlessly manage and interact with these contracts, enhancing the blockchain integration in your game development.

Start adding external contracts effortlessly with the Add Contract tool and unlock new possibilities for your Eidolon project.