Skip to content

Implement execute_transfer for ERC-20 and STRK #90

@bitfalt

Description

@bitfalt

Description

Implement the functions responsible for transferring ERC-20 tokens and native STRK out of the treasury. These functions must be strictly permissioned.

Acceptance Criteria:

  1. The execute_transfer function is implemented for ERC-20 tokens.
    • It is decorated with the _only_governance() check.
    • It makes an external call to the transfer function of the specified token_address.
  2. A separate execute_eth_transfer(recipient: ContractAddress, amount: u256) function is implemented for native STRK.
    • It is also decorated with the _only_governance() check.
    • It uses the transfer method to send STRK to the recipient.
  3. The contract correctly implements the #[receive] attribute to be able to accept incoming STRK deposits.
  4. A FundsWithdrawn event is emitted upon successful transfer, logging the token, amount, and recipient.

Metadata

Metadata

Assignees

Labels

onlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions