Skip to content

feat: token implementation#188

Open
alexbarnsley wants to merge 5 commits intofeat/mainsailfrom
feat/token-implementation
Open

feat: token implementation#188
alexbarnsley wants to merge 5 commits intofeat/mainsailfrom
feat/token-implementation

Conversation

@alexbarnsley
Copy link
Member

Summary

https://app.clickup.com/t/86e00vrhr
https://app.clickup.com/t/86e00vrmd
https://app.clickup.com/t/86e00vrn9

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

Copilot AI review requested due to automatic review settings March 4, 2026 17:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds token-transfer ABI support and convenience encoding/building helpers to generate ERC-20 transfer calldata and submit it as an EvmCall transaction.

Changes:

  • Add TOKEN contract ABI type + Abi.Token.json artifact and register it in AbiBase.
  • Introduce TransactionEncoder utility for encoding common contract call payloads, including token transfer.
  • Add TokenTransferBuilder + corresponding unit tests for payload construction and signing/verifying.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Unit/Utils/TransactionEncoderTest.php Adds unit tests for encoded payload outputs (incl. token transfer) and invalid-address rejection.
tests/Unit/Transactions/Builder/TokenTransferBuilderTest.php Adds tests validating token transfer builder calldata and signature verification.
src/Utils/TransactionEncoder.php New utility for ABI-encoding calldata for multipayment, token transfer, usernames, and consensus calls.
src/Utils/AbiBase.php Registers ContractAbiType::TOKEN -> Abi.Token.json path.
src/Utils/Abi/json/Abi.Token.json Adds token ABI artifact containing transfer (and related) function definitions.
src/Transactions/Builder/TokenTransferBuilder.php Adds builder to construct EvmCall token transfer transactions using ABI encoding.
src/Enums/ContractAbiType.php Adds TOKEN enum case.
src/Enums/AbiFunction.php Adds TRANSFER function enum and maps it to EvmCall.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants