TODO: write tests lol
Wraps ERC-20, ERC-721, and ERC-1155 tokens under a single unified contract.
flowchart TD
%% -- AnyWrapper --
AnyWrapper --> ERC20
ERC20 --> id0{Token ID:\naddress}
id0 --> bn([balanceOf])
id0 --> an([allowance])
id0 --> tsn([totalSupply])
id0 --> dn([decimals])
AnyWrapper --> ERC721
ERC721 --> idn1{"Token ID:\n hash(address + id )"}
idn1 --> balanceOf1([balanceOf])
idn1 --> allowance1([allowance])
idn1 --> total_supply1([totalSupply])
idn1 --> decimals1([decimals])
AnyWrapper --> ERC1155
ERC1155 --> idn2{"Token ID:\n hash(address + id )"}
idn2 --> balanceOf([balanceOf])
idn2 --> allowance([allowance])
idn2 --> total_supply([totalSupply])
idn2 --> decimals([decimals])
Maintains multiple fungible and non-fungible game assets at fixed swap rates.
flowchart TD
%% -- In Game Items --
mainCurrency[Main Currency\nid: 0] --> sc0[Sub Currency\nid: 1]
mainCurrency --> it0[Game Item\nid: 2]
mainCurrency --> it1[Game Item\nid: 3]
flowchart TD
a[Admin]
ps[Price Setter]
sh[Supply Handler]
s[Supply]
p[Price]
a --> ps
a --> sh
a --> s
a --> p
ps --> p
sh --> s
Transfer Helper Library
Transfer an amount
of an id
on an erc6909
contract to the receiver
from the current address.
function transfer(
address erc6909,
address receiver,
uint256 id,
uint256 amount
);
Transfer an amount
of an id
on an erc6909
contract from the sender
to the receiver
.
function transferFrom(
address erc6909,
address sender,
address receiver,
uint256 id,
uint256 amount
);