Skip to content

Instantly share code, notes, and snippets.

Last active February 18, 2019 19:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
// This is an alpha contract designed to be proxied
// It is NOT production ready
contract Nonfungiblizer {
bool initDone;
address owner;
address asset;
uint256 value;
constructor () {}
function init(address _asset, uint256 _value) {
require(_value > 0, '_value must be greater than 0');
IERC20(_asset).transferFrom(msg.sender, address(this), _value),
'transferFrom failed'
asset = _asset;
value = _value;
initDone = true;
function withdraw(address _recipient) {
require(msg.sender == owner);
IERC20(_asset).transfer(_recipient, value);
function transfer(address _newOwner) {
require(msg.sender == owner);
owner = _newOwner;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment