Skip to content

Instantly share code, notes, and snippets.

Spreading the love

Gonçalo Sá GNSPS

Spreading the love
View GitHub Profile
izqui / forwarder.sol
Last active Mar 30, 2019
Very cheap to deploy (66k gas) forwarder contracts that can clone any contract and still have their own storage
View forwarder.sol
// Bytecode origin
// Modified version of Vitalik's
// Credits to Jordi Baylina for this way of deploying contracts
// Forwarder is slightly modified to only return 256 bytes (8 normal returns)
// Deployed Factory in Kovan:
// Example of a Forwarder deploy using the Factory:
// Just 66349 gas per contract
alex-miller-0 /
Created Mar 6, 2018
Meta-Non-Fungible Token

Meta-Non-Fungible Token

Non-fungible tokens (NFTs) are all the rage these days, but their current manifestation (ERC721) is inefficient. It is not possible to move multiple tokens at the same time or package multiple tokens for e.g. deposit into a plasma child chain.

Contract pseudocode

The following is a new design for an NFT token that allows aggregation of assets. The rest of the functionality can be inherited from ERC721.

contract NFT {
  tokens mapping(address => mapping(bytes32 => uint));
You can’t perform that action at this time.