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: Non-Fungible Key Bound Token #6809

Merged
merged 30 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fa4ad01
Added a draft EIP for non-fungible tokens.
KBTStandardAdmin Mar 31, 2023
03fa184
ERC Link + First 2 Footnote Links Changed
KBTStandardAdmin Mar 31, 2023
931a9d7
ERC Link 721
KBTStandardAdmin Mar 31, 2023
4e1d50e
PR Changes
KBTStandardAdmin Mar 31, 2023
5fc97c2
PR Changes
KBTStandardAdmin Mar 31, 2023
ff6f6b3
PR Changes
KBTStandardAdmin Mar 31, 2023
68e0d9a
Fixing EIP Walidator errors (#1)
KBTStandardAdmin Mar 31, 2023
f71511a
Renamed the file according to EIP Walidator
KBTStandardAdmin Mar 31, 2023
53c8764
Fixing Markdown linter errors
KBTStandardAdmin Mar 31, 2023
09aa994
Fixing Markdown linter errors
KBTStandardAdmin Mar 31, 2023
877dcf8
Fixing Markdown linter errors
KBTStandardAdmin Mar 31, 2023
9f3c446
Adde the contract with tests in the assets folder
KBTStandardAdmin Apr 1, 2023
a7cef29
Updated the EIP with the proper relative repo links
KBTStandardAdmin Apr 1, 2023
930f179
Added diagram and mention it the reference implementation.
KBTStandardAdmin Apr 1, 2023
ba76be1
Merge branch 'ethereum:master' into master
KBTStandardAdmin Apr 8, 2023
9a65cff
Merge branch 'ethereum:master' into master
KBTStandardAdmin Apr 11, 2023
441d3f1
Update eip-6809.md
NickZCZ Apr 14, 2023
9802e98
rationale fix and update
MihaiORO Apr 14, 2023
180e963
backwards compatibility section
MihaiORO Apr 14, 2023
e5a7e61
security considerations changes
MihaiORO Apr 14, 2023
6a5a3e9
Footnotes Updated
NickZCZ Apr 14, 2023
bf0d50c
non-fungible update
NickZCZ Apr 14, 2023
6918a43
Applying markdown preferred style
NarcisCRO Apr 15, 2023
89f6237
Fixing PR comments and issues (#3)
NarcisCRO Apr 18, 2023
f8481f8
Fixed the licence in the KBT contract
NarcisCRO Apr 18, 2023
241cff1
Small fix related to diagram extension and corrected a footnote.
NarcisCRO Apr 18, 2023
93ee82a
Renumbered the footnotes and removed the unused ones
NarcisCRO Apr 18, 2023
fa51558
Fixing the last pr commments (#4)
NarcisCRO Apr 25, 2023
12d5eee
FIxing html markdowns and linter issues
NarcisCRO Apr 25, 2023
90a9238
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
517 changes: 517 additions & 0 deletions EIPS/eip-6809.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions assets/eip-6809/.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-6809/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-6809/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EIP 6809 implementation

This project is a reference implementation of EIP-6809.

Try running some of the following tasks:

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

interface IKBT721 {
event AccountSecured(address indexed _account, uint256 _noOfTokens);
event AccountResetBinding(address indexed _account);
event SafeFallbackActivated(address indexed _account);
event AccountEnabledTransfer(
address _account,
uint256 _tokenId,
uint256 _time,
address _to,
bool _anyToken
);
event AccountEnabledApproval(
address _account,
uint256 _time,
uint256 _numberOfTransfers
);
event Ingress(address _account, uint256 _tokenId);
event Egress(address _account, uint256 _tokenId);

struct AccountHolderBindings {
address firstWallet;
address secondWallet;
}

struct FirstAccountBindings {
address accountHolderWallet;
address secondWallet;
}

struct SecondAccountBindings {
address accountHolderWallet;
address firstWallet;
}

struct TransferConditions {
uint256 tokenId;
uint256 time;
address to;
bool anyToken;
}

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 _tokenId,
uint256 _time,
address _to,
bool _allTokens
) 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 returns (bool);

function isSecureToken(uint256 _tokenId) external returns (bool);
}
Loading