Skip to content

Instantly share code, notes, and snippets.

View geopayme's full-sized avatar

Antonios Valamontes geopayme

View GitHub Profile
@geopayme
geopayme / AccredetedInvestor.sol
Created September 29, 2019 11:16 — forked from sandeep1116/AccredetedInvestor.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
/*
Reg S -
This is for USA companies raising money outside USA.
This can have a 6 Month or a 1 year lockin.
(KYC/AML has to be done). The other rule is that these tokens cannot be sold to a USA person for a 1 year period.
*/
pragma solidity ^0.4.24;
contract RegSInvestorContract
{
@geopayme
geopayme / CowOwnership
Created September 29, 2019 11:12 — forked from yuyasugano/CowOwnership
Cow ownership smart contract
pragma solidity ^0.4.23;
import "./CowBreeding.sol";
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
/**
* @title ERC721 compatible Cow Standard Basic Implementation
* @dev Implements Cow transfer with inherited OpenZeppelin ERC721
*/
contract CowOwnership is CowBreeding, ERC721 {
@geopayme
geopayme / TokenForNTFTrader.sol
Created September 29, 2019 11:10 — forked from ecp4224/TokenForNTFTrader.sol
A decentralized way of selling NonFungible tokens for ERC20 tokens
/**
* Offers a decentralized way of selling ERC721 for ERC20 tokens
* This proposes a ERC20721Trader smart contract where the seller
* is the owner of the contract is the buyer is anyone invoking
* the trade() function. Check the ERC20721Trader contract
* at the bottom of this file
*/
pragma solidity ^0.4.21;
@geopayme
geopayme / ItemFeature.sol
Created September 29, 2019 11:08 — forked from Luiserebii/ItemFeature.sol
ItemFeature truffle-flattener code for Etherscan verification
// File: contracts/ein/util/EINOwnable.sol
pragma solidity ^0.5.0;
/**
* @title EINOwnable
* @dev The EINOwnable contract has an owner EIN, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
@geopayme
geopayme / 721DAO.sol
Created September 29, 2019 11:06 — forked from andy8052/721DAO.sol
pragma solidity ^0.4.24;
import 'github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC721/ERC721Full.sol';
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/ownership/Ownable.sol";
contract KorroDAO is Ownable {
using SafeMath for uint;
mapping(uint => address) public tokenToOwner;
@geopayme
geopayme / Gateway.sol
Created September 29, 2019 11:05 — forked from OndroS/Gateway.sol
pragma solidity ^0.4.24;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol";
import "./ERC20Receiver.sol";
import "./ValidatorManagerContract.sol";
@geopayme
geopayme / transaction-handling.js
Created September 29, 2019 11:02 — forked from jamesmorgan/transaction-handling.js
transaction-handling.js
contract
.purchase(edition.edition, {
from: account,
value: priceInWei
})
.on('transactionHash', hash => {
console.log('Purchase transaction submitted', hash);
})
.on('receipt', receipt => {
console.log('Purchase successful - Ive been mined', receipt);
@geopayme
geopayme / erc-721-enhanced-metadata.json
Created September 29, 2019 11:01 — forked from jamesmorgan/erc-721-enhanced-metadata.json
erc-721-enhanced-metadata.json
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents",
},
"description": {
"type": "string",
@geopayme
geopayme / metadata.json
Created September 29, 2019 11:00 — forked from jamesmorgan/metadata.json
metadata example
{
"name": "Buzz",
"description": "Paper collage, using salvaged and original watercolour papers",
"image": "https://ipfs.infura.io/ipfs/QmWc6YHE815F8kExchG9kd2uSsv7ZF1iQNn23bt5iKC6K3/image",
"meta": "https://ipfs.infura.io/ipfs/QmWc6YHE815F8kExchG9kd2uSsv7ZF1iQNn23bt5iKC6K3/other"
}
/**
* Change a currency symbol
*/
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'AUD': $currency_symbol = 'AUD$'; break;
}
return $currency_symbol;