Skip to main content
All CollectionsCustom Transactions
Interact with any contract from a colony
Interact with any contract from a colony

How to perform custom contract interactions with Arbitrary transactions

Updated over 4 months ago

With Arbitrary transactions ability to interact with any EVM based contract from a colony, this feature truly opens up the possibilities to be able to perform an, as the name implies, an “arbitrary” number of actions using the many governance mechanisms that Colony allows for.

Understanding how to effectively add and manage contract interactions is crucial to leveraging this powerful feature.

Key Benefits:

  • Direct interaction with external smart contracts

  • Expanded functionality within the colony ecosystem

  • Seamless integration with the broader Ethereum network

Adding a New Contract Interaction

Each row in the Arbitrary Transactions section represents a separate contract interaction. Follow these steps to add a new interaction:

  1. Access the Arbitrary Transactions Section

    • Navigate to the actions side panel and select the Arbitrary Transaction action type.

  2. Initiate a New Contract Interaction

    • Click on the "Add Transaction" button to open the Contract Interaction Modal.

  3. Enter Contract Address

    • In the modal, locate the "Contract Address" field.

    • Input the exact contract address of the contract you wish to interact with.

  4. ABI Population

    • The ABI (Application Binary Interface) field should automatically populate based on the entered contract address.

    • Note: The ABI defines the available methods and events in the contract.

    • If there is an issue generating the ABI, or the generated one is incorrect, you can manually enter one in.

  5. Select Contract Method

    • Use the generated dropdown menu to choose the desired method from the contract you want to interact with.

    • Available options are determined by the provided ABI.

  6. Enter Method Parameters

    • Upon selection the method fields will appear.

    • Fill in the required parameters for the selected method.

    • These may include addresses, amounts, or other specific data.

  7. Review and Confirm

    • Double-check all entered information for accuracy.

    • Click the button to confirm the transaction and add it to the Arbitrary Transactions table.

  8. Add Additional Transactions (Optional)

    • Repeat the process to add more contract interactions if needed.

Creating the Arbitrary Transaction Action

After adding all desired contract interactions, follow these steps to complete the process:

  1. Complete Action Details

    • Provide any additional information required for the action.

    • This may include descriptions or notes relevant to the transaction.

  2. Select Decision Method

    • Choose the Decision method for the transaction.

    • Options may include Permissions, Multi-sig, or Reputation. This will depend on your colony and the authority you have.

  3. Finalize the action

    • Once approved through the chosen decision method, the contract interactions can be executed.

Potential Use Cases

Arbitrary transactions offer a wide range of possibilities. Here are some ideas to inspire your use of this feature:

  1. Protocol Management

    • Adjust protocol fees

    • Update configurable parameters

  2. External Protocol Engagement

    • Perform token swaps

    • Engage in yield farming

    • Participate in lending protocols

  3. Token Operations

    • Mint new tokens using your own managed token contracts

  4. Fund Management

    • Transfer and manage funds outside of the colony's ecosystem

  5. Governance Actions

    • Propose and execute governance decisions on external protocols

  6. Integration with DeFi Platforms

    • Participate in staking activities

    • Deposit collateral into lending platforms

    • Claim rewards from staking protocols

Best Practices and Tips

  1. Thorough Testing: Always test interactions on a testnet before executing on mainnet.

  2. Gas Optimization: Be mindful of gas costs, especially for complex interactions.

  3. Security First: Double-check contract addresses and parameters to avoid errors.

  4. Use the redo feature: Use the "Redo action" feature to more easily repeat the same or similar contract interactions in future.

  5. Community Consultation: For significant actions, consider discussing with other members before execution.

Troubleshooting

If you encounter issues while using Arbitrary Transactions, try the following:

  1. Verify the contract address and ABI are correct.

  2. Ensure you have sufficient permissions within the colony to perform the action.

  3. Ensure you have sufficient permissions with the target contract to perform the action.

  4. Check that you have enough funds to execute the transaction.

  5. If a transaction fails, review the error message and consult Colony documentation or support channels.

Did this answer your question?