diff --git a/contracts/MemeTokenFactory.sol b/contracts/MemeTokenFactory.sol index c51f360..cc4415f 100644 --- a/contracts/MemeTokenFactory.sol +++ b/contracts/MemeTokenFactory.sol @@ -16,7 +16,7 @@ contract DeflationaryToken is ERC20, Ownable { require(_initialSupply <= _maxSupply, "Initial supply cannot exceed max supply"); maxSupply = _maxSupply; uri = _uri; - _mint(msg.sender, _initialSupply); + _mint(_initialOwner, _initialSupply); } function setUri(string memory _uri) public onlyOwner{ @@ -41,7 +41,7 @@ contract InflationaryToken is ERC20, Ownable { Ownable(_initialOwner) { uri = _uri; - _mint(msg.sender, _initialSupply); + _mint(_initialOwner, _initialSupply); } function setUri(string memory _uri) public onlyOwner{ diff --git a/contracts/abi/InflationaryToken.ts b/contracts/abi/InflationaryToken.ts index 8dd67f7..2514755 100644 --- a/contracts/abi/InflationaryToken.ts +++ b/contracts/abi/InflationaryToken.ts @@ -1,4 +1,28 @@ const InflationaryTokenAbi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -116,6 +140,24 @@ const InflationaryTokenAbi = [ "name": "ERC20InvalidSpender", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -182,6 +224,50 @@ const InflationaryTokenAbi = [ "name": "OwnershipTransferred", "type": "event" }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_uri", + "type": "string" + } + ], + "name": "setUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "anonymous": false, "inputs": [ @@ -211,48 +297,66 @@ const InflationaryTokenAbi = [ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "from", "type": "address" }, { "internalType": "address", - "name": "spender", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "allowance", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "approve", + "name": "allowance", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -300,24 +404,6 @@ const InflationaryTokenAbi = [ "stateMutability": "view", "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", @@ -344,26 +430,6 @@ const InflationaryTokenAbi = [ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_uri", - "type": "string" - } - ], - "name": "setUri", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "symbol", @@ -390,72 +456,6 @@ const InflationaryTokenAbi = [ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "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" - }, { "inputs": [], "name": "uri",