Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KIP-0010: Fungible regression test #17

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions kip-0010.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
KIP: 0010
Title: fungible-v2 Event Standard
Author: Stuart Popejoy stuart@kadena.io
Status: Draft
Type: Standard
Category: Pact
Created: 2021-04-16
---

## Abstract

This introduces the fungible token regression test script, which
acts as an "executable standard" for verifying token behavior.
In so doing, it also enforces the expected behavior of the
`TRANSFER` managed capability and event, so it is an
opportunity to document that behavior and specify new
requirements to enhance token balance tracking.

## Motivation

The token regression script was developed in early 2021 to test
a number of tokens in development, by capturing tests from `coin.repl`
in the Chainweb codebase and standardizing an approach that
would allow any token to be similarly regressed. As such it
also verifies the emission of `TRANSFER` events.

Events are a well-understood mechanism introduced by Ethereum, which
became part of Pact in version 3.6. The `fungible-v2` standard predates Pact events,
therefore events are not specified in the standard. This KIP
establishes the standard, and adds backward-compatible support
for burns/creates/crosschains.

## Backwards Compatibility

While `coin` does not directly implement the behaviors for burn/create
and gas events, Chainweb will be modified in version 3.8 to synthesize
them.

This also necessitates the ability to fire a managed capability as an
event with arbitrary parameters.

## Specification

See [fungible-v2.pact](kip-0005/fungible-v2.pact)

## References
* EIP-20: <https://eips.ethereum.org/EIPS/eip-20>
* ERC-1404: <https://github.com/ethereum/EIPs/issues/1404>
* ERC-1155: <https://blog.enjincoin.io/erc-1155-the-final-token-standard-on-ethereum-a83fce9f5714>