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

Add EIP: Fungible Key Bound Token #6808

Merged
merged 26 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ab8e00f
Added a draft EIP for fungible tokens.
KBTStandardAdmin Mar 31, 2023
7e6d5dc
Fix for repository, test cases and wesite URLs
KBTStandardAdmin Mar 31, 2023
a93ac0b
Fix ERC-20 link
KBTStandardAdmin Mar 31, 2023
343e104
Fixing EIP Walidator errors
KBTStandardAdmin Mar 31, 2023
eef85f5
Fixing EIP Walidator errors
KBTStandardAdmin Mar 31, 2023
5970bd1
Fixing EIP Walidator errors
KBTStandardAdmin Mar 31, 2023
c31d6ed
Renamed the file according to EIP Walidator
KBTStandardAdmin Mar 31, 2023
a21b137
Fixing Markdown linter errors
KBTStandardAdmin Mar 31, 2023
012ab02
Fixing Markdown linter errors
KBTStandardAdmin Mar 31, 2023
b5716f5
Adde the contract with tests in the assets folder
KBTStandardAdmin Apr 1, 2023
99df089
Updated the EIP with the proper relative repo links
KBTStandardAdmin Apr 1, 2023
eea4c71
Added diagram and mention it the reference implementation.
KBTStandardAdmin Apr 1, 2023
48e4be9
Fixing EIP Walidator errors
KBTStandardAdmin Apr 4, 2023
64fa009
Fixing EIP Walidator errors
KBTStandardAdmin Apr 4, 2023
e65b0d6
Merge branch 'ethereum:master' into master
KBTStandardAdmin Apr 8, 2023
a7e3a19
Merge branch 'ethereum:master' into master
NarcisCRO Apr 11, 2023
360cbdc
Fixing PR comments and issues (#2)
NarcisCRO Apr 18, 2023
174475d
Fixed the licence in the KBT contract
NarcisCRO Apr 18, 2023
38ea9f2
Small fix related to diagram extension and corrected a footnote.
NarcisCRO Apr 18, 2023
c808abd
Fixing makdown linter errors
NarcisCRO Apr 18, 2023
c75a202
Renumbered the footnotes and removed the unused ones
NarcisCRO Apr 18, 2023
355e4c4
Fixed small Typo
NarcisCRO Apr 18, 2023
8f7bd23
Fixing the last pr commments (#3)
NarcisCRO Apr 25, 2023
26663e1
FIxing html markdowns and linter issues
NarcisCRO Apr 25, 2023
a52c839
Fixing html markdowns and linter issues
NarcisCRO Apr 25, 2023
567b1e4
Apply suggestions from code review
NarcisCRO May 2, 2023
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
520 changes: 520 additions & 0 deletions EIPS/eip-6808.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions assets/eip-6808/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build/
.env
.vscode
package-lock.json
1 change: 1 addition & 0 deletions assets/eip-6808/Contract Interactions diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/eip-6808/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EIP 6808 implementation
NarcisCRO marked this conversation as resolved.
Show resolved Hide resolved

This project is a reference implementation of EIP-6808.

Try running some of the following tasks:

```shell
npm i
truffle compile
truffle test
```
89 changes: 89 additions & 0 deletions assets/eip-6808/contracts/IKBT20.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

interface IKBT20 {
event AccountSecured(address _account, uint256 _amount);
event AccountResetBinding(address _account);
event SafeFallbackActivated(address _account);
event AccountEnabledTransfer(
address _account,
uint256 _amount,
uint256 _time,
address _to,
bool _allFunds
);
event AccountEnabledApproval(
address _account,
uint256 _time,
uint256 _numberOfTransfers
);
event Ingress(address _account, uint256 _amount);
event Egress(address _account, uint256 _amount);

struct AccountHolderBindings {
address firstWallet;
address secondWallet;
}

struct FirstAccountBindings {
address accountHolderWallet;
address secondWallet;
}

struct SecondAccountBindings {
address accountHolderWallet;
address firstWallet;
}

struct TransferConditions {
uint256 amount;
uint256 time;
address to;
bool allFunds;
}

struct ApprovalConditions {
uint256 time;
uint256 numberOfTransfers;
}

function addBindings(
address _keyWallet1,
address _keyWallet2
) external returns (bool);

function getBindings(
address _account
) external view returns (AccountHolderBindings memory);

function resetBindings() external returns (bool);

function safeFallback() external returns (bool);

function allowTransfer(
uint256 _amount,
uint256 _time,
address _to,
bool _allFunds
) external returns (bool);

function getTransferableFunds(
address _account
) external view returns (TransferConditions memory);

function allowApproval(
uint256 _time,
uint256 _numberOfTransfers
) external returns (bool);

function getApprovalConditions(
address account
) external view returns (ApprovalConditions memory);

function getNumberOfTransfersAllowed(
address _account,
address _spender
) external view returns (uint256);

function isSecureWallet(address _account) external view returns (bool);
}
Loading