ocean-subgraph/abis/Dispenser.json

358 lines
29 KiB
JSON
Raw Normal View History

2021-11-10 13:47:44 +01:00
{
2021-11-19 15:42:17 +01:00
"_format": "hh-sol-artifact-1",
"contractName": "Dispenser",
"sourceName": "contracts/pools/dispenser/Dispenser.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_router",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatokenAddress",
"type": "address"
}
],
"name": "DispenserActivated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newAllowedSwapper",
"type": "address"
}
],
"name": "DispenserAllowedSwapperChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxTokens",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "maxBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "allowedSwapper",
"type": "address"
}
],
"name": "DispenserCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatokenAddress",
"type": "address"
}
],
"name": "DispenserDeactivated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "OwnerWithdrawed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "datatokenAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "userAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "TokensDispensed",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"internalType": "uint256",
"name": "maxTokens",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxBalance",
"type": "uint256"
}
],
"name": "activate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"internalType": "uint256",
"name": "maxTokens",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxBalance",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "allowedSwapper",
"type": "address"
}
],
"name": "create",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "datatokensList",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
}
],
"name": "deactivate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "destination",
"type": "address"
}
],
"name": "dispense",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
}
],
"name": "ownerWithdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "router",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"internalType": "address",
"name": "newAllowedSwapper",
"type": "address"
}
],
"name": "setAllowedSwapper",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "datatoken",
"type": "address"
}
],
"name": "status",
"outputs": [
{
"internalType": "bool",
"name": "active",
"type": "bool"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "bool",
"name": "isMinter",
"type": "bool"
},
{
"internalType": "uint256",
"name": "maxTokens",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxBalance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "address",
"name": "allowedSwapper",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b5060405161160938038061160983398101604081905261002f916100b3565b60016000556001600160a01b03811661008e5760405162461bcd60e51b815260206004820152601f60248201527f44697370656e7365723a2057726f6e6720526f75746572206164647265737300604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b03929092169190911790556100e3565b6000602082840312156100c557600080fd5b81516001600160a01b03811681146100dc57600080fd5b9392505050565b611517806100f26000396000f3fe6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b60
"deployedBytecode": "0x6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b604482015260640161024f565b6107246001600160a01b0387168587610fdf565b836001600160a01b0316866001600160a01b03167f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135438760405161076991815260200190565b60405180910390a35050600160005550505050565b6001546001600160a01b031633146107d15760405162461bcd60e51b81526020600482015260166024820152752234b9b832b739b2b91d1037b7363c903937baba32b960511b604482015260640161024f565b6001600160a01b0385166107f75760405162461bcd60e51b815260040161024f90
2021-11-19 15:42:17 +01:00
"linkReferences": {},
"deployedLinkReferences": {}
}