From 20a7e127c7fadcf265931833d0ef61871b492813 Mon Sep 17 00:00:00 2001 From: silverpill Date: Wed, 26 Jan 2022 17:04:45 +0000 Subject: [PATCH] Update IAdapter interface artifact --- config.yaml.example | 2 +- contracts/IAdapter.json | 92 +++++++++++++++++ contracts/IERC20.json | 194 +++++++++++++++++++++++++++++++++++ contracts/ISubscription.json | 54 ++++++++++ 4 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 contracts/IERC20.json create mode 100644 contracts/ISubscription.json diff --git a/config.yaml.example b/config.yaml.example index 9943ac0..b07ace7 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -20,7 +20,7 @@ login_message: 'Sign this message to log in to https://myserver.net. Do not sign blockchain: # CAIP-2 chain ID (https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) chain_id: eip155:31337 - contract_address: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0' + contract_address: '0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9' contract_dir: contracts api_url: 'http://127.0.0.1:8545' # Block explorer base URL (should be compatible with https://eips.ethereum.org/EIPS/eip-3091) diff --git a/contracts/IAdapter.json b/contracts/IAdapter.json index 1c2c0ee..ba5103c 100644 --- a/contracts/IAdapter.json +++ b/contracts/IAdapter.json @@ -16,6 +16,53 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "configureSubscription", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getSubscriptionPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -35,6 +82,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "isSubscriptionConfigured", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -67,6 +133,32 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "subscription", + "outputs": [ + { + "internalType": "contract ISubscription", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "subscriptionToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], "bytecode": "0x", diff --git a/contracts/IERC20.json b/contracts/IERC20.json new file mode 100644 index 0000000..663a02d --- /dev/null +++ b/contracts/IERC20.json @@ -0,0 +1,194 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20", + "sourceName": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "abi": [ + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [], + "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" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/ISubscription.json b/contracts/ISubscription.json new file mode 100644 index 0000000..602e07d --- /dev/null +++ b/contracts/ISubscription.json @@ -0,0 +1,54 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ISubscription", + "sourceName": "contracts/ISubscription.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expires_at", + "type": "uint256" + } + ], + "name": "UpdateSubscription", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +}