diff --git a/suchwowx/config.py b/suchwowx/config.py
index 8468944..c9d10f6 100644
--- a/suchwowx/config.py
+++ b/suchwowx/config.py
@@ -22,661 +22,736 @@ TEMPLATES_AUTO_RELOAD = getenv('TEMPLATES_AUTO_RELOAD', True)
# Contract
CONTRACT_TESTNET = getenv('TESTNET', True)
-CONTRACT_ADDRESS = '0x9797afc5d0258704109f71109188fdcba19c24c2' # Fuji
+if CONTRACT_TESTNET:
+ WOWX_ADDRESS = '0xc6B039b1e0be1ba0B433f319898438E782E5dEBA' # WOWX testnet
+ CONTRACT_ADDRESS = '0xE1b6483729557E539cfD9c3Bdb754C54c16cFCe7' # SWX testnet
+else:
+ WOWX_ADDRESS = '0xba5dc7e77d150816b758e9826fcad2d74820e379' # WOWX mainnet
+ CONTRACT_ADDRESS = '' # SWX mainnet
CONTRACT_ABI = [
{
- 'inputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'constructor'
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "wowxAddress",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
},
{
- 'anonymous': False,
- 'inputs': [
+ "anonymous": False,
+ "inputs": [
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'owner',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'approved',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "approved",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "indexed": True,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'Approval',
- 'type': 'event'
+ "name": "Approval",
+ "type": "event"
},
{
- 'anonymous': False,
- 'inputs': [
+ "anonymous": False,
+ "inputs": [
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'owner',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'operator',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
},
{
- 'indexed': False,
- 'internalType': 'bool',
- 'name': 'approved',
- 'type': 'bool'
+ "indexed": False,
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
}
],
- 'name': 'ApprovalForAll',
- 'type': 'event'
+ "name": "ApprovalForAll",
+ "type": "event"
},
{
- 'anonymous': False,
- 'inputs': [
+ "anonymous": False,
+ "inputs": [
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'previousOwner',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'newOwner',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
}
],
- 'name': 'OwnershipTransferred',
- 'type': 'event'
+ "name": "OwnershipTransferred",
+ "type": "event"
},
{
- 'anonymous': False,
- 'inputs': [
+ "anonymous": False,
+ "inputs": [
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'from',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'address',
- 'name': 'to',
- 'type': 'address'
+ "indexed": True,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
},
{
- 'indexed': True,
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "indexed": True,
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'Transfer',
- 'type': 'event'
+ "name": "Transfer",
+ "type": "event"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'to',
- 'type': 'address'
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
},
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'approve',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "approve",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'owner',
- 'type': 'address'
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
}
],
- 'name': 'balanceOf',
- 'outputs': [
+ "name": "balanceOf",
+ "outputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'contractCreator',
- 'outputs': [
+ "inputs": [],
+ "name": "contractCreator",
+ "outputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'contractTipCutPercent',
- 'outputs': [
+ "inputs": [],
+ "name": "contractTipCutPercent",
+ "outputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'contractVersion',
- 'outputs': [
+ "inputs": [],
+ "name": "contractVersion",
+ "outputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'getApproved',
- 'outputs': [
+ "name": "getApproved",
+ "outputs": [
{
- 'internalType': 'address',
- 'name': '',
- 'type': 'address'
+ "internalType": "address",
+ "name": "",
+ "type": "address"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'owner',
- 'type': 'address'
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
},
{
- 'internalType': 'address',
- 'name': 'operator',
- 'type': 'address'
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
}
],
- 'name': 'isApprovedForAll',
- 'outputs': [
+ "name": "isApprovedForAll",
+ "outputs": [
{
- 'internalType': 'bool',
- 'name': '',
- 'type': 'bool'
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'name': 'metadataTokenId',
- 'outputs': [
+ "name": "metadataTokenId",
+ "outputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'name',
- 'outputs': [
+ "inputs": [],
+ "name": "name",
+ "outputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'owner',
- 'outputs': [
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
{
- 'internalType': 'address',
- 'name': '',
- 'type': 'address'
+ "internalType": "address",
+ "name": "",
+ "type": "address"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'ownerOf',
- 'outputs': [
+ "name": "ownerOf",
+ "outputs": [
{
- 'internalType': 'address',
- 'name': '',
- 'type': 'address'
+ "internalType": "address",
+ "name": "",
+ "type": "address"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'publisherTipCutPercent',
- 'outputs': [
+ "inputs": [],
+ "name": "publisherTipCutPercent",
+ "outputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'renounceOwnership',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'from',
- 'type': 'address'
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
},
{
- 'internalType': 'address',
- 'name': 'to',
- 'type': 'address'
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
},
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'safeTransferFrom',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "safeTransferFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'from',
- 'type': 'address'
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
},
{
- 'internalType': 'address',
- 'name': 'to',
- 'type': 'address'
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
},
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
},
{
- 'internalType': 'bytes',
- 'name': '_data',
- 'type': 'bytes'
+ "internalType": "bytes",
+ "name": "_data",
+ "type": "bytes"
}
],
- 'name': 'safeTransferFrom',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "safeTransferFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'operator',
- 'type': 'address'
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
},
{
- 'internalType': 'bool',
- 'name': 'approved',
- 'type': 'bool'
+ "internalType": "bool",
+ "name": "approved",
+ "type": "bool"
}
],
- 'name': 'setApprovalForAll',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "setApprovalForAll",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'bytes4',
- 'name': 'interfaceId',
- 'type': 'bytes4'
+ "internalType": "bytes4",
+ "name": "interfaceId",
+ "type": "bytes4"
}
],
- 'name': 'supportsInterface',
- 'outputs': [
+ "name": "supportsInterface",
+ "outputs": [
{
- 'internalType': 'bool',
- 'name': '',
- 'type': 'bool'
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'symbol',
- 'outputs': [
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'name': 'tokenMeme',
- 'outputs': [
+ "name": "tokenMeme",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "publisherTipsAVAX",
+ "type": "uint256"
+ },
{
- 'internalType': 'uint256',
- 'name': 'publisherTipsAVAX',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "creatorTipsAVAX",
+ "type": "uint256"
},
{
- 'internalType': 'uint256',
- 'name': 'creatorTipsAVAX',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "contractTipsAVAX",
+ "type": "uint256"
},
{
- 'internalType': 'uint256',
- 'name': 'contractTipsAVAX',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "publisherTipsWOWX",
+ "type": "uint256"
},
{
- 'internalType': 'address',
- 'name': 'publisherAddress',
- 'type': 'address'
+ "internalType": "uint256",
+ "name": "creatorTipsWOWX",
+ "type": "uint256"
},
{
- 'internalType': 'address',
- 'name': 'creatorAddress',
- 'type': 'address'
+ "internalType": "uint256",
+ "name": "contractTipsWOWX",
+ "type": "uint256"
},
{
- 'internalType': 'string',
- 'name': 'metadataIPFSHash',
- 'type': 'string'
+ "internalType": "address",
+ "name": "publisherAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "creatorAddress",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "metadataIPFSHash",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'from',
- 'type': 'address'
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
},
{
- 'internalType': 'address',
- 'name': 'to',
- 'type': 'address'
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
},
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'transferFrom',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "transferFrom",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': 'newOwner',
- 'type': 'address'
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
}
],
- 'name': 'transferOwnership',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'address',
- 'name': '',
- 'type': 'address'
+ "internalType": "address",
+ "name": "",
+ "type": "address"
}
],
- 'name': 'userProfile',
- 'outputs': [
+ "name": "userProfile",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "wowneroAddress",
+ "type": "string"
+ },
{
- 'internalType': 'string',
- 'name': 'wowneroAddress',
- 'type': 'string'
+ "internalType": "string",
+ "name": "userHandle",
+ "type": "string"
},
{
- 'internalType': 'string',
- 'name': 'userHandle',
- 'type': 'string'
+ "internalType": "string",
+ "name": "metadataIPFSHash",
+ "type": "string"
},
{
- 'internalType': 'string',
- 'name': 'metadataIPFSHash',
- 'type': 'string'
+ "internalType": "uint256",
+ "name": "tippedAVAX",
+ "type": "uint256"
},
{
- 'internalType': 'uint256',
- 'name': 'tippedAVAX',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tippedWOWX",
+ "type": "uint256"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
+ },
+ {
+ "inputs": [],
+ "name": "withdraw",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [],
- 'name': 'withdraw',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "percent",
+ "type": "uint256"
+ }
+ ],
+ "name": "setContractTipCut",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': 'percent',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "percent",
+ "type": "uint256"
}
],
- 'name': 'setContractTipCut',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "setPublisherTipCut",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
{
- 'internalType': 'uint256',
- 'name': 'percent',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
}
],
- 'name': 'setPublisherTipCut',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
},
{
- 'inputs': [],
- 'name': 'totalSupply',
- 'outputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': '',
- 'type': 'uint256'
+ "internalType": "string",
+ "name": "wowneroAddress",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "name": "setUserWowneroAddress",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'string',
- 'name': 'wowneroAddress',
- 'type': 'string'
+ "internalType": "string",
+ "name": "handle",
+ "type": "string"
}
],
- 'name': 'setUserWowneroAddress',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "setUserHandle",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'string',
- 'name': 'handle',
- 'type': 'string'
+ "internalType": "string",
+ "name": "metadataIPFSHash",
+ "type": "string"
}
],
- 'name': 'setUserHandle',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "setUserMetadata",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "metadataIPFSHash",
+ "type": "string"
+ },
{
- 'internalType': 'string',
- 'name': 'metadataIPFSHash',
- 'type': 'string'
+ "internalType": "address",
+ "name": "creatorAddress",
+ "type": "address"
}
],
- 'name': 'setUserMetadata',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "mint",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'string',
- 'name': 'metadataIPFSHash',
- 'type': 'string'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
},
{
- 'internalType': 'address',
- 'name': 'creatorAddress',
- 'type': 'address'
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
}
],
- 'name': 'mint',
- 'outputs': [],
- 'stateMutability': 'nonpayable',
- 'type': 'function'
+ "name": "tipAVAX",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function",
+ "payable": True
},
{
- 'inputs': [
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
+ },
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
}
],
- 'name': 'tipAVAX',
- 'outputs': [],
- 'stateMutability': 'payable',
- 'type': 'function'
+ "name": "tipWOWX",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function",
+ "payable": True
},
{
- 'inputs': [
+ "inputs": [
{
- 'internalType': 'uint256',
- 'name': 'tokenId',
- 'type': 'uint256'
+ "internalType": "uint256",
+ "name": "tokenId",
+ "type": "uint256"
}
],
- 'name': 'tokenURI',
- 'outputs': [
+ "name": "tokenURI",
+ "outputs": [
{
- 'internalType': 'string',
- 'name': '',
- 'type': 'string'
+ "internalType": "string",
+ "name": "",
+ "type": "string"
}
],
- 'stateMutability': 'view',
- 'type': 'function'
+ "stateMutability": "view",
+ "type": "function",
+ "constant": True
}
]
+WOWX_ABI = [
+{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"owner","type":"address"},{"indexed":True,"internalType":"address","name":"spender","type":"address"},{"indexed":False,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"delegator","type":"address"},{"indexed":True,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":True,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"delegate","type":"address"},{"indexed":False,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":False,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":True,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":False,"inputs":[{"indexed":True,"internalType":"address","name":"from","type":"address"},{"indexed":True,"internalType":"address","name":"to","type":"address"},{"indexed":False,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint224","name":"votes","type":"uint224"}],"internalType":"struct ERC20Votes.Checkpoint","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
# Logging
diff --git a/suchwowx/templates/includes/web3.html b/suchwowx/templates/includes/web3.html
index 226e88c..2df7ab9 100644
--- a/suchwowx/templates/includes/web3.html
+++ b/suchwowx/templates/includes/web3.html
@@ -16,8 +16,11 @@
// Web3 and smart contract details
let contractABI = {{ config.CONTRACT_ABI | tojson }};
let contractAddress = "{{ config.CONTRACT_ADDRESS }}";
+ let wowxABI = {{ config.WOWX_ABI | tojson }};
+ let wowxAddress = "{{ config.WOWX_ADDRESS }}";
const w3 = new Web3(Web3.givenProvider);
const contract = new w3.eth.Contract(contractABI, contractAddress);
+ const wowxContract = new w3.eth.Contract(wowxABI, wowxAddress);
async function getMetamaskAccount() {
const accounts = await window.ethereum.request({
diff --git a/suchwowx/templates/meme.html b/suchwowx/templates/meme.html
index 1bec73e..de1c018 100644
--- a/suchwowx/templates/meme.html
+++ b/suchwowx/templates/meme.html
@@ -30,33 +30,23 @@
{% endif %}
{% endif %}
-
Title: {{ meme.title }}
-Description: {{ meme.description }}
-Poster Address: {{ meme.user.handle }}
+Meme ID: {{ meme }}
Title: {{ meme.title }}
+Description: {{ meme.description }}
+Poster Address: {{ meme.user.handle }}
{% if meme.user.wownero_address %} -Wownero Address: {{ meme.user.wownero_address }}
+Wownero Address: {{ meme.user.wownero_address }}
{% endif %} {% if meme.meta_ipfs_hash %} -Meta IPFS: {{ meme.meta_ipfs_hash }}
+Meta IPFS: {{ meme.meta_ipfs_hash }}
{% endif %} {% if meme.meme_ipfs_hash %} -Meme IPFS: {{ meme.meme_ipfs_hash }}
+Meme IPFS: {{ meme.meme_ipfs_hash }}
{% endif %} -Meme ID: {{ meme }}
Tip meme in WOW
- -Wownero Address: {{ meme.user.wownero_address | default('?') }}
-WOW Tips: ?
+WOWX Tips: ?
+AVAX Tips: ?
+ {% if not meme.approved %}