Avascriptions
  • Avascriptions
    • Depoly
    • Mint
    • Transfer
  • ASC-20
    • Deploy
    • Mint
    • Transfer
    • List
    • Transaction process
    • Index Rules
  • ASIPS
    • What are ASIPs?
    • Accepted ASIPs
      • ASIP-1: Smart Contract Avascription ASC-20 Transfers
      • ASIP-2: Safe Trustless Smart Contract ASC20-Token Escrow
  • Marketplace
    • Verified Badge
  • Developer Service
    • ASC-20
      • Get ASC-20 List
      • Get ASC-20 Ticker Info
      • Get ASC-20 Balance Of The Address
      • Get ASC-20 Holders
      • Get ASC-20 Ticker History
      • Get ASC-20 History By Block
      • Get ASC-20 Ticker Last History
      • Get ASC-20 Records By TxId
      • Get Address ASC-20 History
      • Get Address ASC-20 Last History
    • Marketplace
      • Get ASC-20 Market List
      • Get ASC-20 Market Info
    • Legal Disclaimer
  • Official Links
Powered by GitBook
On this page
  • Specification
  • Rationale
  1. ASIPS
  2. Accepted ASIPs

ASIP-1: Smart Contract Avascription ASC-20 Transfers

This ASIP is LIVE

Specification

Incorporate one new smart contract event into the Avascriptions Protocol:

event avascriptions_protocol_TransferASC20Token(
    address indexed from,
    address indexed to,
    string indexed ticker,
    uint256 amount
)

Event signature:

// "0x8cdf9e10a7b20e7a9c4e778fc3eb28f2766e438a9856a62eac39fbd2be98cbc2"
keccak256("avascriptions_protocol_TransferASC20Token(address,address,string,uint256)")

When a contract emits the avascriptions_protocol_TransferASC20Token event, it signifies that the protocol is registering a valid ASC-20 token transfer from the emitting contract to the recipient. This transfer is valid if the emitting contract possesses a sufficient number of corresponding tokens at the time of emitting the event, and the event is emitted in block number 38896000 or a later block.

In the case of multiple valid events, they should be sequentially processed based on their log index. Additionally, if the input data of the transaction also represents a valid transfer, this transfer will take precedence and be processed before any event-based transfers.

Rationale

ASC-20 Tokens are transferable to any address, enabling their ownership by smart contracts. However, the current limitation exists wherein smart contracts are unable to directly transfer or create these avascriptions themselves. This restriction hampers the development of protocol dApps relying on smart contracts, such as marketplaces.

To address this, the proposal outlines a direct and cost-effective mechanism that enables smart contracts to carry out ASC-20 token transfers.

Important note: ticker must be converted to lowercase or the indexer will not recognize it!

PreviousAccepted ASIPsNextASIP-2: Safe Trustless Smart Contract ASC20-Token Escrow

Last updated 1 year ago