diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4d3b480f..d78ab9b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,50 +1,51 @@ -# Development +# Development Setup -We need the following installed: +Before starting development, ensure that the following dependencies are installed on your system: - * docker - * node.js - * golang +- Docker +- Node.js +- Golang -## install +## Installation -Get the node modules installed and generate a local .env file with private keys for the various services. +First, install the required Node.js modules and generate a local `.env` file containing private keys for various services. Run the following commands: ```bash (cd hardhat && yarn install) ./stack print-env > .env ``` -## boot stack +## Booting the Stack -### bacalhau +### 1 - Bacalhau -We need a bacalhau node running on the same machine as the resource provider. - -Here is how we got bacalhau up and running: +To run a Bacalhau node on the same machine as the resource provider, follow these steps: ```bash -# install the latest bacalhau which works with GPUs (https://github.com/bacalhau-project/bacalhau/issues/2858) +# Install the latest Bacalhau release which works with GPUs (https://github.com/bacalhau-project/bacalhau/issues/2858) wget https://github.com/bacalhau-project/bacalhau/releases/download/v1.0.3/bacalhau_v1.0.3_linux_amd64.tar.gz +# Extract the downloaded archive and move the `bacalhau` binary to `/usr/local/bin` tar xfv bacalhau_v1.0.3_linux_amd64.tar.gz mv bacalhau /usr/local/bin -# configure this to where you want the ipfs data to be stored +# Set the IPFS data path by exporting the `BACALHAU_SERVE_IPFS_PATH` variable to your desired location export BACALHAU_SERVE_IPFS_PATH=/tmp/lilypad/data/ipfs -# run bacalhau as both compute node and requester node -./stack bacalhau-serve +# Run Bacalhau as both a compute node and a requester node +bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked ``` -### lilypad +### 2 - Lilypad + +To initiate the boot sequence for Lilypad, run the following command: ```bash ./stack boot ``` -This does the following things: +This command performs the following four phases within the boot sequence: -#### geth +#### 2.1 - Geth -We need to start geth, move funds to our admin account and then fund the various other accounts. +During this phase, the following tasks are executed: ```bash ./stack geth @@ -53,79 +54,108 @@ We need to start geth, move funds to our admin account and then fund the various ./stack balances ``` -Geth is now running and each of our services has some ether allocated. +These commands start Geth, allocates eth to the admin, faucet, solver, mediator, resource_provider, job_creator, and directory accounts. -#### compile contracts +#### 2.2 - Compile Contracts ```bash ./stack compile-contracts ``` -This will also generate go bindings in `pkg/contract/bindings/contracts` +This compiles the smart contracts and generates Go bindings in `pkg/contract/bindings/contracts`. -#### deploy contracts +#### 2.3 - Deploy Contracts ```bash ./stack deploy-contracts ``` -Contracts are now deployed - no services have any tokens though +This deploys the smart contracts. Note that services will not have any tokens at this point. -#### fund tokens +#### 2.4 - Fund Tokens ```bash ./stack fund-services-tokens ./stack balances ``` +This funds the services with tokens and prints the balances. -### run services +### 3 - Run Services -Run the following commands in separate terminals: +Run the following commands in separate terminal windows: ```bash ./stack solver ``` +Wait for the solver to start when `🟡 SOL solver registered` is logged, and then run: + ```bash ./stack mediator ``` +If you have a GPU, run the following command in a separate terminal window: + +```bash +./stack resource-provider --offer-gpu 1 +``` + +Otherwise, if you don't have a GPU: + ```bash ./stack resource-provider ``` +Run Cowsay: + ```bash ./stack run cowsay:v0.0.1 -i Message="moo" ``` -## stop stack +Run SDXL: -To stop geth running at any time: +```bash +./stack runsdxl sdxl:v0.9-lilypad1 PROMPT="beautiful view of iceland with a record player" +``` + +## Stopping the Stack + +To stop Geth at any time, use the following command: ```bash ./stack geth-stop ``` -To reset the geth data (i.e. a complete restart): +To reset Geth data, effectively performing a complete restart, use the following command: ```bash ./stack clean ``` -NOTE: you will need to re-run the `fund-admin` and `fund-services` commands after a `clean`. +Please note that after running `clean`, you will need to re-run the `fund-admin` and `fund-services` commands. -## unit tests +## Unit Tests -Run the smart contract unit tests: +Run the smart contract unit tests with the following command: ```bash ./stack unit-tests ``` -## re-generate go bindings +## Regenerating Go Bindings -When you change the smart contracts the go bindings in `pkg/contract/bindings/contracts` will need regenerating. +Whenever you make changes to the smart contracts, regenerate the Go bindings in `pkg/contract/bindings/contracts` by running: ```bash ./stack compile-contracts ``` + +## Troubleshooting + +### Receive Buffer Size Error + +`failed to sufficiently increase receive buffer size` See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details. Fix for Linux: +``` +sudo sysctl -w net.core.rmem_max=2500000 +sudo sysctl -w net.core.wmem_max=2500000 +``` \ No newline at end of file diff --git a/TESTNETDEPLOY.md b/TESTNETDEPLOY.md new file mode 100644 index 00000000..cc4e709b --- /dev/null +++ b/TESTNETDEPLOY.md @@ -0,0 +1,127 @@ +# Testnet Deployment + + +## Installation + +First, install the required Node.js modules and generate a local `.env` file containing private keys for various services. Run the following commands: + +```bash +(cd hardhat && yarn install) +./stack print-env > .env +``` + +## Booting the Stack + +### 1 - Bacalhau + +To run a Bacalhau node on the same machine as the resource provider, follow these steps: + +```bash +# install the latest bacalhau which works with GPUs (https://github.com/bacalhau-project/bacalhau/issues/2858) +wget https://github.com/bacalhau-project/bacalhau/releases/download/v1.0.3/bacalhau_v1.0.3_linux_amd64.tar.gz +tar xfv bacalhau_v1.0.3_linux_amd64.tar.gz +mv bacalhau /usr/local/bin +# configure this to where you want the ipfs data to be stored +export BACALHAU_SERVE_IPFS_PATH=/tmp/lilypad/data/ipfs +# run bacalhau as both compute node and requester node +./stack bacalhau-serve +``` + +## Create Seven New Accounts + +Follow the `README.md` in the `generate_accts` directory to create seven new accounts. + +Copy `hardhat/.env.sample` to `.env` and update the following environment variables: +``` +ADDRESS_ADMIN= +PRIVATE_KEY_ADMIN= +ADDRESS_FAUCET= +PRIVATE_KEY_FAUCET= +ADDRESS_SOLVER= +PRIVATE_KEY_SOLVER= +ADDRESS_MEDIATOR= +PRIVATE_KEY_MEDIATOR= +ADDRESS_RESOURCE_PROVIDER= +PRIVATE_KEY_RESOURCE_PROVIDER= +ADDRESS_JOB_CREATOR= +PRIVATE_KEY_JOB_CREATOR= +ADDRESS_DIRECTORY= +PRIVATE_KEY_DIRECTORY= +``` + +## Create a new Infura Project + +Create a new Infura project and update the following environment variable in `hardhat/.env`: +``` +INFURA_KEY= +``` + +Also add the infura key to the `.env` file: +``` +export INFURA_KEY= +``` + +## Setup Hardhat + +set defaultNetwork to `sepolia` in `hardhat.config.js` + +Update the following values in the `.env` file. Replace `` with the Infura key from above: +``` +export NETWORK=sepolia +export WEB3_RPC_URL=wss://sepolia.infura.io/ws/v3/ +export WEB3_CHAIN_ID=11155111 +``` + +## Fund the Seven New Accounts + +Fund the `admin` acccount with .7 ETH. + +Fund the remaining six accounts with .1 ETH each. + +```bash +./stack fund-services-ether +``` + +Check the balances + +```bash +./stack balances +``` + +## Compile Contracts + +```bash +./stack compile-contracts +``` + +## Deploy Contracts + +```bash +./stack deploy-contracts +``` + +## Fund Services Tokens + +```bash +./stack fund-services-tokens +``` + +### Run Services + +Run the following commands in separate terminals: + +```bash +./stack solver +``` + +```bash +./stack mediator +``` + +```bash +./stack resource-provider +``` + +```bash +./stack run cowsay:v0.0.1 -i Message="moo" +``` \ No newline at end of file diff --git a/cmd/lilypad/mediator.go b/cmd/lilypad/mediator.go index a9881016..bacce13c 100644 --- a/cmd/lilypad/mediator.go +++ b/cmd/lilypad/mediator.go @@ -6,6 +6,7 @@ import ( optionsfactory "github.com/bacalhau-project/lilypad/pkg/options" "github.com/bacalhau-project/lilypad/pkg/system" "github.com/bacalhau-project/lilypad/pkg/web3" + "github.com/rs/zerolog/log" "github.com/spf13/cobra" ) @@ -50,6 +51,7 @@ func runMediator(cmd *cobra.Command, options mediator.MediatorOptions) error { return err } + log.Debug().Msgf("Starting mediator service.") mediatorErrors := mediatorService.Start(commandCtx.Ctx, commandCtx.Cm) for { select { diff --git a/hardhat/.env.sample b/hardhat/.env.sample new file mode 100644 index 00000000..2a2b5f59 --- /dev/null +++ b/hardhat/.env.sample @@ -0,0 +1,17 @@ +INFURA_KEY= +ETHERSCAN_API_KEY= + +ADDRESS_ADMIN= +PRIVATE_KEY_ADMIN= +ADDRESS_FAUCET= +PRIVATE_KEY_FAUCET= +ADDRESS_SOLVER= +PRIVATE_KEY_SOLVER= +ADDRESS_MEDIATOR= +PRIVATE_KEY_MEDIATOR= +ADDRESS_RESOURCE_PROVIDER= +PRIVATE_KEY_RESOURCE_PROVIDER= +ADDRESS_JOB_CREATOR= +PRIVATE_KEY_JOB_CREATOR= +ADDRESS_DIRECTORY= +PRIVATE_KEY_DIRECTORY= diff --git a/hardhat/contracts/LilypadToken.sol b/hardhat/contracts/LilypadToken.sol index d84c8eea..c8f542ed 100644 --- a/hardhat/contracts/LilypadToken.sol +++ b/hardhat/contracts/LilypadToken.sol @@ -114,4 +114,4 @@ contract LilypadToken is ControllerOwnable, ERC20, ERC20Pausable { function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Pausable) { super._beforeTokenTransfer(from, to, amount); } -} \ No newline at end of file +} diff --git a/hardhat/deploy/001_deploy_token.ts b/hardhat/deploy/001_deploy_token.ts index ba9254c1..548cfa68 100644 --- a/hardhat/deploy/001_deploy_token.ts +++ b/hardhat/deploy/001_deploy_token.ts @@ -10,6 +10,8 @@ const deployToken: DeployFunction = async function (hre: HardhatRuntimeEnvironme const { admin, } = await getNamedAccounts() + // log the admin address + console.log(`admin: ${admin}`) await deploy("LilypadToken", { from: admin, args: [ diff --git a/hardhat/deployments/sepolia/.chainId b/hardhat/deployments/sepolia/.chainId new file mode 100644 index 00000000..bd8d1cd4 --- /dev/null +++ b/hardhat/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/hardhat/deployments/sepolia/.migrations.json b/hardhat/deployments/sepolia/.migrations.json new file mode 100644 index 00000000..329b1d93 --- /dev/null +++ b/hardhat/deployments/sepolia/.migrations.json @@ -0,0 +1,9 @@ +{ + "deployToken": 1698866546, + "deployPayments": 1698866582, + "deployStorage": 1698866604, + "deployUsers": 1698866631, + "deployMediation": 1698866654, + "deployJobCreator": 1698866729, + "deployController": 1698866787 +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/ExampleClient.json b/hardhat/deployments/sepolia/ExampleClient.json new file mode 100644 index 00000000..3b4defac --- /dev/null +++ b/hardhat/deployments/sepolia/ExampleClient.json @@ -0,0 +1,348 @@ +{ + "address": "0xA943d77aA8669975643c98b8cB4c337d3C7eEb6a", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "JobCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "JobCreated", + "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" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_jobID", + "type": "uint256" + } + ], + "name": "getJobResult", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobManagerAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "runCowsay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobManagerAddress", + "type": "address" + } + ], + "name": "setJobManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "submitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe5a9b186fd6393f406cec7e52c323161d6db3024f8ddf0a499691f81584c5429", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0xA943d77aA8669975643c98b8cB4c337d3C7eEb6a", + "transactionIndex": 48, + "gasUsed": "1212230", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000004000000000000000000000000020000000000000000000800000000000000000000000000000000400001000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000020000000000000", + "blockHash": "0x484ba5643cf9c66df2c230f1b1678a82fe290963b57edbe07a5d61ce50df82f5", + "transactionHash": "0xe5a9b186fd6393f406cec7e52c323161d6db3024f8ddf0a499691f81584c5429", + "logs": [ + { + "transactionIndex": 48, + "blockNumber": 4609903, + "transactionHash": "0xe5a9b186fd6393f406cec7e52c323161d6db3024f8ddf0a499691f81584c5429", + "address": "0xA943d77aA8669975643c98b8cB4c337d3C7eEb6a", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 26, + "blockHash": "0x484ba5643cf9c66df2c230f1b1678a82fe290963b57edbe07a5d61ce50df82f5" + } + ], + "blockNumber": 4609903, + "cumulativeGasUsed": "6363929", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"JobCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"JobCreated\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_jobID\",\"type\":\"uint256\"}],\"name\":\"getJobResult\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobManagerAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"runCowsay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobManagerAddress\",\"type\":\"address\"}],\"name\":\"setJobManagerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"submitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ExampleClient.sol\":\"ExampleClient\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ExampleClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ILilypadJobManager.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\ncontract ExampleClient is Ownable, Initializable, ILilypadJobClient {\\n\\n address private jobManagerAddress;\\n ILilypadJobManager private jobManagerContract;\\n\\n mapping(uint256 => string) private jobResults;\\n\\n event JobCreated(\\n uint256 id,\\n string message\\n );\\n\\n event JobCompleted(\\n uint256 id,\\n string dealId,\\n string dataId\\n );\\n\\n function initialize(address _jobManagerAddress) public initializer {\\n setJobManagerAddress(_jobManagerAddress);\\n }\\n\\n function setJobManagerAddress(address _jobManagerAddress) public onlyOwner {\\n require(_jobManagerAddress != address(0), \\\"Job manager address\\\");\\n jobManagerAddress = _jobManagerAddress;\\n jobManagerContract = ILilypadJobManager(jobManagerAddress);\\n }\\n\\n function getJobResult(uint256 _jobID) public view returns (string memory) {\\n return jobResults[_jobID];\\n }\\n\\n function runCowsay(\\n string memory message\\n ) public {\\n string[] memory inputs = new string[](1);\\n inputs[0] = string(abi.encodePacked(\\\"Message=\\\", message));\\n uint256 id = jobManagerContract.runJob(\\n \\\"cowsay:v0.0.1\\\",\\n inputs,\\n msg.sender\\n );\\n\\n emit JobCreated(\\n id,\\n message\\n );\\n }\\n\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) public override {\\n jobResults[id] = dataId;\\n emit JobCompleted(\\n id,\\n dealId,\\n dataId\\n );\\n }\\n}\\n\",\"keccak256\":\"0xdc18a57d551a2f5b0ea4d923b785f5d34beef1d34fb8c98d5404be472ad5e7af\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\n// a smart contract that is running a job\\n// it will call the IOnChainJobManager with it's job\\n// which will end up with the resultsAdded function being called by the manager\\ninterface ILilypadJobClient {\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) external;\\n}\\n\",\"keccak256\":\"0xbdb36ace8c31e47b30abaa2ce713cec8f488f9dfaac50c7372a5f5196cc3dfcc\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobManager.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\n// the smart contract that is responsible for handling the life\\n// cycle of a job - it will pay the registered solver to manage the job\\n// this is the simple implementation - later we can implement the whole protocol\\n// where the calling smart contract can decide if it wants to agree to a resource offer\\n// and accept results\\ninterface ILilypadJobManager is ILilypadJobClient {\\n function runJob(\\n string memory module,\\n string[] memory inputs,\\n address payee\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x8c65176e0bfbdc3a612317b719475acb409910d43d1fd73420f0af18b7fd1cd5\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561000f575f80fd5b5061002c61002161003160201b60201c565b61003860201b60201c565b6100f9565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611481806101065f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063c4d66de811610059578063c4d66de8146100fe578063cabc00d11461011a578063ec67df4c14610136578063f2fde38b1461015257610086565b80633b89dcab1461008a5780636c0f1f58146100ba578063715018a6146100d65780638da5cb5b146100e0575b5f80fd5b6100a4600480360381019061009f919061089c565b61016e565b6040516100b19190610951565b60405180910390f35b6100d460048036038101906100cf9190610a9d565b61020f565b005b6100de61026e565b005b6100e8610281565b6040516100f59190610b64565b60405180910390f35b61011860048036038101906101139190610ba7565b6102a8565b005b610134600480360381019061012f9190610bd2565b6103e7565b005b610150600480360381019061014b9190610ba7565b610554565b005b61016c60048036038101906101679190610ba7565b61066e565b005b606060035f8381526020019081526020015f20805461018c90610c46565b80601f01602080910402602001604051908101604052809291908181526020018280546101b890610c46565b80156102035780601f106101da57610100808354040283529160200191610203565b820191905f5260205f20905b8154815290600101906020018083116101e657829003601f168201915b50505050509050919050565b8060035f8581526020019081526020015f20908161022d9190610e13565b507f3849c58b4b39b379bddc5973e71a10ded174f54140916d81986c7eec092e5c4283838360405161026193929190610ef1565b60405180910390a1505050565b6102766106f0565b61027f5f61076e565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff161590508080156102d9575060015f60149054906101000a900460ff1660ff16105b8061030757506102e83061082f565b158015610306575060015f60149054906101000a900460ff1660ff16145b5b610346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033d90610fa4565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156103825760015f60156101000a81548160ff0219169083151502179055505b61038b82610554565b80156103e3575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516103da9190611007565b60405180910390a15b5050565b5f600167ffffffffffffffff81111561040357610402610979565b5b60405190808252806020026020018201604052801561043657816020015b60608152602001906001900390816104215790505b5090508160405160200161044a91906110a4565b604051602081830303815290604052815f8151811061046c5761046b6110c5565b5b60200260200101819052505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c75555fa83336040518363ffffffff1660e01b81526004016104d492919061123f565b6020604051808303815f875af11580156104f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105149190611294565b90507fb63f0fdfb200b05c8b95fb4dcf8f8abd30f0b6884d532792e705afab4f37380a81846040516105479291906112bf565b60405180910390a1505050565b61055c6106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190611337565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106766106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db906113c5565b60405180910390fd5b6106ed8161076e565b50565b6106f8610851565b73ffffffffffffffffffffffffffffffffffffffff16610716610281565b73ffffffffffffffffffffffffffffffffffffffff161461076c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107639061142d565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61087b81610869565b8114610885575f80fd5b50565b5f8135905061089681610872565b92915050565b5f602082840312156108b1576108b0610861565b5b5f6108be84828501610888565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156108fe5780820151818401526020810190506108e3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610923826108c7565b61092d81856108d1565b935061093d8185602086016108e1565b61094681610909565b840191505092915050565b5f6020820190508181035f8301526109698184610919565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109af82610909565b810181811067ffffffffffffffff821117156109ce576109cd610979565b5b80604052505050565b5f6109e0610858565b90506109ec82826109a6565b919050565b5f67ffffffffffffffff821115610a0b57610a0a610979565b5b610a1482610909565b9050602081019050919050565b828183375f83830152505050565b5f610a41610a3c846109f1565b6109d7565b905082815260208101848484011115610a5d57610a5c610975565b5b610a68848285610a21565b509392505050565b5f82601f830112610a8457610a83610971565b5b8135610a94848260208601610a2f565b91505092915050565b5f805f60608486031215610ab457610ab3610861565b5b5f610ac186828701610888565b935050602084013567ffffffffffffffff811115610ae257610ae1610865565b5b610aee86828701610a70565b925050604084013567ffffffffffffffff811115610b0f57610b0e610865565b5b610b1b86828701610a70565b9150509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b4e82610b25565b9050919050565b610b5e81610b44565b82525050565b5f602082019050610b775f830184610b55565b92915050565b610b8681610b44565b8114610b90575f80fd5b50565b5f81359050610ba181610b7d565b92915050565b5f60208284031215610bbc57610bbb610861565b5b5f610bc984828501610b93565b91505092915050565b5f60208284031215610be757610be6610861565b5b5f82013567ffffffffffffffff811115610c0457610c03610865565b5b610c1084828501610a70565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610c5d57607f821691505b602082108103610c7057610c6f610c19565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610cd27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610c97565b610cdc8683610c97565b95508019841693508086168417925050509392505050565b5f819050919050565b5f610d17610d12610d0d84610869565b610cf4565b610869565b9050919050565b5f819050919050565b610d3083610cfd565b610d44610d3c82610d1e565b848454610ca3565b825550505050565b5f90565b610d58610d4c565b610d63818484610d27565b505050565b5b81811015610d8657610d7b5f82610d50565b600181019050610d69565b5050565b601f821115610dcb57610d9c81610c76565b610da584610c88565b81016020851015610db4578190505b610dc8610dc085610c88565b830182610d68565b50505b505050565b5f82821c905092915050565b5f610deb5f1984600802610dd0565b1980831691505092915050565b5f610e038383610ddc565b9150826002028217905092915050565b610e1c826108c7565b67ffffffffffffffff811115610e3557610e34610979565b5b610e3f8254610c46565b610e4a828285610d8a565b5f60209050601f831160018114610e7b575f8415610e69578287015190505b610e738582610df8565b865550610eda565b601f198416610e8986610c76565b5f5b82811015610eb057848901518255600182019150602085019450602081019050610e8b565b86831015610ecd5784890151610ec9601f891682610ddc565b8355505b6001600288020188555050505b505050505050565b610eeb81610869565b82525050565b5f606082019050610f045f830186610ee2565b8181036020830152610f168185610919565b90508181036040830152610f2a8184610919565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f610f8e602e836108d1565b9150610f9982610f34565b604082019050919050565b5f6020820190508181035f830152610fbb81610f82565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f610ff1610fec610fe784610fc2565b610cf4565b610fcb565b9050919050565b61100181610fd7565b82525050565b5f60208201905061101a5f830184610ff8565b92915050565b5f81905092915050565b7f4d6573736167653d0000000000000000000000000000000000000000000000005f82015250565b5f61105e600883611020565b91506110698261102a565b600882019050919050565b5f61107e826108c7565b6110888185611020565b93506110988185602086016108e1565b80840191505092915050565b5f6110ae82611052565b91506110ba8284611074565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f636f777361793a76302e302e31000000000000000000000000000000000000005f82015250565b5f611126600d836108d1565b9150611131826110f2565b602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f61117f826108c7565b6111898185611165565b93506111998185602086016108e1565b6111a281610909565b840191505092915050565b5f6111b88383611175565b905092915050565b5f602082019050919050565b5f6111d68261113c565b6111e08185611146565b9350836020820285016111f285611156565b805f5b8581101561122d578484038952815161120e85826111ad565b9450611219836111c0565b925060208a019950506001810190506111f5565b50829750879550505050505092915050565b5f6060820190508181035f8301526112568161111a565b9050818103602083015261126a81856111cc565b90506112796040830184610b55565b9392505050565b5f8151905061128e81610872565b92915050565b5f602082840312156112a9576112a8610861565b5b5f6112b684828501611280565b91505092915050565b5f6040820190506112d25f830185610ee2565b81810360208301526112e48184610919565b90509392505050565b7f4a6f62206d616e616765722061646472657373000000000000000000000000005f82015250565b5f6113216013836108d1565b915061132c826112ed565b602082019050919050565b5f6020820190508181035f83015261134e81611315565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6113af6026836108d1565b91506113ba82611355565b604082019050919050565b5f6020820190508181035f8301526113dc816113a3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6114176020836108d1565b9150611422826113e3565b602082019050919050565b5f6020820190508181035f8301526114448161140b565b905091905056fea2646970667358221220e70512fad6a4309e5f14fc3cfa8d43307e2e07c61bd54386b69e7e5424682b7164736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063c4d66de811610059578063c4d66de8146100fe578063cabc00d11461011a578063ec67df4c14610136578063f2fde38b1461015257610086565b80633b89dcab1461008a5780636c0f1f58146100ba578063715018a6146100d65780638da5cb5b146100e0575b5f80fd5b6100a4600480360381019061009f919061089c565b61016e565b6040516100b19190610951565b60405180910390f35b6100d460048036038101906100cf9190610a9d565b61020f565b005b6100de61026e565b005b6100e8610281565b6040516100f59190610b64565b60405180910390f35b61011860048036038101906101139190610ba7565b6102a8565b005b610134600480360381019061012f9190610bd2565b6103e7565b005b610150600480360381019061014b9190610ba7565b610554565b005b61016c60048036038101906101679190610ba7565b61066e565b005b606060035f8381526020019081526020015f20805461018c90610c46565b80601f01602080910402602001604051908101604052809291908181526020018280546101b890610c46565b80156102035780601f106101da57610100808354040283529160200191610203565b820191905f5260205f20905b8154815290600101906020018083116101e657829003601f168201915b50505050509050919050565b8060035f8581526020019081526020015f20908161022d9190610e13565b507f3849c58b4b39b379bddc5973e71a10ded174f54140916d81986c7eec092e5c4283838360405161026193929190610ef1565b60405180910390a1505050565b6102766106f0565b61027f5f61076e565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff161590508080156102d9575060015f60149054906101000a900460ff1660ff16105b8061030757506102e83061082f565b158015610306575060015f60149054906101000a900460ff1660ff16145b5b610346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033d90610fa4565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156103825760015f60156101000a81548160ff0219169083151502179055505b61038b82610554565b80156103e3575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516103da9190611007565b60405180910390a15b5050565b5f600167ffffffffffffffff81111561040357610402610979565b5b60405190808252806020026020018201604052801561043657816020015b60608152602001906001900390816104215790505b5090508160405160200161044a91906110a4565b604051602081830303815290604052815f8151811061046c5761046b6110c5565b5b60200260200101819052505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c75555fa83336040518363ffffffff1660e01b81526004016104d492919061123f565b6020604051808303815f875af11580156104f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105149190611294565b90507fb63f0fdfb200b05c8b95fb4dcf8f8abd30f0b6884d532792e705afab4f37380a81846040516105479291906112bf565b60405180910390a1505050565b61055c6106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190611337565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106766106f0565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106db906113c5565b60405180910390fd5b6106ed8161076e565b50565b6106f8610851565b73ffffffffffffffffffffffffffffffffffffffff16610716610281565b73ffffffffffffffffffffffffffffffffffffffff161461076c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107639061142d565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61087b81610869565b8114610885575f80fd5b50565b5f8135905061089681610872565b92915050565b5f602082840312156108b1576108b0610861565b5b5f6108be84828501610888565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156108fe5780820151818401526020810190506108e3565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610923826108c7565b61092d81856108d1565b935061093d8185602086016108e1565b61094681610909565b840191505092915050565b5f6020820190508181035f8301526109698184610919565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6109af82610909565b810181811067ffffffffffffffff821117156109ce576109cd610979565b5b80604052505050565b5f6109e0610858565b90506109ec82826109a6565b919050565b5f67ffffffffffffffff821115610a0b57610a0a610979565b5b610a1482610909565b9050602081019050919050565b828183375f83830152505050565b5f610a41610a3c846109f1565b6109d7565b905082815260208101848484011115610a5d57610a5c610975565b5b610a68848285610a21565b509392505050565b5f82601f830112610a8457610a83610971565b5b8135610a94848260208601610a2f565b91505092915050565b5f805f60608486031215610ab457610ab3610861565b5b5f610ac186828701610888565b935050602084013567ffffffffffffffff811115610ae257610ae1610865565b5b610aee86828701610a70565b925050604084013567ffffffffffffffff811115610b0f57610b0e610865565b5b610b1b86828701610a70565b9150509250925092565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b4e82610b25565b9050919050565b610b5e81610b44565b82525050565b5f602082019050610b775f830184610b55565b92915050565b610b8681610b44565b8114610b90575f80fd5b50565b5f81359050610ba181610b7d565b92915050565b5f60208284031215610bbc57610bbb610861565b5b5f610bc984828501610b93565b91505092915050565b5f60208284031215610be757610be6610861565b5b5f82013567ffffffffffffffff811115610c0457610c03610865565b5b610c1084828501610a70565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610c5d57607f821691505b602082108103610c7057610c6f610c19565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302610cd27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610c97565b610cdc8683610c97565b95508019841693508086168417925050509392505050565b5f819050919050565b5f610d17610d12610d0d84610869565b610cf4565b610869565b9050919050565b5f819050919050565b610d3083610cfd565b610d44610d3c82610d1e565b848454610ca3565b825550505050565b5f90565b610d58610d4c565b610d63818484610d27565b505050565b5b81811015610d8657610d7b5f82610d50565b600181019050610d69565b5050565b601f821115610dcb57610d9c81610c76565b610da584610c88565b81016020851015610db4578190505b610dc8610dc085610c88565b830182610d68565b50505b505050565b5f82821c905092915050565b5f610deb5f1984600802610dd0565b1980831691505092915050565b5f610e038383610ddc565b9150826002028217905092915050565b610e1c826108c7565b67ffffffffffffffff811115610e3557610e34610979565b5b610e3f8254610c46565b610e4a828285610d8a565b5f60209050601f831160018114610e7b575f8415610e69578287015190505b610e738582610df8565b865550610eda565b601f198416610e8986610c76565b5f5b82811015610eb057848901518255600182019150602085019450602081019050610e8b565b86831015610ecd5784890151610ec9601f891682610ddc565b8355505b6001600288020188555050505b505050505050565b610eeb81610869565b82525050565b5f606082019050610f045f830186610ee2565b8181036020830152610f168185610919565b90508181036040830152610f2a8184610919565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f610f8e602e836108d1565b9150610f9982610f34565b604082019050919050565b5f6020820190508181035f830152610fbb81610f82565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f610ff1610fec610fe784610fc2565b610cf4565b610fcb565b9050919050565b61100181610fd7565b82525050565b5f60208201905061101a5f830184610ff8565b92915050565b5f81905092915050565b7f4d6573736167653d0000000000000000000000000000000000000000000000005f82015250565b5f61105e600883611020565b91506110698261102a565b600882019050919050565b5f61107e826108c7565b6110888185611020565b93506110988185602086016108e1565b80840191505092915050565b5f6110ae82611052565b91506110ba8284611074565b915081905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f636f777361793a76302e302e31000000000000000000000000000000000000005f82015250565b5f611126600d836108d1565b9150611131826110f2565b602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f61117f826108c7565b6111898185611165565b93506111998185602086016108e1565b6111a281610909565b840191505092915050565b5f6111b88383611175565b905092915050565b5f602082019050919050565b5f6111d68261113c565b6111e08185611146565b9350836020820285016111f285611156565b805f5b8581101561122d578484038952815161120e85826111ad565b9450611219836111c0565b925060208a019950506001810190506111f5565b50829750879550505050505092915050565b5f6060820190508181035f8301526112568161111a565b9050818103602083015261126a81856111cc565b90506112796040830184610b55565b9392505050565b5f8151905061128e81610872565b92915050565b5f602082840312156112a9576112a8610861565b5b5f6112b684828501611280565b91505092915050565b5f6040820190506112d25f830185610ee2565b81810360208301526112e48184610919565b90509392505050565b7f4a6f62206d616e616765722061646472657373000000000000000000000000005f82015250565b5f6113216013836108d1565b915061132c826112ed565b602082019050919050565b5f6020820190508181035f83015261134e81611315565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6113af6026836108d1565b91506113ba82611355565b604082019050919050565b5f6020820190508181035f8301526113dc816113a3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6114176020836108d1565b9150611422826113e3565b602082019050919050565b5f6020820190508181035f8301526114448161140b565b905091905056fea2646970667358221220e70512fad6a4309e5f14fc3cfa8d43307e2e07c61bd54386b69e7e5424682b7164736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1571, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobManagerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1574, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobManagerContract", + "offset": 0, + "slot": "2", + "type": "t_contract(ILilypadJobManager)1816" + }, + { + "astId": 1578, + "contract": "contracts/ExampleClient.sol:ExampleClient", + "label": "jobResults", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadJobManager)1816": { + "encoding": "inplace", + "label": "contract ILilypadJobManager", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadController.json b/hardhat/deployments/sepolia/LilypadController.json new file mode 100644 index 00000000..eab1d3a3 --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadController.json @@ -0,0 +1,787 @@ +{ + "address": "0x433C91FA54b9c11550b07672E1FA2b06860e5b05", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "name": "agree", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getJobCreatorAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMediationAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPaymentsAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStorageAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getUsersAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_storageAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_usersAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_paymentsAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_mediationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_jobCreatorAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_jobCreatorAddress", + "type": "address" + } + ], + "name": "setJobCreatorAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mediationAddress", + "type": "address" + } + ], + "name": "setMediationAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_paymentsAddress", + "type": "address" + } + ], + "name": "setPaymentsAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_storageAddress", + "type": "address" + } + ], + "name": "setStorageAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_usersAddress", + "type": "address" + } + ], + "name": "setUsersAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutAgree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutJudgeResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutSubmitResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x86c233fce85bdd581490f6650265641af7edfd8e2251f3ba8694b3791382e360", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0x433C91FA54b9c11550b07672E1FA2b06860e5b05", + "transactionIndex": 21, + "gasUsed": "4910452", + "logsBloom": "0x00000000000000010000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000001000000000004000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000040000000000000000000000000000000000000000000000000", + "blockHash": "0x66e4d795cf2ac644e15719b90ab13dd3424f987fd9d96ea08b33024bdca85617", + "transactionHash": "0x86c233fce85bdd581490f6650265641af7edfd8e2251f3ba8694b3791382e360", + "logs": [ + { + "transactionIndex": 21, + "blockNumber": 4609907, + "transactionHash": "0x86c233fce85bdd581490f6650265641af7edfd8e2251f3ba8694b3791382e360", + "address": "0x433C91FA54b9c11550b07672E1FA2b06860e5b05", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 47, + "blockHash": "0x66e4d795cf2ac644e15719b90ab13dd3424f987fd9d96ea08b33024bdca85617" + } + ], + "blockNumber": 4609907, + "cumulativeGasUsed": "7479980", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"name\":\"agree\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getJobCreatorAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMediationAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPaymentsAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStorageAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUsersAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_usersAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_paymentsAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_mediationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_jobCreatorAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_jobCreatorAddress\",\"type\":\"address\"}],\"name\":\"setJobCreatorAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_mediationAddress\",\"type\":\"address\"}],\"name\":\"setMediationAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_paymentsAddress\",\"type\":\"address\"}],\"name\":\"setPaymentsAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageAddress\",\"type\":\"address\"}],\"name\":\"setStorageAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_usersAddress\",\"type\":\"address\"}],\"name\":\"setUsersAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutAgree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutJudgeResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutSubmitResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addResult(string,string,string,uint256)\":{\"notice\":\"Results\"},\"agree(string,(address,address,address,address[]),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256)),(uint256,uint256,uint256,uint256))\":{\"notice\":\"Agreements\"},\"initialize(address,address,address,address,address)\":{\"notice\":\"Init\"},\"mediationAcceptResult(string)\":{\"notice\":\"Mediation\"},\"timeoutAgree(string)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadController.sol\":\"LilypadController\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ILilypadController.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\ninterface ILilypadController {\\n\\n function agree(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) external returns (SharedStructs.Agreement memory);\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) external;\\n\\n function acceptResult(\\n string memory dealId\\n ) external;\\n \\n function checkResult(\\n string memory dealId\\n ) external;\\n\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutAgree(\\n string memory dealId\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId\\n ) external;\\n \\n function timeoutMediateResult(\\n string memory dealId\\n ) external;\\n}\\n\",\"keccak256\":\"0xa5d13d97588cedea4f83fdfb0744136f8b34140ddd5e22744fe260684498ff9c\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadMediation.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\n// this is our controller contract\\n// it will be called by the mediation handler once a decision has been reached\\ninterface ILilypadMediationRequester {\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n}\\n\\n// this is the contract that will handle mediating a deal\\ninterface ILilypadMediationHandler {\\n function mediationRequest(\\n SharedStructs.Deal memory deal \\n ) external; \\n}\\n\",\"keccak256\":\"0x52cb20c086cfecbe997ba4697c31722f6a93991f7f8ab37a7c8ecbc95993bfd6\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\ninterface ILilypadPayments {\\n\\n /**\\n * Init\\n */\\n\\n function setTokenAddress(\\n address _tokenAddress\\n ) external;\\n\\n /**\\n * Agreements\\n */\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n /**\\n * Results\\n */\\n\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n \\n}\\n\",\"keccak256\":\"0x5b3ea3fa7c4d031fccf44098eafa82cfd79d8358b2feb0c2057fd907b85df7d0\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadStorage.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\ninterface ILilypadStorage {\\n \\n /**\\n * Deals\\n */\\n\\n function getDeal(\\n string memory dealId\\n ) external returns (SharedStructs.Deal memory);\\n\\n function getDealsForParty(\\n address party\\n ) external returns (uint256[] memory);\\n\\n function ensureDeal(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) external returns (SharedStructs.Deal memory);\\n\\n /**\\n * Agreements\\n */\\n\\n function getAgreement(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n \\n function agreeResourceProvider(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n\\n function agreeJobCreator(\\n string memory dealId\\n ) external returns (SharedStructs.Agreement memory);\\n \\n /**\\n * Post Results\\n */\\n\\n function getResult(\\n string memory dealId\\n ) external returns (SharedStructs.Result memory);\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) external returns (SharedStructs.Result memory);\\n\\n /**\\n * Judge Results\\n */\\n\\n function acceptResult(\\n string memory dealId\\n ) external;\\n\\n function checkResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n \\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n function timeoutAgree(\\n string memory dealId\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId\\n ) external;\\n\\n /**\\n * Costings\\n */\\n\\n function getJobCost(\\n string memory dealId\\n ) external returns (uint256);\\n\\n function getResultsCollateral(\\n string memory dealId\\n ) external returns (uint256);\\n \\n /**\\n * Checkers\\n */\\n\\n function hasDeal(\\n string memory dealId\\n ) external returns (bool);\\n\\n function isState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) external returns (bool);\\n \\n}\\n\",\"keccak256\":\"0x3273e3d6ff280111d52ea6a021e224cc9382487c9da0807acc212ccb6d2eb469\",\"license\":\"Apache-2.0\"},\"contracts/LilypadController.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadController.sol\\\";\\nimport \\\"./ILilypadStorage.sol\\\";\\nimport \\\"./ILilypadPayments.sol\\\";\\nimport \\\"./ILilypadMediation.sol\\\";\\n\\ncontract LilypadController is ILilypadController, Ownable, Initializable {\\n\\n /**\\n * Types\\n */\\n \\n address private storageAddress;\\n address private userAddress;\\n address private paymentsAddress;\\n address private mediationAddress;\\n address private jobCreatorAddress;\\n\\n ILilypadStorage private storageContract;\\n ILilypadPayments private paymentsContract;\\n ILilypadMediationHandler private mediationContract;\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _storageAddress,\\n address _usersAddress,\\n address _paymentsAddress,\\n address _mediationAddress,\\n address _jobCreatorAddress\\n ) public initializer {\\n setStorageAddress(_storageAddress);\\n setUsersAddress(_usersAddress);\\n setPaymentsAddress(_paymentsAddress);\\n setMediationAddress(_mediationAddress);\\n setJobCreatorAddress(_jobCreatorAddress);\\n }\\n\\n function setStorageAddress(address _storageAddress) public onlyOwner {\\n require(_storageAddress != address(0), \\\"Storage address\\\");\\n storageAddress = _storageAddress;\\n storageContract = ILilypadStorage(storageAddress);\\n }\\n\\n function getStorageAddress() public view returns(address) {\\n return storageAddress;\\n }\\n\\n function setUsersAddress(address _usersAddress) public onlyOwner {\\n require(_usersAddress != address(0), \\\"Users address\\\");\\n userAddress = _usersAddress;\\n }\\n\\n function getUsersAddress() public view returns(address) {\\n return userAddress;\\n }\\n\\n function setPaymentsAddress(address _paymentsAddress) public onlyOwner {\\n require(_paymentsAddress != address(0), \\\"Payments address\\\");\\n paymentsAddress = _paymentsAddress;\\n paymentsContract = ILilypadPayments(_paymentsAddress);\\n }\\n\\n function getPaymentsAddress() public view returns(address) {\\n return paymentsAddress;\\n }\\n\\n function setMediationAddress(address _mediationAddress) public onlyOwner {\\n require(_mediationAddress != address(0), \\\"Mediation address\\\");\\n mediationAddress = _mediationAddress;\\n mediationContract = ILilypadMediationHandler(_mediationAddress);\\n }\\n\\n function getMediationAddress() public view returns(address) {\\n return mediationAddress;\\n }\\n\\n function setJobCreatorAddress(address _jobCreatorAddress) public onlyOwner {\\n require(_jobCreatorAddress != address(0), \\\"JobCreator address\\\");\\n jobCreatorAddress = _jobCreatorAddress;\\n }\\n\\n function getJobCreatorAddress() public view returns(address) {\\n return jobCreatorAddress;\\n }\\n\\n /**\\n * Agreements\\n */\\n\\n // * create the deal if not exists\\n // * otherwise compare the values to ensure 2 sided agreement\\n // * check the RP or JC is calling this\\n // * if RP:\\n // * mark the deal as RP agreed\\n // * pay in the timeout collateral\\n // * if JC:\\n // * mark the deal as JC agreed\\n // * pay in the payment collateral and timeout collateral\\n // * if both sides have agreed then mark the deal as agreed\\n // * emit the event\\n function agree(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) public override returns (SharedStructs.Agreement memory) {\\n SharedStructs.Deal memory deal = storageContract.ensureDeal(\\n dealId,\\n members,\\n timeouts,\\n pricing\\n );\\n bool isResourceProvider = tx.origin == deal.members.resourceProvider;\\n bool isJobCreator = tx.origin == deal.members.jobCreator;\\n require(isResourceProvider || isJobCreator, \\\"Only RP / JC\\\");\\n\\n if(isResourceProvider) {\\n storageContract.agreeResourceProvider(dealId);\\n paymentsContract.agreeResourceProvider(\\n dealId,\\n deal.members.resourceProvider,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n else if(isJobCreator) {\\n storageContract.agreeJobCreator(dealId);\\n paymentsContract.agreeJobCreator(\\n dealId,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n // the JC paus the judge results collateral\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n return storageContract.getAgreement(dealId);\\n }\\n\\n /**\\n * Results\\n */\\n\\n // * check the RP is calling this\\n // * mark the deal as results submitted\\n // * calculate the cost of the job\\n // * calculate the job collateral based on the multiple\\n // * work out the difference between the timeout and results collateral\\n // * pay the difference into / out of the contract to the RP\\n // * emit the event\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n // this is the CID of the actual data\\n // otherwise onchain clients cannot know the actual data they want to fetch\\n string memory dataId,\\n uint256 instructionCount\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.resourceProvider == tx.origin, \\\"Only RP\\\");\\n\\n storageContract.addResult(\\n dealId,\\n resultsId,\\n dataId,\\n instructionCount\\n );\\n\\n // how many multiple of the job cost must the RP put up as collateral\\n // we need to do this after having added the result otherwise\\n // we don't know the instruction count\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n paymentsContract.addResult(\\n dealId,\\n deal.members.resourceProvider,\\n resultsCollateral,\\n // this is the RP adding a results so they get their submit results timeout collateral back\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n\\n // * check the JC is calling this\\n // * check we are in Submitted state\\n // * mark the deal as results accepted\\n // * calculate the cost of the job\\n // * deduct the cost of the job from the JC payment collateral\\n // * pay the RP the cost of the job\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the cost\\n // * refund the JC the timeout collateral\\n function acceptResult(\\n string memory dealId\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n \\n uint256 jobCost = storageContract.getJobCost(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.acceptResult(dealId);\\n paymentsContract.acceptResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n jobCost,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n // this is the JC judging their result so they get their timeout collateral back\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n\\n // * check the JC is calling this\\n // * check we are in Submitted state\\n // * check the mediator is in the list of RP trusted mediators\\n // * mark the deal as results checked\\n // * charge the JC the mediation fee\\n // * refund the JC the timeout collateral\\n // * emit the Mediation event so the mediator kicks in\\n function checkResult(\\n string memory dealId\\n ) public override {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n\\n // this function will require that the mediator is in the RP's list of trusted mediators\\n storageContract.checkResult(dealId);\\n paymentsContract.checkResult(\\n dealId,\\n deal.members.jobCreator,\\n // this is the JC judging their result so they get their timeout collateral back\\n deal.timeouts.judgeResults.collateral,\\n deal.pricing.mediationFee\\n );\\n\\n // trigger the mediation process by calling the contract\\n mediationContract.mediationRequest(deal);\\n }\\n\\n /**\\n * Mediation\\n */\\n\\n // the mediator calls this to say that the resource provider did the correct job\\n // * check the state is ResultsChecked\\n // * check the mediator is calling this\\n // * mark the deal as mediation accepted\\n // * refund the JC what is left from the payment collateral (if any)\\n // * pay the RP the cost of the job\\n // * refund the RP the results collateral\\n // * pay the mediator for mediating\\n function mediationAcceptResult(\\n string memory dealId\\n ) public override {\\n require(mediationAddress == _msgSender(), \\\"Only mediation\\\");\\n require(_canMediateResult(dealId), \\\"Cannot mediate\\\");\\n \\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n uint256 jobCost = storageContract.getJobCost(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.mediationAcceptResult(dealId);\\n paymentsContract.mediationAcceptResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n jobCost,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n\\n // the mediator calls this to say that the resource provider did the bad job\\n // * check the state is ResultsChecked\\n // * check the mediator is calling this\\n // * mark the deal as mediation rejected\\n // * refund the JC their payment collateral\\n // * slash the RP's results collateral\\n // * pay the mediator for mediating\\n function mediationRejectResult(\\n string memory dealId\\n ) public override {\\n // only the current mediation contract can call this\\n require(mediationAddress == _msgSender(), \\\"Only mediation\\\");\\n require(_canMediateResult(dealId), \\\"Cannot mediate\\\");\\n\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n\\n storageContract.mediationRejectResult(dealId);\\n paymentsContract.mediationRejectResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n\\n function _canMediateResult(\\n string memory dealId \\n ) private returns (bool) {\\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n return true;\\n }\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgree(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.jobCreator == tx.origin || deal.members.resourceProvider == tx.origin, \\\"Only JC or RP\\\");\\n require(agreement.state == SharedStructs.AgreementState.DealNegotiating, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.dealCreatedAt + deal.timeouts.agree.timeout, \\\"Not timed out\\\");\\n storageContract.timeoutAgree(dealId);\\n if (agreement.resourceProviderAgreedAt > 0) {\\n // this is an RP refund\\n paymentsContract.timeoutAgreeRefundResourceProvider(\\n dealId,\\n deal.members.resourceProvider,\\n deal.timeouts.submitResults.collateral\\n );\\n } else if (agreement.jobCreatorAgreedAt > 0) {\\n // this is an JC refund\\n paymentsContract.timeoutAgreeRefundJobCreator(\\n dealId,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n }\\n\\n // the job creator calls this after the timeout has passed and there are no results submitted\\n // * check the JC is calling this\\n // * mark the deal as timedout\\n // * pay back the JC's job collateral\\n // * slash the RP's results collateral\\n // * emit the event\\n function timeoutSubmitResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.jobCreator == tx.origin, \\\"Only JC\\\");\\n require(agreement.state == SharedStructs.AgreementState.DealAgreed, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.dealAgreedAt + deal.timeouts.submitResults.timeout, \\\"Not timed out\\\");\\n storageContract.timeoutSubmitResult(dealId);\\n paymentsContract.timeoutSubmitResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n deal.timeouts.submitResults.collateral\\n );\\n }\\n\\n // the resource provider calls this after the timeout has passed after submitting results\\n // and the job creator has not yet submitted their judgement on those results\\n // * check the RP is calling this\\n // * mark the deal as timedout\\n // * pay back the RP's results collateral\\n // * pay the RP the cost of the job\\n // * slash the JC's timeout collateral\\n // * slash the JC's job collateral\\n // * emit the event\\n function timeoutJudgeResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.resourceProvider == tx.origin, \\\"Only RP\\\");\\n require(agreement.state == SharedStructs.AgreementState.ResultsSubmitted, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \\\"Not timed out\\\");\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n storageContract.timeoutJudgeResult(dealId); \\n paymentsContract.timeoutJudgeResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n resultsCollateral,\\n deal.timeouts.judgeResults.collateral\\n );\\n }\\n\\n // either the JC or RP call this after the timeout has passed after results being checked\\n // this refunds both the payment and results collateral to both the JC and RP\\n // * check the RP or JC is calling this\\n // * mark the deal as timedout\\n // * pay back the RP's results collateral\\n // * pay back the JC's paymnet collateral\\n // * emit the event\\n function timeoutMediateResult(\\n string memory dealId\\n ) public override {\\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\\n require(deal.members.resourceProvider == tx.origin || deal.members.jobCreator == tx.origin, \\\"Only RP or JC\\\");\\n require(agreement.state == SharedStructs.AgreementState.ResultsChecked, \\\"Not correct state\\\");\\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \\\"Not timed out\\\");\\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\\n storageContract.timeoutMediateResult(dealId);\\n paymentsContract.timeoutMediateResult(\\n dealId,\\n deal.members.resourceProvider,\\n deal.members.jobCreator,\\n deal.pricing.paymentCollateral,\\n resultsCollateral,\\n deal.pricing.mediationFee\\n );\\n }\\n}\\n\",\"keccak256\":\"0x410bcc3720253017a3e0f510443998a5aba3302805cd7f9458e4b28cbf00fd97\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801562000010575f80fd5b5062000031620000256200003760201b60201c565b6200003e60201b60201c565b620000ff565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b615788806200010d5f395ff3fe608060405234801561000f575f80fd5b5060043610610156575f3560e01c8063795f9abf116100c1578063bbfff47d1161007a578063bbfff47d1461034a578063d48b108414610366578063e7b957d114610384578063e850be37146103a0578063f2fde38b146103bc578063f583b125146103d857610156565b8063795f9abf1461029e57806380ffdfe0146102ba578063824518aa146102d65780638da5cb5b146102f257806393dbed3e14610310578063b4031e541461032e57610156565b806343391cca1161011357806343391cca1461020857806346834d1e14610224578063511a9f681461024057806359b910d61461025c578063640e570f14610278578063715018a61461029457610156565b80630aca35ce1461015a5780631459457a14610178578063155329ea14610194578063297f9e55146101b2578063393a4d34146101ce5780633955548e146101ec575b5f80fd5b610162610408565b60405161016f91906137a3565b60405180910390f35b610192600480360381019061018d91906137f7565b610430565b005b61019c610597565b6040516101a991906137a3565b60405180910390f35b6101cc60048036038101906101c791906139aa565b6105bf565b005b6101d6610a2f565b6040516101e391906137a3565b60405180910390f35b61020660048036038101906102019190613a24565b610a57565b005b610222600480360381019061021d9190613adc565b610e33565b005b61023e600480360381019061023991906139aa565b610f2c565b005b61025a600480360381019061025591906139aa565b6112d9565b005b61027660048036038101906102719190613adc565b611692565b005b610292600480360381019061028d9190613adc565b6117ac565b005b61029c6118a5565b005b6102b860048036038101906102b391906139aa565b6118b8565b005b6102d460048036038101906102cf91906139aa565b611d61565b005b6102f060048036038101906102eb91906139aa565b6120b9565b005b6102fa6124b1565b60405161030791906137a3565b60405180910390f35b6103186124d8565b60405161032591906137a3565b60405180910390f35b61034860048036038101906103439190613adc565b612500565b005b610364600480360381019061035f9190613adc565b6125b9565b005b61036e612672565b60405161037b91906137a3565b60405180910390f35b61039e600480360381019061039991906139aa565b61269a565b005b6103ba60048036038101906103b591906139aa565b612b2d565b005b6103d660048036038101906103d19190613adc565b612f7c565b005b6103f260048036038101906103ed9190613d9c565b612ffe565b6040516103ff9190613fda565b60405180910390f35b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff16159050808015610461575060015f60149054906101000a900460ff1660ff16105b8061048f5750610470306134a3565b15801561048e575060015f60149054906101000a900460ff1660ff16145b5b6104ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c590614074565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff160217905550801561050a5760015f60156101000a81548160ff0219169083151502179055505b61051386611692565b61051c856125b9565b610525846117ac565b61052e83610e33565b61053782612500565b801561058f575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161058691906140e0565b60405180910390a15b505050505050565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b815260040161061c929190614172565b6020604051808303815f875af1158015610638573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061065c91906141d5565b61069b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106929061424a565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016106f69190614268565b5f604051808303815f875af1158015610711573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610739919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff16146107b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a8906146bc565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161080c9190614268565b6020604051808303815f875af1158015610828573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084c91906146da565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016108a99190614268565b6020604051808303815f875af11580156108c5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e991906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663297f9e55856040518263ffffffff1660e01b81526004016109459190614268565b5f604051808303815f87803b15801561095c575f80fd5b505af115801561096e573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b13567148585602001516040015186602001516020015186886060015160200151878a6040015160400151602001516040518863ffffffff1660e01b81526004016109fc9796959493929190614714565b5f604051808303815f87803b158015610a13575f80fd5b505af1158015610a25573d5f803e3d5ffd5b5050505050505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8560016040518363ffffffff1660e01b8152600401610ab4929190614172565b6020604051808303815f875af1158015610ad0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af491906141d5565b610b33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2a906147d2565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180866040518263ffffffff1660e01b8152600401610b8e9190614268565b5f604051808303815f875af1158015610ba9573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610bd1919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516040015173ffffffffffffffffffffffffffffffffffffffff1614610c49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c409061483a565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633955548e868686866040518563ffffffff1660e01b8152600401610ca99493929190614858565b5f604051808303815f875af1158015610cc4573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610cec9190614979565b505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f876040518263ffffffff1660e01b8152600401610d489190614268565b6020604051808303815f875af1158015610d64573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8891906146da565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309cab5108784602001516040015184866040015160200151602001516040518563ffffffff1660e01b8152600401610dfe94939291906149c0565b5f604051808303815f87803b158015610e15575f80fd5b505af1158015610e27573d5f803e3d5ffd5b50505050505050505050565b610e3b6134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea090614a54565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b8152600401610f89929190614172565b6020604051808303815f875af1158015610fa5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fc991906141d5565b611008576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fff9061424a565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016110639190614268565b5f604051808303815f875af115801561107e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906110a6919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff161461111e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611115906146bc565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346834d1e836040518263ffffffff1660e01b81526004016111789190614268565b5f604051808303815f87803b15801561118f575f80fd5b505af11580156111a1573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aea3825183836020015160200151846040015160400151602001518560600151606001516040518563ffffffff1660e01b815260040161122194939291906149c0565b5f604051808303815f87803b158015611238575f80fd5b505af115801561124a573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370bea207826040518263ffffffff1660e01b81526004016112a89190614d0e565b5f604051808303815f87803b1580156112bf575f80fd5b505af11580156112d1573d5f803e3d5ffd5b505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016113349190614268565b5f604051808303815f875af115801561134f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611377919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016113d49190614268565b6101c0604051808303815f875af11580156113f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114159190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161461148d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611484906146bc565b60405180910390fd5b6001600a8111156114a1576114a0613e3a565b5b815f0151600a8111156114b7576114b6613e3a565b5b146114f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ee90614f12565b60405180910390fd5b8160400151602001515f015181608001516115129190614f5d565b4211611553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154a90614fda565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663511a9f68846040518263ffffffff1660e01b81526004016115ad9190614268565b5f604051808303815f87803b1580156115c4575f80fd5b505af11580156115d6573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d31a11584846020015160400151856020015160200151866060015160200151876040015160200151602001516040518663ffffffff1660e01b8152600401611660959493929190614ff8565b5f604051808303815f87803b158015611677575f80fd5b505af1158015611689573d5f803e3d5ffd5b50505050505050565b61169a6134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611708576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ff9061509a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6117b46134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181990615102565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6118ad6134c5565b6118b65f613543565b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016119139190614268565b5f604051808303815f875af115801561192e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611956919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016119b39190614268565b6101c0604051808303815f875af11580156119d0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119f49190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161480611a6b57503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16145b611aaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa19061516a565b60405180910390fd5b5f600a811115611abd57611abc613e3a565b5b815f0151600a811115611ad357611ad2613e3a565b5b14611b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0a90614f12565b60405180910390fd5b81604001515f01515f01518160600151611b2d9190614f5d565b4211611b6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6590614fda565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663795f9abf846040518263ffffffff1660e01b8152600401611bc89190614268565b5f604051808303815f87803b158015611bdf575f80fd5b505af1158015611bf1573d5f803e3d5ffd5b505050505f81602001511115611ca55760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef0d89e84846020015160400151856040015160200151602001516040518463ffffffff1660e01b8152600401611c7393929190615188565b5f604051808303815f87803b158015611c8a575f80fd5b505af1158015611c9c573d5f803e3d5ffd5b50505050611d5c565b5f81604001511115611d5b5760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663afe1dff784846020015160200151856060015160200151866040015160200151602001516040518563ffffffff1660e01b8152600401611d2d94939291906149c0565b5f604051808303815f87803b158015611d44575f80fd5b505af1158015611d56573d5f803e3d5ffd5b505050505b5b505050565b611d69613604565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee9061520e565b60405180910390fd5b611e008161360b565b611e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3690615276565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401611e9a9190614268565b5f604051808303815f875af1158015611eb5573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611edd919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f846040518263ffffffff1660e01b8152600401611f3a9190614268565b6020604051808303815f875af1158015611f56573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f7a91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380ffdfe0846040518263ffffffff1660e01b8152600401611fd69190614268565b5f604051808303815f87803b158015611fed575f80fd5b505af1158015611fff573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2485cce84846020015160400151856020015160200151866060015160200151868860600151606001516040518763ffffffff1660e01b815260040161208796959493929190615294565b5f604051808303815f87803b15801561209e575f80fd5b505af11580156120b0573d5f803e3d5ffd5b50505050505050565b6120c1613604565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461214f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121469061520e565b60405180910390fd5b6121588161360b565b612197576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218e90615276565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016121f29190614268565b5f604051808303815f875af115801561220d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612235919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b81526004016122929190614268565b6020604051808303815f875af11580156122ae573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d291906146da565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b815260040161232f9190614268565b6020604051808303815f875af115801561234b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061236f91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663824518aa856040518263ffffffff1660e01b81526004016123cb9190614268565b5f604051808303815f87803b1580156123e2575f80fd5b505af11580156123f4573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a1f90728585602001516040015186602001516020015186886060015160200151878a60600151606001516040518863ffffffff1660e01b815260040161247e9796959493929190614714565b5f604051808303815f87803b158015612495575f80fd5b505af11580156124a7573d5f803e3d5ffd5b5050505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6125086134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256d90615344565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6125c16134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361262f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612626906153ac565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016126f59190614268565b5f604051808303815f875af1158015612710573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612738919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016127959190614268565b6101c0604051808303815f875af11580156127b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d69190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16148061284d57503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff16145b61288c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288390615414565b60405180910390fd5b6004600a8111156128a05761289f613e3a565b5b815f0151600a8111156128b6576128b5613e3a565b5b146128f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ed90614f12565b60405180910390fd5b8160400151604001515f01518160a001516129119190614f5d565b4211612952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294990614fda565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016129ad9190614268565b6020604051808303815f875af11580156129c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129ed91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7b957d1856040518263ffffffff1660e01b8152600401612a499190614268565b5f604051808303815f87803b158015612a60575f80fd5b505af1158015612a72573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663823f3de185856020015160400151866020015160200151876060015160200151868960600151606001516040518763ffffffff1660e01b8152600401612afa96959493929190615294565b5f604051808303815f87803b158015612b11575f80fd5b505af1158015612b23573d5f803e3d5ffd5b5050505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401612b889190614268565b5f604051808303815f875af1158015612ba3573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612bcb919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b8152600401612c289190614268565b6101c0604051808303815f875af1158015612c45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c699190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614612ce1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd89061483a565b60405180910390fd5b6002600a811115612cf557612cf4613e3a565b5b815f0151600a811115612d0b57612d0a613e3a565b5b14612d4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4290614f12565b60405180910390fd5b8160400151604001515f01518160a00151612d669190614f5d565b4211612da7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d9e90614fda565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612e029190614268565b6020604051808303815f875af1158015612e1e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e4291906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e850be37856040518263ffffffff1660e01b8152600401612e9e9190614268565b5f604051808303815f87803b158015612eb5575f80fd5b505af1158015612ec7573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a6726b58585602001516040015186602001516020015185886040015160400151602001516040518663ffffffff1660e01b8152600401612f49959493929190614ff8565b5f604051808303815f87803b158015612f60575f80fd5b505af1158015612f72573d5f803e3d5ffd5b5050505050505050565b612f846134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ff2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fe9906154a2565b60405180910390fd5b612ffb81613543565b50565b6130066136f1565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6370b0e878787876040518563ffffffff1660e01b815260040161306794939291906155c7565b5f604051808303815f875af1158015613082573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906130aa919061462b565b90505f81602001516040015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161490505f82602001516020015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905081806131295750805b613168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315f90615664565b60405180910390fd5b81156132ae5760065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ec95b967896040518263ffffffff1660e01b81526004016131c89190614268565b6101c0604051808303815f875af11580156131e5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132099190614e9c565b5060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639e3868dc89856020015160400151866040015160200151602001516040518463ffffffff1660e01b815260040161327c93929190615188565b5f604051808303815f87803b158015613293575f80fd5b505af11580156132a5573d5f803e3d5ffd5b505050506133fb565b80156133fa5760065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c4135da896040518263ffffffff1660e01b815260040161330e9190614268565b6101c0604051808303815f875af115801561332b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061334f9190614e9c565b5060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b918803589856020015160200151866060015160200151876040015160400151602001516040518563ffffffff1660e01b81526004016133cc94939291906149c0565b5f604051808303815f87803b1580156133e3575f80fd5b505af11580156133f5573d5f803e3d5ffd5b505050505b5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d896040518263ffffffff1660e01b81526004016134559190614268565b6101c0604051808303815f875af1158015613472573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134969190614e9c565b9350505050949350505050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6134cd613604565b73ffffffffffffffffffffffffffffffffffffffff166134eb6124b1565b73ffffffffffffffffffffffffffffffffffffffff1614613541576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613538906156cc565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8360046040518363ffffffff1660e01b8152600401613669929190614172565b6020604051808303815f875af1158015613685573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136a991906141d5565b6136e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136df90615734565b60405180910390fd5b60019050919050565b604051806101c001604052805f600a8111156137105761370f613e3a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61378d82613764565b9050919050565b61379d81613783565b82525050565b5f6020820190506137b65f830184613794565b92915050565b5f604051905090565b5f80fd5b5f80fd5b6137d681613783565b81146137e0575f80fd5b50565b5f813590506137f1816137cd565b92915050565b5f805f805f60a086880312156138105761380f6137c5565b5b5f61381d888289016137e3565b955050602061382e888289016137e3565b945050604061383f888289016137e3565b9350506060613850888289016137e3565b9250506080613861888289016137e3565b9150509295509295909350565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6138bc82613876565b810181811067ffffffffffffffff821117156138db576138da613886565b5b80604052505050565b5f6138ed6137bc565b90506138f982826138b3565b919050565b5f67ffffffffffffffff82111561391857613917613886565b5b61392182613876565b9050602081019050919050565b828183375f83830152505050565b5f61394e613949846138fe565b6138e4565b90508281526020810184848401111561396a57613969613872565b5b61397584828561392e565b509392505050565b5f82601f8301126139915761399061386e565b5b81356139a184826020860161393c565b91505092915050565b5f602082840312156139bf576139be6137c5565b5b5f82013567ffffffffffffffff8111156139dc576139db6137c9565b5b6139e88482850161397d565b91505092915050565b5f819050919050565b613a03816139f1565b8114613a0d575f80fd5b50565b5f81359050613a1e816139fa565b92915050565b5f805f8060808587031215613a3c57613a3b6137c5565b5b5f85013567ffffffffffffffff811115613a5957613a586137c9565b5b613a658782880161397d565b945050602085013567ffffffffffffffff811115613a8657613a856137c9565b5b613a928782880161397d565b935050604085013567ffffffffffffffff811115613ab357613ab26137c9565b5b613abf8782880161397d565b9250506060613ad087828801613a10565b91505092959194509250565b5f60208284031215613af157613af06137c5565b5b5f613afe848285016137e3565b91505092915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115613b2957613b28613886565b5b602082029050602081019050919050565b5f80fd5b5f613b50613b4b84613b0f565b6138e4565b90508083825260208201905060208402830185811115613b7357613b72613b3a565b5b835b81811015613b9c5780613b8888826137e3565b845260208401935050602081019050613b75565b5050509392505050565b5f82601f830112613bba57613bb961386e565b5b8135613bca848260208601613b3e565b91505092915050565b5f60808284031215613be857613be7613b07565b5b613bf260806138e4565b90505f613c01848285016137e3565b5f830152506020613c14848285016137e3565b6020830152506040613c28848285016137e3565b604083015250606082013567ffffffffffffffff811115613c4c57613c4b613b0b565b5b613c5884828501613ba6565b60608301525092915050565b5f60408284031215613c7957613c78613b07565b5b613c8360406138e4565b90505f613c9284828501613a10565b5f830152506020613ca584828501613a10565b60208301525092915050565b5f6101008284031215613cc757613cc6613b07565b5b613cd160806138e4565b90505f613ce084828501613c64565b5f830152506040613cf384828501613c64565b6020830152506080613d0784828501613c64565b60408301525060c0613d1b84828501613c64565b60608301525092915050565b5f60808284031215613d3c57613d3b613b07565b5b613d4660806138e4565b90505f613d5584828501613a10565b5f830152506020613d6884828501613a10565b6020830152506040613d7c84828501613a10565b6040830152506060613d9084828501613a10565b60608301525092915050565b5f805f806101c08587031215613db557613db46137c5565b5b5f85013567ffffffffffffffff811115613dd257613dd16137c9565b5b613dde8782880161397d565b945050602085013567ffffffffffffffff811115613dff57613dfe6137c9565b5b613e0b87828801613bd3565b9350506040613e1c87828801613cb1565b925050610140613e2e87828801613d27565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b8110613e7857613e77613e3a565b5b50565b5f819050613e8882613e67565b919050565b5f613e9782613e7b565b9050919050565b613ea781613e8d565b82525050565b613eb6816139f1565b82525050565b6101c082015f820151613ed15f850182613e9e565b506020820151613ee46020850182613ead565b506040820151613ef76040850182613ead565b506060820151613f0a6060850182613ead565b506080820151613f1d6080850182613ead565b5060a0820151613f3060a0850182613ead565b5060c0820151613f4360c0850182613ead565b5060e0820151613f5660e0850182613ead565b50610100820151613f6b610100850182613ead565b50610120820151613f80610120850182613ead565b50610140820151613f95610140850182613ead565b50610160820151613faa610160850182613ead565b50610180820151613fbf610180850182613ead565b506101a0820151613fd46101a0850182613ead565b50505050565b5f6101c082019050613fee5f830184613ebc565b92915050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f61405e602e83613ff4565b915061406982614004565b604082019050919050565b5f6020820190508181035f83015261408b81614052565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f6140ca6140c56140c084614092565b6140a7565b61409b565b9050919050565b6140da816140b0565b82525050565b5f6020820190506140f35f8301846140d1565b92915050565b5f81519050919050565b5f5b83811015614120578082015181840152602081019050614105565b5f8484015250505050565b5f614135826140f9565b61413f8185613ff4565b935061414f818560208601614103565b61415881613876565b840191505092915050565b61416c81613e8d565b82525050565b5f6040820190508181035f83015261418a818561412b565b90506141996020830184614163565b9392505050565b5f8115159050919050565b6141b4816141a0565b81146141be575f80fd5b50565b5f815190506141cf816141ab565b92915050565b5f602082840312156141ea576141e96137c5565b5b5f6141f7848285016141c1565b91505092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f614234601083613ff4565b915061423f82614200565b602082019050919050565b5f6020820190508181035f83015261426181614228565b9050919050565b5f6020820190508181035f830152614280818461412b565b905092915050565b5f61429a614295846138fe565b6138e4565b9050828152602081018484840111156142b6576142b5613872565b5b6142c1848285614103565b509392505050565b5f82601f8301126142dd576142dc61386e565b5b81516142ed848260208601614288565b91505092915050565b5f81519050614304816137cd565b92915050565b5f61431c61431784613b0f565b6138e4565b9050808382526020820190506020840283018581111561433f5761433e613b3a565b5b835b81811015614368578061435488826142f6565b845260208401935050602081019050614341565b5050509392505050565b5f82601f8301126143865761438561386e565b5b815161439684826020860161430a565b91505092915050565b5f608082840312156143b4576143b3613b07565b5b6143be60806138e4565b90505f6143cd848285016142f6565b5f8301525060206143e0848285016142f6565b60208301525060406143f4848285016142f6565b604083015250606082015167ffffffffffffffff81111561441857614417613b0b565b5b61442484828501614372565b60608301525092915050565b5f8151905061443e816139fa565b92915050565b5f6040828403121561445957614458613b07565b5b61446360406138e4565b90505f61447284828501614430565b5f83015250602061448584828501614430565b60208301525092915050565b5f61010082840312156144a7576144a6613b07565b5b6144b160806138e4565b90505f6144c084828501614444565b5f8301525060406144d384828501614444565b60208301525060806144e784828501614444565b60408301525060c06144fb84828501614444565b60608301525092915050565b5f6080828403121561451c5761451b613b07565b5b61452660806138e4565b90505f61453584828501614430565b5f83015250602061454884828501614430565b602083015250604061455c84828501614430565b604083015250606061457084828501614430565b60608301525092915050565b5f6101c0828403121561459257614591613b07565b5b61459c60806138e4565b90505f82015167ffffffffffffffff8111156145bb576145ba613b0b565b5b6145c7848285016142c9565b5f83015250602082015167ffffffffffffffff8111156145ea576145e9613b0b565b5b6145f68482850161439f565b602083015250604061460a84828501614491565b60408301525061014061461f84828501614507565b60608301525092915050565b5f602082840312156146405761463f6137c5565b5b5f82015167ffffffffffffffff81111561465d5761465c6137c9565b5b6146698482850161457c565b91505092915050565b7f4f6e6c79204a43000000000000000000000000000000000000000000000000005f82015250565b5f6146a6600783613ff4565b91506146b182614672565b602082019050919050565b5f6020820190508181035f8301526146d38161469a565b9050919050565b5f602082840312156146ef576146ee6137c5565b5b5f6146fc84828501614430565b91505092915050565b61470e816139f1565b82525050565b5f60e0820190508181035f83015261472c818a61412b565b905061473b6020830189613794565b6147486040830188613794565b6147556060830187614705565b6147626080830186614705565b61476f60a0830185614705565b61477c60c0830184614705565b98975050505050505050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f6147bc600a83613ff4565b91506147c782614788565b602082019050919050565b5f6020820190508181035f8301526147e9816147b0565b9050919050565b7f4f6e6c79205250000000000000000000000000000000000000000000000000005f82015250565b5f614824600783613ff4565b915061482f826147f0565b602082019050919050565b5f6020820190508181035f83015261485181614818565b9050919050565b5f6080820190508181035f830152614870818761412b565b90508181036020830152614884818661412b565b90508181036040830152614898818561412b565b90506148a76060830184614705565b95945050505050565b5f608082840312156148c5576148c4613b07565b5b6148cf60806138e4565b90505f82015167ffffffffffffffff8111156148ee576148ed613b0b565b5b6148fa848285016142c9565b5f83015250602082015167ffffffffffffffff81111561491d5761491c613b0b565b5b614929848285016142c9565b602083015250604082015167ffffffffffffffff81111561494d5761494c613b0b565b5b614959848285016142c9565b604083015250606061496d84828501614430565b60608301525092915050565b5f6020828403121561498e5761498d6137c5565b5b5f82015167ffffffffffffffff8111156149ab576149aa6137c9565b5b6149b7848285016148b0565b91505092915050565b5f6080820190508181035f8301526149d8818761412b565b90506149e76020830186613794565b6149f46040830185614705565b614a016060830184614705565b95945050505050565b7f4d6564696174696f6e20616464726573730000000000000000000000000000005f82015250565b5f614a3e601183613ff4565b9150614a4982614a0a565b602082019050919050565b5f6020820190508181035f830152614a6b81614a32565b9050919050565b5f82825260208201905092915050565b5f614a8c826140f9565b614a968185614a72565b9350614aa6818560208601614103565b614aaf81613876565b840191505092915050565b614ac381613783565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f614afd8383614aba565b60208301905092915050565b5f602082019050919050565b5f614b1f82614ac9565b614b298185614ad3565b9350614b3483614ae3565b805f5b83811015614b64578151614b4b8882614af2565b9750614b5683614b09565b925050600181019050614b37565b5085935050505092915050565b5f608083015f830151614b865f860182614aba565b506020830151614b996020860182614aba565b506040830151614bac6040860182614aba565b5060608301518482036060860152614bc48282614b15565b9150508091505092915050565b604082015f820151614be55f850182613ead565b506020820151614bf86020850182613ead565b50505050565b61010082015f820151614c135f850182614bd1565b506020820151614c266040850182614bd1565b506040820151614c396080850182614bd1565b506060820151614c4c60c0850182614bd1565b50505050565b608082015f820151614c665f850182613ead565b506020820151614c796020850182613ead565b506040820151614c8c6040850182613ead565b506060820151614c9f6060850182613ead565b50505050565b5f6101c083015f8301518482035f860152614cc08282614a82565b91505060208301518482036020860152614cda8282614b71565b9150506040830151614cef6040860182614bfe565b506060830151614d03610140860182614c52565b508091505092915050565b5f6020820190508181035f830152614d268184614ca5565b905092915050565b600b8110614d3a575f80fd5b50565b5f81519050614d4b81614d2e565b92915050565b5f6101c08284031215614d6757614d66613b07565b5b614d726101c06138e4565b90505f614d8184828501614d3d565b5f830152506020614d9484828501614430565b6020830152506040614da884828501614430565b6040830152506060614dbc84828501614430565b6060830152506080614dd084828501614430565b60808301525060a0614de484828501614430565b60a08301525060c0614df884828501614430565b60c08301525060e0614e0c84828501614430565b60e083015250610100614e2184828501614430565b61010083015250610120614e3784828501614430565b61012083015250610140614e4d84828501614430565b61014083015250610160614e6384828501614430565b61016083015250610180614e7984828501614430565b610180830152506101a0614e8f84828501614430565b6101a08301525092915050565b5f6101c08284031215614eb257614eb16137c5565b5b5f614ebf84828501614d51565b91505092915050565b7f4e6f7420636f72726563742073746174650000000000000000000000000000005f82015250565b5f614efc601183613ff4565b9150614f0782614ec8565b602082019050919050565b5f6020820190508181035f830152614f2981614ef0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614f67826139f1565b9150614f72836139f1565b9250828201905080821115614f8a57614f89614f30565b5b92915050565b7f4e6f742074696d6564206f7574000000000000000000000000000000000000005f82015250565b5f614fc4600d83613ff4565b9150614fcf82614f90565b602082019050919050565b5f6020820190508181035f830152614ff181614fb8565b9050919050565b5f60a0820190508181035f830152615010818861412b565b905061501f6020830187613794565b61502c6040830186613794565b6150396060830185614705565b6150466080830184614705565b9695505050505050565b7f53746f72616765206164647265737300000000000000000000000000000000005f82015250565b5f615084600f83613ff4565b915061508f82615050565b602082019050919050565b5f6020820190508181035f8301526150b181615078565b9050919050565b7f5061796d656e74732061646472657373000000000000000000000000000000005f82015250565b5f6150ec601083613ff4565b91506150f7826150b8565b602082019050919050565b5f6020820190508181035f830152615119816150e0565b9050919050565b7f4f6e6c79204a43206f72205250000000000000000000000000000000000000005f82015250565b5f615154600d83613ff4565b915061515f82615120565b602082019050919050565b5f6020820190508181035f83015261518181615148565b9050919050565b5f6060820190508181035f8301526151a0818661412b565b90506151af6020830185613794565b6151bc6040830184614705565b949350505050565b7f4f6e6c79206d6564696174696f6e0000000000000000000000000000000000005f82015250565b5f6151f8600e83613ff4565b9150615203826151c4565b602082019050919050565b5f6020820190508181035f830152615225816151ec565b9050919050565b7f43616e6e6f74206d6564696174650000000000000000000000000000000000005f82015250565b5f615260600e83613ff4565b915061526b8261522c565b602082019050919050565b5f6020820190508181035f83015261528d81615254565b9050919050565b5f60c0820190508181035f8301526152ac818961412b565b90506152bb6020830188613794565b6152c86040830187613794565b6152d56060830186614705565b6152e26080830185614705565b6152ef60a0830184614705565b979650505050505050565b7f4a6f6243726561746f72206164647265737300000000000000000000000000005f82015250565b5f61532e601283613ff4565b9150615339826152fa565b602082019050919050565b5f6020820190508181035f83015261535b81615322565b9050919050565b7f55736572732061646472657373000000000000000000000000000000000000005f82015250565b5f615396600d83613ff4565b91506153a182615362565b602082019050919050565b5f6020820190508181035f8301526153c38161538a565b9050919050565b7f4f6e6c79205250206f72204a43000000000000000000000000000000000000005f82015250565b5f6153fe600d83613ff4565b9150615409826153ca565b602082019050919050565b5f6020820190508181035f83015261542b816153f2565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61548c602683613ff4565b915061549782615432565b604082019050919050565b5f6020820190508181035f8301526154b981615480565b9050919050565b5f608083015f8301516154d55f860182614aba565b5060208301516154e86020860182614aba565b5060408301516154fb6040860182614aba565b50606083015184820360608601526155138282614b15565b9150508091505092915050565b61010082015f8201516155355f850182614bd1565b5060208201516155486040850182614bd1565b50604082015161555b6080850182614bd1565b50606082015161556e60c0850182614bd1565b50505050565b608082015f8201516155885f850182613ead565b50602082015161559b6020850182613ead565b5060408201516155ae6040850182613ead565b5060608201516155c16060850182613ead565b50505050565b5f6101c0820190508181035f8301526155e0818761412b565b905081810360208301526155f481866154c0565b90506156036040830185615520565b615611610140830184615574565b95945050505050565b7f4f6e6c79205250202f204a4300000000000000000000000000000000000000005f82015250565b5f61564e600c83613ff4565b91506156598261561a565b602082019050919050565b5f6020820190508181035f83015261567b81615642565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6156b6602083613ff4565b91506156c182615682565b602082019050919050565b5f6020820190508181035f8301526156e3816156aa565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61571e600e83613ff4565b9150615729826156ea565b602082019050919050565b5f6020820190508181035f83015261574b81615712565b905091905056fea2646970667358221220d97697418471cc732e39c2584d386474b7ecc7e9c444732a9210fae12fd1b54e64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610156575f3560e01c8063795f9abf116100c1578063bbfff47d1161007a578063bbfff47d1461034a578063d48b108414610366578063e7b957d114610384578063e850be37146103a0578063f2fde38b146103bc578063f583b125146103d857610156565b8063795f9abf1461029e57806380ffdfe0146102ba578063824518aa146102d65780638da5cb5b146102f257806393dbed3e14610310578063b4031e541461032e57610156565b806343391cca1161011357806343391cca1461020857806346834d1e14610224578063511a9f681461024057806359b910d61461025c578063640e570f14610278578063715018a61461029457610156565b80630aca35ce1461015a5780631459457a14610178578063155329ea14610194578063297f9e55146101b2578063393a4d34146101ce5780633955548e146101ec575b5f80fd5b610162610408565b60405161016f91906137a3565b60405180910390f35b610192600480360381019061018d91906137f7565b610430565b005b61019c610597565b6040516101a991906137a3565b60405180910390f35b6101cc60048036038101906101c791906139aa565b6105bf565b005b6101d6610a2f565b6040516101e391906137a3565b60405180910390f35b61020660048036038101906102019190613a24565b610a57565b005b610222600480360381019061021d9190613adc565b610e33565b005b61023e600480360381019061023991906139aa565b610f2c565b005b61025a600480360381019061025591906139aa565b6112d9565b005b61027660048036038101906102719190613adc565b611692565b005b610292600480360381019061028d9190613adc565b6117ac565b005b61029c6118a5565b005b6102b860048036038101906102b391906139aa565b6118b8565b005b6102d460048036038101906102cf91906139aa565b611d61565b005b6102f060048036038101906102eb91906139aa565b6120b9565b005b6102fa6124b1565b60405161030791906137a3565b60405180910390f35b6103186124d8565b60405161032591906137a3565b60405180910390f35b61034860048036038101906103439190613adc565b612500565b005b610364600480360381019061035f9190613adc565b6125b9565b005b61036e612672565b60405161037b91906137a3565b60405180910390f35b61039e600480360381019061039991906139aa565b61269a565b005b6103ba60048036038101906103b591906139aa565b612b2d565b005b6103d660048036038101906103d19190613adc565b612f7c565b005b6103f260048036038101906103ed9190613d9c565b612ffe565b6040516103ff9190613fda565b60405180910390f35b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f8060159054906101000a900460ff16159050808015610461575060015f60149054906101000a900460ff1660ff16105b8061048f5750610470306134a3565b15801561048e575060015f60149054906101000a900460ff1660ff16145b5b6104ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c590614074565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff160217905550801561050a5760015f60156101000a81548160ff0219169083151502179055505b61051386611692565b61051c856125b9565b610525846117ac565b61052e83610e33565b61053782612500565b801561058f575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161058691906140e0565b60405180910390a15b505050505050565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b815260040161061c929190614172565b6020604051808303815f875af1158015610638573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061065c91906141d5565b61069b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106929061424a565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016106f69190614268565b5f604051808303815f875af1158015610711573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610739919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff16146107b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a8906146bc565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b815260040161080c9190614268565b6020604051808303815f875af1158015610828573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061084c91906146da565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016108a99190614268565b6020604051808303815f875af11580156108c5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e991906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663297f9e55856040518263ffffffff1660e01b81526004016109459190614268565b5f604051808303815f87803b15801561095c575f80fd5b505af115801561096e573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b13567148585602001516040015186602001516020015186886060015160200151878a6040015160400151602001516040518863ffffffff1660e01b81526004016109fc9796959493929190614714565b5f604051808303815f87803b158015610a13575f80fd5b505af1158015610a25573d5f803e3d5ffd5b5050505050505050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8560016040518363ffffffff1660e01b8152600401610ab4929190614172565b6020604051808303815f875af1158015610ad0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af491906141d5565b610b33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2a906147d2565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180866040518263ffffffff1660e01b8152600401610b8e9190614268565b5f604051808303815f875af1158015610ba9573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610bd1919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516040015173ffffffffffffffffffffffffffffffffffffffff1614610c49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c409061483a565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633955548e868686866040518563ffffffff1660e01b8152600401610ca99493929190614858565b5f604051808303815f875af1158015610cc4573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610cec9190614979565b505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f876040518263ffffffff1660e01b8152600401610d489190614268565b6020604051808303815f875af1158015610d64573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8891906146da565b905060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166309cab5108784602001516040015184866040015160200151602001516040518563ffffffff1660e01b8152600401610dfe94939291906149c0565b5f604051808303815f87803b158015610e15575f80fd5b505af1158015610e27573d5f803e3d5ffd5b50505050505050505050565b610e3b6134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea090614a54565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8260026040518363ffffffff1660e01b8152600401610f89929190614172565b6020604051808303815f875af1158015610fa5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fc991906141d5565b611008576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fff9061424a565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016110639190614268565b5f604051808303815f875af115801561107e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906110a6919061462b565b90503273ffffffffffffffffffffffffffffffffffffffff1681602001516020015173ffffffffffffffffffffffffffffffffffffffff161461111e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611115906146bc565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346834d1e836040518263ffffffff1660e01b81526004016111789190614268565b5f604051808303815f87803b15801561118f575f80fd5b505af11580156111a1573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aea3825183836020015160200151846040015160400151602001518560600151606001516040518563ffffffff1660e01b815260040161122194939291906149c0565b5f604051808303815f87803b158015611238575f80fd5b505af115801561124a573d5f803e3d5ffd5b5050505060085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370bea207826040518263ffffffff1660e01b81526004016112a89190614d0e565b5f604051808303815f87803b1580156112bf575f80fd5b505af11580156112d1573d5f803e3d5ffd5b505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016113349190614268565b5f604051808303815f875af115801561134f573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611377919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016113d49190614268565b6101c0604051808303815f875af11580156113f1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114159190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161461148d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611484906146bc565b60405180910390fd5b6001600a8111156114a1576114a0613e3a565b5b815f0151600a8111156114b7576114b6613e3a565b5b146114f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ee90614f12565b60405180910390fd5b8160400151602001515f015181608001516115129190614f5d565b4211611553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154a90614fda565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663511a9f68846040518263ffffffff1660e01b81526004016115ad9190614268565b5f604051808303815f87803b1580156115c4575f80fd5b505af11580156115d6573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d31a11584846020015160400151856020015160200151866060015160200151876040015160200151602001516040518663ffffffff1660e01b8152600401611660959493929190614ff8565b5f604051808303815f87803b158015611677575f80fd5b505af1158015611689573d5f803e3d5ffd5b50505050505050565b61169a6134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611708576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ff9061509a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6117b46134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181990615102565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6118ad6134c5565b6118b65f613543565b565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016119139190614268565b5f604051808303815f875af115801561192e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611956919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016119b39190614268565b6101c0604051808303815f875af11580156119d0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119f49190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff161480611a6b57503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16145b611aaa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa19061516a565b60405180910390fd5b5f600a811115611abd57611abc613e3a565b5b815f0151600a811115611ad357611ad2613e3a565b5b14611b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0a90614f12565b60405180910390fd5b81604001515f01515f01518160600151611b2d9190614f5d565b4211611b6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6590614fda565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663795f9abf846040518263ffffffff1660e01b8152600401611bc89190614268565b5f604051808303815f87803b158015611bdf575f80fd5b505af1158015611bf1573d5f803e3d5ffd5b505050505f81602001511115611ca55760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ef0d89e84846020015160400151856040015160200151602001516040518463ffffffff1660e01b8152600401611c7393929190615188565b5f604051808303815f87803b158015611c8a575f80fd5b505af1158015611c9c573d5f803e3d5ffd5b50505050611d5c565b5f81604001511115611d5b5760075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663afe1dff784846020015160200151856060015160200151866040015160200151602001516040518563ffffffff1660e01b8152600401611d2d94939291906149c0565b5f604051808303815f87803b158015611d44575f80fd5b505af1158015611d56573d5f803e3d5ffd5b505050505b5b505050565b611d69613604565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee9061520e565b60405180910390fd5b611e008161360b565b611e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3690615276565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401611e9a9190614268565b5f604051808303815f875af1158015611eb5573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611edd919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f846040518263ffffffff1660e01b8152600401611f3a9190614268565b6020604051808303815f875af1158015611f56573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f7a91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166380ffdfe0846040518263ffffffff1660e01b8152600401611fd69190614268565b5f604051808303815f87803b158015611fed575f80fd5b505af1158015611fff573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d2485cce84846020015160400151856020015160200151866060015160200151868860600151606001516040518763ffffffff1660e01b815260040161208796959493929190615294565b5f604051808303815f87803b15801561209e575f80fd5b505af11580156120b0573d5f803e3d5ffd5b50505050505050565b6120c1613604565b73ffffffffffffffffffffffffffffffffffffffff1660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461214f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121469061520e565b60405180910390fd5b6121588161360b565b612197576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218e90615276565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016121f29190614268565b5f604051808303815f875af115801561220d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612235919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166373db5c6a846040518263ffffffff1660e01b81526004016122929190614268565b6020604051808303815f875af11580156122ae573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d291906146da565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b815260040161232f9190614268565b6020604051808303815f875af115801561234b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061236f91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663824518aa856040518263ffffffff1660e01b81526004016123cb9190614268565b5f604051808303815f87803b1580156123e2575f80fd5b505af11580156123f4573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a1f90728585602001516040015186602001516020015186886060015160200151878a60600151606001516040518863ffffffff1660e01b815260040161247e9796959493929190614714565b5f604051808303815f87803b158015612495575f80fd5b505af11580156124a7573d5f803e3d5ffd5b5050505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6125086134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256d90615344565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6125c16134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361262f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612626906153ac565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b81526004016126f59190614268565b5f604051808303815f875af1158015612710573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612738919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b81526004016127959190614268565b6101c0604051808303815f875af11580156127b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127d69190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff16148061284d57503273ffffffffffffffffffffffffffffffffffffffff1682602001516020015173ffffffffffffffffffffffffffffffffffffffff16145b61288c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288390615414565b60405180910390fd5b6004600a8111156128a05761289f613e3a565b5b815f0151600a8111156128b6576128b5613e3a565b5b146128f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ed90614f12565b60405180910390fd5b8160400151604001515f01518160a001516129119190614f5d565b4211612952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294990614fda565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b81526004016129ad9190614268565b6020604051808303815f875af11580156129c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129ed91906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7b957d1856040518263ffffffff1660e01b8152600401612a499190614268565b5f604051808303815f87803b158015612a60575f80fd5b505af1158015612a72573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663823f3de185856020015160400151866020015160200151876060015160200151868960600151606001516040518763ffffffff1660e01b8152600401612afa96959493929190615294565b5f604051808303815f87803b158015612b11575f80fd5b505af1158015612b23573d5f803e3d5ffd5b5050505050505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e7079180836040518263ffffffff1660e01b8152600401612b889190614268565b5f604051808303815f875af1158015612ba3573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612bcb919061462b565b90505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d846040518263ffffffff1660e01b8152600401612c289190614268565b6101c0604051808303815f875af1158015612c45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c699190614e9c565b90503273ffffffffffffffffffffffffffffffffffffffff1682602001516040015173ffffffffffffffffffffffffffffffffffffffff1614612ce1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd89061483a565b60405180910390fd5b6002600a811115612cf557612cf4613e3a565b5b815f0151600a811115612d0b57612d0a613e3a565b5b14612d4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4290614f12565b60405180910390fd5b8160400151604001515f01518160a00151612d669190614f5d565b4211612da7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d9e90614fda565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638224ce5f856040518263ffffffff1660e01b8152600401612e029190614268565b6020604051808303815f875af1158015612e1e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e4291906146da565b905060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e850be37856040518263ffffffff1660e01b8152600401612e9e9190614268565b5f604051808303815f87803b158015612eb5575f80fd5b505af1158015612ec7573d5f803e3d5ffd5b5050505060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637a6726b58585602001516040015186602001516020015185886040015160400151602001516040518663ffffffff1660e01b8152600401612f49959493929190614ff8565b5f604051808303815f87803b158015612f60575f80fd5b505af1158015612f72573d5f803e3d5ffd5b5050505050505050565b612f846134c5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ff2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fe9906154a2565b60405180910390fd5b612ffb81613543565b50565b6130066136f1565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a6370b0e878787876040518563ffffffff1660e01b815260040161306794939291906155c7565b5f604051808303815f875af1158015613082573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906130aa919061462b565b90505f81602001516040015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161490505f82602001516020015173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614905081806131295750805b613168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161315f90615664565b60405180910390fd5b81156132ae5760065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ec95b967896040518263ffffffff1660e01b81526004016131c89190614268565b6101c0604051808303815f875af11580156131e5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132099190614e9c565b5060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639e3868dc89856020015160400151866040015160200151602001516040518463ffffffff1660e01b815260040161327c93929190615188565b5f604051808303815f87803b158015613293575f80fd5b505af11580156132a5573d5f803e3d5ffd5b505050506133fb565b80156133fa5760065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c4135da896040518263ffffffff1660e01b815260040161330e9190614268565b6101c0604051808303815f875af115801561332b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061334f9190614e9c565b5060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b918803589856020015160200151866060015160200151876040015160400151602001516040518563ffffffff1660e01b81526004016133cc94939291906149c0565b5f604051808303815f87803b1580156133e3575f80fd5b505af11580156133f5573d5f803e3d5ffd5b505050505b5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cdd82d1d896040518263ffffffff1660e01b81526004016134559190614268565b6101c0604051808303815f875af1158015613472573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906134969190614e9c565b9350505050949350505050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6134cd613604565b73ffffffffffffffffffffffffffffffffffffffff166134eb6124b1565b73ffffffffffffffffffffffffffffffffffffffff1614613541576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613538906156cc565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b050e74b8360046040518363ffffffff1660e01b8152600401613669929190614172565b6020604051808303815f875af1158015613685573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136a991906141d5565b6136e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136df90615734565b60405180910390fd5b60019050919050565b604051806101c001604052805f600a8111156137105761370f613e3a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61378d82613764565b9050919050565b61379d81613783565b82525050565b5f6020820190506137b65f830184613794565b92915050565b5f604051905090565b5f80fd5b5f80fd5b6137d681613783565b81146137e0575f80fd5b50565b5f813590506137f1816137cd565b92915050565b5f805f805f60a086880312156138105761380f6137c5565b5b5f61381d888289016137e3565b955050602061382e888289016137e3565b945050604061383f888289016137e3565b9350506060613850888289016137e3565b9250506080613861888289016137e3565b9150509295509295909350565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6138bc82613876565b810181811067ffffffffffffffff821117156138db576138da613886565b5b80604052505050565b5f6138ed6137bc565b90506138f982826138b3565b919050565b5f67ffffffffffffffff82111561391857613917613886565b5b61392182613876565b9050602081019050919050565b828183375f83830152505050565b5f61394e613949846138fe565b6138e4565b90508281526020810184848401111561396a57613969613872565b5b61397584828561392e565b509392505050565b5f82601f8301126139915761399061386e565b5b81356139a184826020860161393c565b91505092915050565b5f602082840312156139bf576139be6137c5565b5b5f82013567ffffffffffffffff8111156139dc576139db6137c9565b5b6139e88482850161397d565b91505092915050565b5f819050919050565b613a03816139f1565b8114613a0d575f80fd5b50565b5f81359050613a1e816139fa565b92915050565b5f805f8060808587031215613a3c57613a3b6137c5565b5b5f85013567ffffffffffffffff811115613a5957613a586137c9565b5b613a658782880161397d565b945050602085013567ffffffffffffffff811115613a8657613a856137c9565b5b613a928782880161397d565b935050604085013567ffffffffffffffff811115613ab357613ab26137c9565b5b613abf8782880161397d565b9250506060613ad087828801613a10565b91505092959194509250565b5f60208284031215613af157613af06137c5565b5b5f613afe848285016137e3565b91505092915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff821115613b2957613b28613886565b5b602082029050602081019050919050565b5f80fd5b5f613b50613b4b84613b0f565b6138e4565b90508083825260208201905060208402830185811115613b7357613b72613b3a565b5b835b81811015613b9c5780613b8888826137e3565b845260208401935050602081019050613b75565b5050509392505050565b5f82601f830112613bba57613bb961386e565b5b8135613bca848260208601613b3e565b91505092915050565b5f60808284031215613be857613be7613b07565b5b613bf260806138e4565b90505f613c01848285016137e3565b5f830152506020613c14848285016137e3565b6020830152506040613c28848285016137e3565b604083015250606082013567ffffffffffffffff811115613c4c57613c4b613b0b565b5b613c5884828501613ba6565b60608301525092915050565b5f60408284031215613c7957613c78613b07565b5b613c8360406138e4565b90505f613c9284828501613a10565b5f830152506020613ca584828501613a10565b60208301525092915050565b5f6101008284031215613cc757613cc6613b07565b5b613cd160806138e4565b90505f613ce084828501613c64565b5f830152506040613cf384828501613c64565b6020830152506080613d0784828501613c64565b60408301525060c0613d1b84828501613c64565b60608301525092915050565b5f60808284031215613d3c57613d3b613b07565b5b613d4660806138e4565b90505f613d5584828501613a10565b5f830152506020613d6884828501613a10565b6020830152506040613d7c84828501613a10565b6040830152506060613d9084828501613a10565b60608301525092915050565b5f805f806101c08587031215613db557613db46137c5565b5b5f85013567ffffffffffffffff811115613dd257613dd16137c9565b5b613dde8782880161397d565b945050602085013567ffffffffffffffff811115613dff57613dfe6137c9565b5b613e0b87828801613bd3565b9350506040613e1c87828801613cb1565b925050610140613e2e87828801613d27565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b8110613e7857613e77613e3a565b5b50565b5f819050613e8882613e67565b919050565b5f613e9782613e7b565b9050919050565b613ea781613e8d565b82525050565b613eb6816139f1565b82525050565b6101c082015f820151613ed15f850182613e9e565b506020820151613ee46020850182613ead565b506040820151613ef76040850182613ead565b506060820151613f0a6060850182613ead565b506080820151613f1d6080850182613ead565b5060a0820151613f3060a0850182613ead565b5060c0820151613f4360c0850182613ead565b5060e0820151613f5660e0850182613ead565b50610100820151613f6b610100850182613ead565b50610120820151613f80610120850182613ead565b50610140820151613f95610140850182613ead565b50610160820151613faa610160850182613ead565b50610180820151613fbf610180850182613ead565b506101a0820151613fd46101a0850182613ead565b50505050565b5f6101c082019050613fee5f830184613ebc565b92915050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f61405e602e83613ff4565b915061406982614004565b604082019050919050565b5f6020820190508181035f83015261408b81614052565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f6140ca6140c56140c084614092565b6140a7565b61409b565b9050919050565b6140da816140b0565b82525050565b5f6020820190506140f35f8301846140d1565b92915050565b5f81519050919050565b5f5b83811015614120578082015181840152602081019050614105565b5f8484015250505050565b5f614135826140f9565b61413f8185613ff4565b935061414f818560208601614103565b61415881613876565b840191505092915050565b61416c81613e8d565b82525050565b5f6040820190508181035f83015261418a818561412b565b90506141996020830184614163565b9392505050565b5f8115159050919050565b6141b4816141a0565b81146141be575f80fd5b50565b5f815190506141cf816141ab565b92915050565b5f602082840312156141ea576141e96137c5565b5b5f6141f7848285016141c1565b91505092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f614234601083613ff4565b915061423f82614200565b602082019050919050565b5f6020820190508181035f83015261426181614228565b9050919050565b5f6020820190508181035f830152614280818461412b565b905092915050565b5f61429a614295846138fe565b6138e4565b9050828152602081018484840111156142b6576142b5613872565b5b6142c1848285614103565b509392505050565b5f82601f8301126142dd576142dc61386e565b5b81516142ed848260208601614288565b91505092915050565b5f81519050614304816137cd565b92915050565b5f61431c61431784613b0f565b6138e4565b9050808382526020820190506020840283018581111561433f5761433e613b3a565b5b835b81811015614368578061435488826142f6565b845260208401935050602081019050614341565b5050509392505050565b5f82601f8301126143865761438561386e565b5b815161439684826020860161430a565b91505092915050565b5f608082840312156143b4576143b3613b07565b5b6143be60806138e4565b90505f6143cd848285016142f6565b5f8301525060206143e0848285016142f6565b60208301525060406143f4848285016142f6565b604083015250606082015167ffffffffffffffff81111561441857614417613b0b565b5b61442484828501614372565b60608301525092915050565b5f8151905061443e816139fa565b92915050565b5f6040828403121561445957614458613b07565b5b61446360406138e4565b90505f61447284828501614430565b5f83015250602061448584828501614430565b60208301525092915050565b5f61010082840312156144a7576144a6613b07565b5b6144b160806138e4565b90505f6144c084828501614444565b5f8301525060406144d384828501614444565b60208301525060806144e784828501614444565b60408301525060c06144fb84828501614444565b60608301525092915050565b5f6080828403121561451c5761451b613b07565b5b61452660806138e4565b90505f61453584828501614430565b5f83015250602061454884828501614430565b602083015250604061455c84828501614430565b604083015250606061457084828501614430565b60608301525092915050565b5f6101c0828403121561459257614591613b07565b5b61459c60806138e4565b90505f82015167ffffffffffffffff8111156145bb576145ba613b0b565b5b6145c7848285016142c9565b5f83015250602082015167ffffffffffffffff8111156145ea576145e9613b0b565b5b6145f68482850161439f565b602083015250604061460a84828501614491565b60408301525061014061461f84828501614507565b60608301525092915050565b5f602082840312156146405761463f6137c5565b5b5f82015167ffffffffffffffff81111561465d5761465c6137c9565b5b6146698482850161457c565b91505092915050565b7f4f6e6c79204a43000000000000000000000000000000000000000000000000005f82015250565b5f6146a6600783613ff4565b91506146b182614672565b602082019050919050565b5f6020820190508181035f8301526146d38161469a565b9050919050565b5f602082840312156146ef576146ee6137c5565b5b5f6146fc84828501614430565b91505092915050565b61470e816139f1565b82525050565b5f60e0820190508181035f83015261472c818a61412b565b905061473b6020830189613794565b6147486040830188613794565b6147556060830187614705565b6147626080830186614705565b61476f60a0830185614705565b61477c60c0830184614705565b98975050505050505050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f6147bc600a83613ff4565b91506147c782614788565b602082019050919050565b5f6020820190508181035f8301526147e9816147b0565b9050919050565b7f4f6e6c79205250000000000000000000000000000000000000000000000000005f82015250565b5f614824600783613ff4565b915061482f826147f0565b602082019050919050565b5f6020820190508181035f83015261485181614818565b9050919050565b5f6080820190508181035f830152614870818761412b565b90508181036020830152614884818661412b565b90508181036040830152614898818561412b565b90506148a76060830184614705565b95945050505050565b5f608082840312156148c5576148c4613b07565b5b6148cf60806138e4565b90505f82015167ffffffffffffffff8111156148ee576148ed613b0b565b5b6148fa848285016142c9565b5f83015250602082015167ffffffffffffffff81111561491d5761491c613b0b565b5b614929848285016142c9565b602083015250604082015167ffffffffffffffff81111561494d5761494c613b0b565b5b614959848285016142c9565b604083015250606061496d84828501614430565b60608301525092915050565b5f6020828403121561498e5761498d6137c5565b5b5f82015167ffffffffffffffff8111156149ab576149aa6137c9565b5b6149b7848285016148b0565b91505092915050565b5f6080820190508181035f8301526149d8818761412b565b90506149e76020830186613794565b6149f46040830185614705565b614a016060830184614705565b95945050505050565b7f4d6564696174696f6e20616464726573730000000000000000000000000000005f82015250565b5f614a3e601183613ff4565b9150614a4982614a0a565b602082019050919050565b5f6020820190508181035f830152614a6b81614a32565b9050919050565b5f82825260208201905092915050565b5f614a8c826140f9565b614a968185614a72565b9350614aa6818560208601614103565b614aaf81613876565b840191505092915050565b614ac381613783565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f614afd8383614aba565b60208301905092915050565b5f602082019050919050565b5f614b1f82614ac9565b614b298185614ad3565b9350614b3483614ae3565b805f5b83811015614b64578151614b4b8882614af2565b9750614b5683614b09565b925050600181019050614b37565b5085935050505092915050565b5f608083015f830151614b865f860182614aba565b506020830151614b996020860182614aba565b506040830151614bac6040860182614aba565b5060608301518482036060860152614bc48282614b15565b9150508091505092915050565b604082015f820151614be55f850182613ead565b506020820151614bf86020850182613ead565b50505050565b61010082015f820151614c135f850182614bd1565b506020820151614c266040850182614bd1565b506040820151614c396080850182614bd1565b506060820151614c4c60c0850182614bd1565b50505050565b608082015f820151614c665f850182613ead565b506020820151614c796020850182613ead565b506040820151614c8c6040850182613ead565b506060820151614c9f6060850182613ead565b50505050565b5f6101c083015f8301518482035f860152614cc08282614a82565b91505060208301518482036020860152614cda8282614b71565b9150506040830151614cef6040860182614bfe565b506060830151614d03610140860182614c52565b508091505092915050565b5f6020820190508181035f830152614d268184614ca5565b905092915050565b600b8110614d3a575f80fd5b50565b5f81519050614d4b81614d2e565b92915050565b5f6101c08284031215614d6757614d66613b07565b5b614d726101c06138e4565b90505f614d8184828501614d3d565b5f830152506020614d9484828501614430565b6020830152506040614da884828501614430565b6040830152506060614dbc84828501614430565b6060830152506080614dd084828501614430565b60808301525060a0614de484828501614430565b60a08301525060c0614df884828501614430565b60c08301525060e0614e0c84828501614430565b60e083015250610100614e2184828501614430565b61010083015250610120614e3784828501614430565b61012083015250610140614e4d84828501614430565b61014083015250610160614e6384828501614430565b61016083015250610180614e7984828501614430565b610180830152506101a0614e8f84828501614430565b6101a08301525092915050565b5f6101c08284031215614eb257614eb16137c5565b5b5f614ebf84828501614d51565b91505092915050565b7f4e6f7420636f72726563742073746174650000000000000000000000000000005f82015250565b5f614efc601183613ff4565b9150614f0782614ec8565b602082019050919050565b5f6020820190508181035f830152614f2981614ef0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614f67826139f1565b9150614f72836139f1565b9250828201905080821115614f8a57614f89614f30565b5b92915050565b7f4e6f742074696d6564206f7574000000000000000000000000000000000000005f82015250565b5f614fc4600d83613ff4565b9150614fcf82614f90565b602082019050919050565b5f6020820190508181035f830152614ff181614fb8565b9050919050565b5f60a0820190508181035f830152615010818861412b565b905061501f6020830187613794565b61502c6040830186613794565b6150396060830185614705565b6150466080830184614705565b9695505050505050565b7f53746f72616765206164647265737300000000000000000000000000000000005f82015250565b5f615084600f83613ff4565b915061508f82615050565b602082019050919050565b5f6020820190508181035f8301526150b181615078565b9050919050565b7f5061796d656e74732061646472657373000000000000000000000000000000005f82015250565b5f6150ec601083613ff4565b91506150f7826150b8565b602082019050919050565b5f6020820190508181035f830152615119816150e0565b9050919050565b7f4f6e6c79204a43206f72205250000000000000000000000000000000000000005f82015250565b5f615154600d83613ff4565b915061515f82615120565b602082019050919050565b5f6020820190508181035f83015261518181615148565b9050919050565b5f6060820190508181035f8301526151a0818661412b565b90506151af6020830185613794565b6151bc6040830184614705565b949350505050565b7f4f6e6c79206d6564696174696f6e0000000000000000000000000000000000005f82015250565b5f6151f8600e83613ff4565b9150615203826151c4565b602082019050919050565b5f6020820190508181035f830152615225816151ec565b9050919050565b7f43616e6e6f74206d6564696174650000000000000000000000000000000000005f82015250565b5f615260600e83613ff4565b915061526b8261522c565b602082019050919050565b5f6020820190508181035f83015261528d81615254565b9050919050565b5f60c0820190508181035f8301526152ac818961412b565b90506152bb6020830188613794565b6152c86040830187613794565b6152d56060830186614705565b6152e26080830185614705565b6152ef60a0830184614705565b979650505050505050565b7f4a6f6243726561746f72206164647265737300000000000000000000000000005f82015250565b5f61532e601283613ff4565b9150615339826152fa565b602082019050919050565b5f6020820190508181035f83015261535b81615322565b9050919050565b7f55736572732061646472657373000000000000000000000000000000000000005f82015250565b5f615396600d83613ff4565b91506153a182615362565b602082019050919050565b5f6020820190508181035f8301526153c38161538a565b9050919050565b7f4f6e6c79205250206f72204a43000000000000000000000000000000000000005f82015250565b5f6153fe600d83613ff4565b9150615409826153ca565b602082019050919050565b5f6020820190508181035f83015261542b816153f2565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61548c602683613ff4565b915061549782615432565b604082019050919050565b5f6020820190508181035f8301526154b981615480565b9050919050565b5f608083015f8301516154d55f860182614aba565b5060208301516154e86020860182614aba565b5060408301516154fb6040860182614aba565b50606083015184820360608601526155138282614b15565b9150508091505092915050565b61010082015f8201516155355f850182614bd1565b5060208201516155486040850182614bd1565b50604082015161555b6080850182614bd1565b50606082015161556e60c0850182614bd1565b50505050565b608082015f8201516155885f850182613ead565b50602082015161559b6020850182613ead565b5060408201516155ae6040850182613ead565b5060608201516155c16060850182613ead565b50505050565b5f6101c0820190508181035f8301526155e0818761412b565b905081810360208301526155f481866154c0565b90506156036040830185615520565b615611610140830184615574565b95945050505050565b7f4f6e6c79205250202f204a4300000000000000000000000000000000000000005f82015250565b5f61564e600c83613ff4565b91506156598261561a565b602082019050919050565b5f6020820190508181035f83015261567b81615642565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6156b6602083613ff4565b91506156c182615682565b602082019050919050565b5f6020820190508181035f8301526156e3816156aa565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61571e600e83613ff4565b9150615729826156ea565b602082019050919050565b5f6020820190508181035f83015261574b81615712565b905091905056fea2646970667358221220d97697418471cc732e39c2584d386474b7ecc7e9c444732a9210fae12fd1b54e64736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addResult(string,string,string,uint256)": { + "notice": "Results" + }, + "agree(string,(address,address,address,address[]),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256)),(uint256,uint256,uint256,uint256))": { + "notice": "Agreements" + }, + "initialize(address,address,address,address,address)": { + "notice": "Init" + }, + "mediationAcceptResult(string)": { + "notice": "Mediation" + }, + "timeoutAgree(string)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2279, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "storageAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 2281, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "userAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 2283, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "paymentsAddress", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 2285, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "mediationAddress", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2287, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "jobCreatorAddress", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 2290, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "storageContract", + "offset": 0, + "slot": "6", + "type": "t_contract(ILilypadStorage)2164" + }, + { + "astId": 2293, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "paymentsContract", + "offset": 0, + "slot": "7", + "type": "t_contract(ILilypadPayments)2002" + }, + { + "astId": 2296, + "contract": "contracts/LilypadController.sol:LilypadController", + "label": "mediationContract", + "offset": 0, + "slot": "8", + "type": "t_contract(ILilypadMediationHandler)1837" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadMediationHandler)1837": { + "encoding": "inplace", + "label": "contract ILilypadMediationHandler", + "numberOfBytes": "20" + }, + "t_contract(ILilypadPayments)2002": { + "encoding": "inplace", + "label": "contract ILilypadPayments", + "numberOfBytes": "20" + }, + "t_contract(ILilypadStorage)2164": { + "encoding": "inplace", + "label": "contract ILilypadStorage", + "numberOfBytes": "20" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadMediationRandom.json b/hardhat/deployments/sepolia/LilypadMediationRandom.json new file mode 100644 index 00000000..020eaa61 --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadMediationRandom.json @@ -0,0 +1,470 @@ +{ + "address": "0xe294485d0C03adCe1BE2c2791522A6c0585A4f7B", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "mediator", + "type": "address" + } + ], + "name": "MediationRequested", + "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" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getMediator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "deal", + "type": "tuple" + } + ], + "name": "mediationRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3e1bff4b55270313307e970ad5d758450e57b60d77443f2b350e27722f4b3fc9", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0xe294485d0C03adCe1BE2c2791522A6c0585A4f7B", + "transactionIndex": 36, + "gasUsed": "1506321", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000001000000000004000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000001000008000000000000000000000000000000010000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd80a322c6e8b26a3278d8fd1c3d66db06be0fd03b782a39824bcfaf4ab44ed9a", + "transactionHash": "0x3e1bff4b55270313307e970ad5d758450e57b60d77443f2b350e27722f4b3fc9", + "logs": [ + { + "transactionIndex": 36, + "blockNumber": 4609899, + "transactionHash": "0x3e1bff4b55270313307e970ad5d758450e57b60d77443f2b350e27722f4b3fc9", + "address": "0xe294485d0C03adCe1BE2c2791522A6c0585A4f7B", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 51, + "blockHash": "0xd80a322c6e8b26a3278d8fd1c3d66db06be0fd03b782a39824bcfaf4ab44ed9a" + } + ], + "blockNumber": 4609899, + "cumulativeGasUsed": "6311620", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"mediator\",\"type\":\"address\"}],\"name\":\"MediationRequested\",\"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\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getMediator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"deal\",\"type\":\"tuple\"}],\"name\":\"mediationRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize()\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadMediationRandom.sol\":\"LilypadMediationRandom\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadMediation.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\n\\n// this is our controller contract\\n// it will be called by the mediation handler once a decision has been reached\\ninterface ILilypadMediationRequester {\\n function mediationAcceptResult(\\n string memory dealId\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) external;\\n}\\n\\n// this is the contract that will handle mediating a deal\\ninterface ILilypadMediationHandler {\\n function mediationRequest(\\n SharedStructs.Deal memory deal \\n ) external; \\n}\\n\",\"keccak256\":\"0x52cb20c086cfecbe997ba4697c31722f6a93991f7f8ab37a7c8ecbc95993bfd6\",\"license\":\"Apache-2.0\"},\"contracts/LilypadMediationRandom.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadMediation.sol\\\";\\n\\ncontract LilypadMediationRandom is ControllerOwnable, Initializable {\\n\\n // keep track of which mediators were choosen for which deals\\n mapping(string => address) private mediators;\\n\\n event MediationRequested(\\n string dealId,\\n address mediator\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n // this is called by the controller contract\\n function mediationRequest(\\n SharedStructs.Deal memory deal\\n ) public onlyController {\\n uint randomIndex = uint(keccak256(abi.encodePacked(block.timestamp, deal.dealId))) % deal.members.mediators.length;\\n address mediator = deal.members.mediators[randomIndex];\\n require(mediator != address(0), \\\"mediator cannot be 0x0\\\");\\n mediators[deal.dealId] = mediator;\\n emit MediationRequested(deal.dealId, mediator);\\n }\\n\\n function getMediator(\\n string memory dealId\\n ) public view returns(address) {\\n return mediators[dealId];\\n }\\n\\n // call the controller contract as a ILilypadMediationRequester\\n function mediationAcceptResult(\\n string memory dealId\\n ) public {\\n // check the tx.origin is the same mediator that was picked\\n require(mediators[dealId] != address(0), \\\"mediator cannot be 0x0\\\");\\n require(mediators[dealId] == tx.origin, \\\"tx.origin must be the mediator\\\");\\n // call the controller contract\\n ILilypadMediationRequester(getControllerAddress()).mediationAcceptResult(dealId);\\n }\\n\\n // call the controller contract as a ILilypadMediationRequester\\n function mediationRejectResult(\\n string memory dealId\\n ) public {\\n // check the tx.origin is the same mediator that was picked\\n require(mediators[dealId] != address(0), \\\"mediator cannot be 0x0\\\");\\n require(mediators[dealId] == tx.origin, \\\"tx.origin must be the mediator\\\");\\n // call the controller contract\\n ILilypadMediationRequester(getControllerAddress()).mediationRejectResult(dealId);\\n }\\n}\\n\",\"keccak256\":\"0x233756564fbb3cb3dde9f75b37d5713ee0081adddbaf9067551050bb80f727cb\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff021916908315150217905550348015610029575f80fd5b5061004661003b61004b60201b60201c565b61005260201b60201c565b610113565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611974806101205f395ff3fe608060405234801561000f575f80fd5b50600436106100a7575f3560e01c80638da5cb5b1161006f5780638da5cb5b14610113578063a2bffa0014610131578063a470295814610161578063c57380a21461016b578063f2fde38b14610189578063f3d3d448146101a5576100a7565b806370bea207146100ab578063715018a6146100c757806380ffdfe0146100d15780638129fc1c146100ed578063824518aa146100f7575b5f80fd5b6100c560048036038101906100c0919061120f565b6101c1565b005b6100cf610343565b005b6100eb60048036038101906100e69190611256565b610356565b005b6100f561051c565b005b610111600480360381019061010c9190611256565b610653565b005b61011b610819565b60405161012891906112ac565b60405180910390f35b61014b60048036038101906101469190611256565b610840565b60405161015891906112ac565b60405180910390f35b610169610886565b005b6101736108aa565b60405161018091906112ac565b60405180910390f35b6101a3600480360381019061019e91906112c5565b6108d2565b005b6101bf60048036038101906101ba91906112c5565b610954565b005b6101c9610a5c565b505f8160200151606001515142835f01516040516020016101eb92919061137c565b604051602081830303815290604052805190602001205f1c61020d91906113d0565b90505f826020015160600151828151811061022b5761022a611400565b5b602002602001015190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029a90611487565b60405180910390fd5b806002845f01516040516102b791906114a5565b90815260200160405180910390205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffd3770121045f9427361660d6eaa8b07a2e45eca6964f5c4f041a28f21084086835f0151826040516103369291906114f3565b60405180910390a1505050565b61034b610b89565b6103545f610c07565b565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161037d91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f890611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161042891906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a39061156b565b60405180910390fd5b6104b46108aa565b73ffffffffffffffffffffffffffffffffffffffff166380ffdfe0826040518263ffffffff1660e01b81526004016104ec9190611589565b5f604051808303815f87803b158015610503575f80fd5b505af1158015610515573d5f803e3d5ffd5b5050505050565b5f600160169054906101000a900460ff1615905080801561054e575060018060159054906101000a900460ff1660ff16105b8061057c575061055d30610cc8565b15801561057b575060018060159054906101000a900460ff1660ff16145b5b6105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611619565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156105f75760018060166101000a81548160ff0219169083151502179055505b8015610650575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106479190611685565b60405180910390a15b50565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161067a91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f590611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161072591906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a09061156b565b60405180910390fd5b6107b16108aa565b73ffffffffffffffffffffffffffffffffffffffff1663824518aa826040518263ffffffff1660e01b81526004016107e99190611589565b5f604051808303815f87803b158015610800575f80fd5b505af1158015610812573d5f803e3d5ffd5b5050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60028260405161085191906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61088e610b89565b5f600160146101000a81548160ff021916908315150217905550565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108da610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f9061170e565b60405180910390fd5b61095181610c07565b50565b61095c610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c19061179c565b60405180910390fd5b600160149054906101000a900460ff16610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a109061182a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae39061179c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b2c610cea565b73ffffffffffffffffffffffffffffffffffffffff1614610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b79906118b8565b60405180910390fd5b6001905090565b610b91610cea565b73ffffffffffffffffffffffffffffffffffffffff16610baf610819565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90611920565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610d4c82610d06565b810181811067ffffffffffffffff82111715610d6b57610d6a610d16565b5b80604052505050565b5f610d7d610cf1565b9050610d898282610d43565b919050565b5f80fd5b5f80fd5b5f80fd5b5f67ffffffffffffffff821115610db457610db3610d16565b5b610dbd82610d06565b9050602081019050919050565b828183375f83830152505050565b5f610dea610de584610d9a565b610d74565b905082815260208101848484011115610e0657610e05610d96565b5b610e11848285610dca565b509392505050565b5f82601f830112610e2d57610e2c610d92565b5b8135610e3d848260208601610dd8565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e6f82610e46565b9050919050565b610e7f81610e65565b8114610e89575f80fd5b50565b5f81359050610e9a81610e76565b92915050565b5f67ffffffffffffffff821115610eba57610eb9610d16565b5b602082029050602081019050919050565b5f80fd5b5f610ee1610edc84610ea0565b610d74565b90508083825260208201905060208402830185811115610f0457610f03610ecb565b5b835b81811015610f2d5780610f198882610e8c565b845260208401935050602081019050610f06565b5050509392505050565b5f82601f830112610f4b57610f4a610d92565b5b8135610f5b848260208601610ecf565b91505092915050565b5f60808284031215610f7957610f78610d02565b5b610f836080610d74565b90505f610f9284828501610e8c565b5f830152506020610fa584828501610e8c565b6020830152506040610fb984828501610e8c565b604083015250606082013567ffffffffffffffff811115610fdd57610fdc610d8e565b5b610fe984828501610f37565b60608301525092915050565b5f819050919050565b61100781610ff5565b8114611011575f80fd5b50565b5f8135905061102281610ffe565b92915050565b5f6040828403121561103d5761103c610d02565b5b6110476040610d74565b90505f61105684828501611014565b5f83015250602061106984828501611014565b60208301525092915050565b5f610100828403121561108b5761108a610d02565b5b6110956080610d74565b90505f6110a484828501611028565b5f8301525060406110b784828501611028565b60208301525060806110cb84828501611028565b60408301525060c06110df84828501611028565b60608301525092915050565b5f60808284031215611100576110ff610d02565b5b61110a6080610d74565b90505f61111984828501611014565b5f83015250602061112c84828501611014565b602083015250604061114084828501611014565b604083015250606061115484828501611014565b60608301525092915050565b5f6101c0828403121561117657611175610d02565b5b6111806080610d74565b90505f82013567ffffffffffffffff81111561119f5761119e610d8e565b5b6111ab84828501610e19565b5f83015250602082013567ffffffffffffffff8111156111ce576111cd610d8e565b5b6111da84828501610f64565b60208301525060406111ee84828501611075565b604083015250610140611203848285016110eb565b60608301525092915050565b5f6020828403121561122457611223610cfa565b5b5f82013567ffffffffffffffff81111561124157611240610cfe565b5b61124d84828501611160565b91505092915050565b5f6020828403121561126b5761126a610cfa565b5b5f82013567ffffffffffffffff81111561128857611287610cfe565b5b61129484828501610e19565b91505092915050565b6112a681610e65565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f602082840312156112da576112d9610cfa565b5b5f6112e784828501610e8c565b91505092915050565b5f819050919050565b61130a61130582610ff5565b6112f0565b82525050565b5f81519050919050565b5f81905092915050565b5f5b83811015611341578082015181840152602081019050611326565b5f8484015250505050565b5f61135682611310565b611360818561131a565b9350611370818560208601611324565b80840191505092915050565b5f61138782856112f9565b602082019150611397828461134c565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6113da82610ff5565b91506113e583610ff5565b9250826113f5576113f46113a3565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b7f6d65646961746f722063616e6e6f7420626520307830000000000000000000005f82015250565b5f61147160168361142d565b915061147c8261143d565b602082019050919050565b5f6020820190508181035f83015261149e81611465565b9050919050565b5f6114b0828461134c565b915081905092915050565b5f6114c582611310565b6114cf818561142d565b93506114df818560208601611324565b6114e881610d06565b840191505092915050565b5f6040820190508181035f83015261150b81856114bb565b905061151a602083018461129d565b9392505050565b7f74782e6f726967696e206d75737420626520746865206d65646961746f7200005f82015250565b5f611555601e8361142d565b915061156082611521565b602082019050919050565b5f6020820190508181035f83015261158281611549565b9050919050565b5f6020820190508181035f8301526115a181846114bb565b905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611603602e8361142d565b915061160e826115a9565b604082019050919050565b5f6020820190508181035f830152611630816115f7565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61166f61166a61166584611637565b61164c565b611640565b9050919050565b61167f81611655565b82525050565b5f6020820190506116985f830184611676565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6116f860268361142d565b91506117038261169e565b604082019050919050565b5f6020820190508181035f830152611725816116ec565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f61178660358361142d565b91506117918261172c565b604082019050919050565b5f6020820190508181035f8301526117b38161177a565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61181460398361142d565b915061181f826117ba565b604082019050919050565b5f6020820190508181035f83015261184181611808565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6118a2603b8361142d565b91506118ad82611848565b604082019050919050565b5f6020820190508181035f8301526118cf81611896565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61190a60208361142d565b9150611915826118d6565b602082019050919050565b5f6020820190508181035f830152611937816118fe565b905091905056fea2646970667358221220fa8593919ffbf8da52a497cc8b4d26db590a34f779c802c83a45d7fc17566a9364736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100a7575f3560e01c80638da5cb5b1161006f5780638da5cb5b14610113578063a2bffa0014610131578063a470295814610161578063c57380a21461016b578063f2fde38b14610189578063f3d3d448146101a5576100a7565b806370bea207146100ab578063715018a6146100c757806380ffdfe0146100d15780638129fc1c146100ed578063824518aa146100f7575b5f80fd5b6100c560048036038101906100c0919061120f565b6101c1565b005b6100cf610343565b005b6100eb60048036038101906100e69190611256565b610356565b005b6100f561051c565b005b610111600480360381019061010c9190611256565b610653565b005b61011b610819565b60405161012891906112ac565b60405180910390f35b61014b60048036038101906101469190611256565b610840565b60405161015891906112ac565b60405180910390f35b610169610886565b005b6101736108aa565b60405161018091906112ac565b60405180910390f35b6101a3600480360381019061019e91906112c5565b6108d2565b005b6101bf60048036038101906101ba91906112c5565b610954565b005b6101c9610a5c565b505f8160200151606001515142835f01516040516020016101eb92919061137c565b604051602081830303815290604052805190602001205f1c61020d91906113d0565b90505f826020015160600151828151811061022b5761022a611400565b5b602002602001015190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036102a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029a90611487565b60405180910390fd5b806002845f01516040516102b791906114a5565b90815260200160405180910390205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffd3770121045f9427361660d6eaa8b07a2e45eca6964f5c4f041a28f21084086835f0151826040516103369291906114f3565b60405180910390a1505050565b61034b610b89565b6103545f610c07565b565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161037d91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f890611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161042891906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a39061156b565b60405180910390fd5b6104b46108aa565b73ffffffffffffffffffffffffffffffffffffffff166380ffdfe0826040518263ffffffff1660e01b81526004016104ec9190611589565b5f604051808303815f87803b158015610503575f80fd5b505af1158015610515573d5f803e3d5ffd5b5050505050565b5f600160169054906101000a900460ff1615905080801561054e575060018060159054906101000a900460ff1660ff16105b8061057c575061055d30610cc8565b15801561057b575060018060159054906101000a900460ff1660ff16145b5b6105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611619565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156105f75760018060166101000a81548160ff0219169083151502179055505b8015610650575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106479190611685565b60405180910390a15b50565b5f73ffffffffffffffffffffffffffffffffffffffff1660028260405161067a91906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f590611487565b60405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff1660028260405161072591906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a09061156b565b60405180910390fd5b6107b16108aa565b73ffffffffffffffffffffffffffffffffffffffff1663824518aa826040518263ffffffff1660e01b81526004016107e99190611589565b5f604051808303815f87803b158015610800575f80fd5b505af1158015610812573d5f803e3d5ffd5b5050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60028260405161085191906114a5565b90815260200160405180910390205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61088e610b89565b5f600160146101000a81548160ff021916908315150217905550565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108da610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f9061170e565b60405180910390fd5b61095181610c07565b50565b61095c610b89565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c19061179c565b60405180910390fd5b600160149054906101000a900460ff16610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a109061182a565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae39061179c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b2c610cea565b73ffffffffffffffffffffffffffffffffffffffff1614610b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b79906118b8565b60405180910390fd5b6001905090565b610b91610cea565b73ffffffffffffffffffffffffffffffffffffffff16610baf610819565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90611920565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610d4c82610d06565b810181811067ffffffffffffffff82111715610d6b57610d6a610d16565b5b80604052505050565b5f610d7d610cf1565b9050610d898282610d43565b919050565b5f80fd5b5f80fd5b5f80fd5b5f67ffffffffffffffff821115610db457610db3610d16565b5b610dbd82610d06565b9050602081019050919050565b828183375f83830152505050565b5f610dea610de584610d9a565b610d74565b905082815260208101848484011115610e0657610e05610d96565b5b610e11848285610dca565b509392505050565b5f82601f830112610e2d57610e2c610d92565b5b8135610e3d848260208601610dd8565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e6f82610e46565b9050919050565b610e7f81610e65565b8114610e89575f80fd5b50565b5f81359050610e9a81610e76565b92915050565b5f67ffffffffffffffff821115610eba57610eb9610d16565b5b602082029050602081019050919050565b5f80fd5b5f610ee1610edc84610ea0565b610d74565b90508083825260208201905060208402830185811115610f0457610f03610ecb565b5b835b81811015610f2d5780610f198882610e8c565b845260208401935050602081019050610f06565b5050509392505050565b5f82601f830112610f4b57610f4a610d92565b5b8135610f5b848260208601610ecf565b91505092915050565b5f60808284031215610f7957610f78610d02565b5b610f836080610d74565b90505f610f9284828501610e8c565b5f830152506020610fa584828501610e8c565b6020830152506040610fb984828501610e8c565b604083015250606082013567ffffffffffffffff811115610fdd57610fdc610d8e565b5b610fe984828501610f37565b60608301525092915050565b5f819050919050565b61100781610ff5565b8114611011575f80fd5b50565b5f8135905061102281610ffe565b92915050565b5f6040828403121561103d5761103c610d02565b5b6110476040610d74565b90505f61105684828501611014565b5f83015250602061106984828501611014565b60208301525092915050565b5f610100828403121561108b5761108a610d02565b5b6110956080610d74565b90505f6110a484828501611028565b5f8301525060406110b784828501611028565b60208301525060806110cb84828501611028565b60408301525060c06110df84828501611028565b60608301525092915050565b5f60808284031215611100576110ff610d02565b5b61110a6080610d74565b90505f61111984828501611014565b5f83015250602061112c84828501611014565b602083015250604061114084828501611014565b604083015250606061115484828501611014565b60608301525092915050565b5f6101c0828403121561117657611175610d02565b5b6111806080610d74565b90505f82013567ffffffffffffffff81111561119f5761119e610d8e565b5b6111ab84828501610e19565b5f83015250602082013567ffffffffffffffff8111156111ce576111cd610d8e565b5b6111da84828501610f64565b60208301525060406111ee84828501611075565b604083015250610140611203848285016110eb565b60608301525092915050565b5f6020828403121561122457611223610cfa565b5b5f82013567ffffffffffffffff81111561124157611240610cfe565b5b61124d84828501611160565b91505092915050565b5f6020828403121561126b5761126a610cfa565b5b5f82013567ffffffffffffffff81111561128857611287610cfe565b5b61129484828501610e19565b91505092915050565b6112a681610e65565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f602082840312156112da576112d9610cfa565b5b5f6112e784828501610e8c565b91505092915050565b5f819050919050565b61130a61130582610ff5565b6112f0565b82525050565b5f81519050919050565b5f81905092915050565b5f5b83811015611341578082015181840152602081019050611326565b5f8484015250505050565b5f61135682611310565b611360818561131a565b9350611370818560208601611324565b80840191505092915050565b5f61138782856112f9565b602082019150611397828461134c565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6113da82610ff5565b91506113e583610ff5565b9250826113f5576113f46113a3565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b7f6d65646961746f722063616e6e6f7420626520307830000000000000000000005f82015250565b5f61147160168361142d565b915061147c8261143d565b602082019050919050565b5f6020820190508181035f83015261149e81611465565b9050919050565b5f6114b0828461134c565b915081905092915050565b5f6114c582611310565b6114cf818561142d565b93506114df818560208601611324565b6114e881610d06565b840191505092915050565b5f6040820190508181035f83015261150b81856114bb565b905061151a602083018461129d565b9392505050565b7f74782e6f726967696e206d75737420626520746865206d65646961746f7200005f82015250565b5f611555601e8361142d565b915061156082611521565b602082019050919050565b5f6020820190508181035f83015261158281611549565b9050919050565b5f6020820190508181035f8301526115a181846114bb565b905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611603602e8361142d565b915061160e826115a9565b604082019050919050565b5f6020820190508181035f830152611630816115f7565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61166f61166a61166584611637565b61164c565b611640565b9050919050565b61167f81611655565b82525050565b5f6020820190506116985f830184611676565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6116f860268361142d565b91506117038261169e565b604082019050919050565b5f6020820190508181035f830152611725816116ec565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f61178660358361142d565b91506117918261172c565b604082019050919050565b5f6020820190508181035f8301526117b38161177a565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61181460398361142d565b915061181f826117ba565b604082019050919050565b5f6020820190508181035f83015261184181611808565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6118a2603b8361142d565b91506118ad82611848565b604082019050919050565b5f6020820190508181035f8301526118cf81611896565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61190a60208361142d565b9150611915826118d6565b602082019050919050565b5f6020820190508181035f830152611937816118fe565b905091905056fea2646970667358221220fa8593919ffbf8da52a497cc8b4d26db590a34f779c802c83a45d7fc17566a9364736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize()": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1475, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1478, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 6, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3397, + "contract": "contracts/LilypadMediationRandom.sol:LilypadMediationRandom", + "label": "mediators", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_string_memory_ptr,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_string_memory_ptr,t_address)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadOnChainJobCreator.json b/hardhat/deployments/sepolia/LilypadOnChainJobCreator.json new file mode 100644 index 00000000..45e833e0 --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadOnChainJobCreator.json @@ -0,0 +1,525 @@ +{ + "address": "0x4aC3C9F7e431dce628440b5037d23890c28E5C3F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "calling_contract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "module", + "type": "string" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "inputs", + "type": "string[]" + } + ], + "name": "JobAdded", + "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" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRequiredDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nextJobID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "module", + "type": "string" + }, + { + "internalType": "string[]", + "name": "inputs", + "type": "string[]" + }, + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "runJob", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "name": "setRequiredDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "setTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + } + ], + "name": "submitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x2d2045c4c14f016409ccbd8a482330a1b50c276e5cd17aeb3f2ee201407e40ef", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0x4aC3C9F7e431dce628440b5037d23890c28E5C3F", + "transactionIndex": 40, + "gasUsed": "1755268", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000001000000000004000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000000000000000008000000000000000000000000000000000", + "blockHash": "0x038688bf841af0a57744b89577a59a3c48254e567d0f88503333c3f56bfe6cd5", + "transactionHash": "0x2d2045c4c14f016409ccbd8a482330a1b50c276e5cd17aeb3f2ee201407e40ef", + "logs": [ + { + "transactionIndex": 40, + "blockNumber": 4609901, + "transactionHash": "0x2d2045c4c14f016409ccbd8a482330a1b50c276e5cd17aeb3f2ee201407e40ef", + "address": "0x4aC3C9F7e431dce628440b5037d23890c28E5C3F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 27, + "blockHash": "0x038688bf841af0a57744b89577a59a3c48254e567d0f88503333c3f56bfe6cd5" + } + ], + "blockNumber": 4609901, + "cumulativeGasUsed": "5552247", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"calling_contract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"module\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"inputs\",\"type\":\"string[]\"}],\"name\":\"JobAdded\",\"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\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRequiredDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextJobID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"module\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"inputs\",\"type\":\"string[]\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"runJob\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"setRequiredDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"}],\"name\":\"submitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadOnChainJobCreator.sol\":\"LilypadOnChainJobCreator\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobClient.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\n// a smart contract that is running a job\\n// it will call the IOnChainJobManager with it's job\\n// which will end up with the resultsAdded function being called by the manager\\ninterface ILilypadJobClient {\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) external;\\n}\\n\",\"keccak256\":\"0xbdb36ace8c31e47b30abaa2ce713cec8f488f9dfaac50c7372a5f5196cc3dfcc\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadJobManager.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\n\\n// the smart contract that is responsible for handling the life\\n// cycle of a job - it will pay the registered solver to manage the job\\n// this is the simple implementation - later we can implement the whole protocol\\n// where the calling smart contract can decide if it wants to agree to a resource offer\\n// and accept results\\ninterface ILilypadJobManager is ILilypadJobClient {\\n function runJob(\\n string memory module,\\n string[] memory inputs,\\n address payee\\n ) external returns (uint256);\\n}\\n\",\"keccak256\":\"0x8c65176e0bfbdc3a612317b719475acb409910d43d1fd73420f0af18b7fd1cd5\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface ILilypadToken is IERC20 {\\n function escrowBalanceOf(\\n address _address\\n ) external returns (uint256);\\n\\n function payEscrow(\\n uint256 amount\\n ) external returns (bool);\\n\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0xefae0a5923d57a0e20166dd5542a566a8752d0a015287302dbbeddd0386ee9ad\",\"license\":\"Apache-2.0\"},\"contracts/LilypadOnChainJobCreator.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ILilypadJobManager.sol\\\";\\nimport \\\"./ILilypadJobClient.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./ILilypadToken.sol\\\";\\n\\ncontract LilypadOnChainJobCreator is ILilypadJobManager, ControllerOwnable, Initializable {\\n\\n // the token contract\\n // we check to see what allowance has been granted to be spent on behalf\\n // of the customer of a job\\n address private tokenAddress;\\n ILilypadToken private tokenContract;\\n\\n // the minimum amount that must be \\\"approved\\\" on the smart contract for the solver to spend\\n // for it to consider running a job for a client\\n // the solver will update this as the market pricing changes\\n uint256 public requiredDeposit;\\n\\n // auto increment job id\\n uint256 public nextJobID;\\n\\n // map of job id onto offer\\n mapping(uint256 => SharedStructs.JobOffer) private jobOffers;\\n\\n event JobAdded(\\n uint256 id,\\n address calling_contract,\\n address payee,\\n string module,\\n string[] inputs\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _tokenAddress\\n ) public initializer {\\n setTokenAddress(_tokenAddress);\\n nextJobID = 0;\\n }\\n\\n function setTokenAddress(address _tokenAddress) public onlyOwner {\\n require(_tokenAddress != address(0), \\\"Token address\\\");\\n tokenAddress = _tokenAddress;\\n tokenContract = ILilypadToken(tokenAddress);\\n }\\n\\n function getTokenAddress() public view returns (address) {\\n return tokenAddress;\\n }\\n\\n function setRequiredDeposit(uint256 cost) public onlyController {\\n require(cost > 0, \\\"Min deposit\\\");\\n requiredDeposit = cost;\\n }\\n\\n function getRequiredDeposit() public view returns (uint256) {\\n return requiredDeposit;\\n }\\n\\n // called by on-chain clients to make an offer for a job\\n // this will return a ticketID which is a unique onchain identifier for the job\\n function runJob(\\n // what is the module name we are making an offer for\\n string memory module,\\n // an array of key=value pairs that will be the inputs to the job\\n string[] memory inputs,\\n // the address of the client who is paying for the job\\n // they must have called the increaseAllowance function\\n // giving the controller (i.e. solver) permission to spend their tokens\\n address payee\\n ) public override returns (uint256) {\\n // this makes sure that the person paying for the job has\\n // already called \\\"approve\\\" on the token contract so the solver can\\n // work on it's behalf\\n require(tokenContract.allowance(payee, getControllerAddress()) >= requiredDeposit, \\\"Token allowance not enough\\\");\\n\\n nextJobID = nextJobID + 1;\\n jobOffers[nextJobID] = SharedStructs.JobOffer(\\n nextJobID,\\n msg.sender,\\n payee,\\n module,\\n inputs\\n );\\n emit JobAdded(\\n nextJobID,\\n msg.sender,\\n payee,\\n module,\\n inputs\\n );\\n\\n return nextJobID;\\n }\\n\\n // this is called by the solver once we've got results out of the controller\\n // it will call the \\\"resultsAdded\\\" function on the original client contract\\n function submitResults(\\n uint256 id,\\n string memory dealId,\\n string memory dataId\\n ) public onlyController override {\\n SharedStructs.JobOffer storage offer = jobOffers[id];\\n require(offer.id != 0, \\\"Job not found\\\");\\n ILilypadJobClient(offer.calling_contract).submitResults(\\n id,\\n dealId,\\n dataId\\n );\\n }\\n}\\n\",\"keccak256\":\"0x0e5c4d34020f525e81aff101c53db74fdc8d1632938842c8b4974f2d2bfe0de5\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff021916908315150217905550348015610029575f80fd5b5061004661003b61004b60201b60201c565b61005260201b60201c565b610113565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611df4806101205f395ff3fe608060405234801561000f575f80fd5b50600436106100f3575f3560e01c8063a470295811610095578063d2a715c011610064578063d2a715c014610223578063f2fde38b14610241578063f3d3d4481461025d578063fb7cfdd714610279576100f3565b8063a4702958146101af578063c4d66de8146101b9578063c57380a2146101d5578063c75555fa146101f3576100f3565b806358e56db4116100d157806358e56db41461014d5780636c0f1f581461016b578063715018a6146101875780638da5cb5b14610191576100f3565b806310fe9ae8146100f757806326a4e8d2146101155780634c526c7614610131575b5f80fd5b6100ff610297565b60405161010c9190610eb1565b60405180910390f35b61012f600480360381019061012a9190610f05565b6102bf565b005b61014b60048036038101906101469190610f63565b6103d9565b005b61015561042e565b6040516101629190610f9d565b60405180910390f35b610185600480360381019061018091906110f2565b610437565b005b61018f61052c565b005b61019961053f565b6040516101a69190610eb1565b60405180910390f35b6101b7610566565b005b6101d360048036038101906101ce9190610f05565b61058a565b005b6101dd6106d2565b6040516101ea9190610eb1565b60405180910390f35b61020d6004803603810190610208919061125c565b6106fa565b60405161021a9190610f9d565b60405180910390f35b61022b610975565b6040516102389190610f9d565b60405180910390f35b61025b60048036038101906102569190610f05565b61097b565b005b61027760048036038101906102729190610f05565b6109fd565b005b610281610b05565b60405161028e9190610f9d565b60405180910390f35b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6102c7610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c9061133e565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103e1610b89565b505f8111610424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041b906113a6565b60405180910390fd5b8060048190555050565b5f600454905090565b61043f610b89565b505f60065f8581526020019081526020015f2090505f815f015403610499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104909061140e565b60405180910390fd5b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636c0f1f588585856040518463ffffffff1660e01b81526004016104f993929190611496565b5f604051808303815f87803b158015610510575f80fd5b505af1158015610522573d5f803e3d5ffd5b5050505050505050565b610534610b0b565b61053d5f610cb6565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056e610b0b565b5f600160146101000a81548160ff021916908315150217905550565b5f600160169054906101000a900460ff161590508080156105bc575060018060159054906101000a900460ff1660ff16105b806105ea57506105cb30610d77565b1580156105e9575060018060159054906101000a900460ff1660ff16145b5b610629576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062090611549565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156106655760018060166101000a81548160ff0219169083151502179055505b61066e826102bf565b5f60058190555080156106ce575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106c591906115b5565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e846107446106d2565b6040518363ffffffff1660e01b81526004016107619291906115ce565b602060405180830381865afa15801561077c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a09190611609565b10156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d89061167e565b60405180910390fd5b60016005546107f091906116c9565b6005819055506040518060a0016040528060055481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525060065f60055481526020019081526020015f205f820151815f01556020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301908161090791906118ed565b506080820151816004019080519060200190610924929190610da0565b509050507faa171d38d08c39622dbd189ddd0a5c0cf3ea10eeda0c7d4c2c75d13fcc4fe14a60055433848787604051610961959493929190611abf565b60405180910390a160055490509392505050565b60055481565b610983610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611b8e565b60405180910390fd5b6109fa81610cb6565b50565b610a05610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90611c1c565b60405180910390fd5b600160149054906101000a900460ff16610ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab990611caa565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b610b13610d99565b73ffffffffffffffffffffffffffffffffffffffff16610b3161053f565b73ffffffffffffffffffffffffffffffffffffffff1614610b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7e90611d12565b60405180910390fd5b565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611c1c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c59610d99565b73ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690611da0565b60405180910390fd5b6001905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b828054828255905f5260205f20908101928215610de6579160200282015b82811115610de5578251829081610dd591906118ed565b5091602001919060010190610dbe565b5b509050610df39190610df7565b5090565b5b80821115610e16575f8181610e0d9190610e1a565b50600101610df8565b5090565b508054610e2690611729565b5f825580601f10610e375750610e54565b601f0160209004905f5260205f2090810190610e539190610e57565b5b50565b5b80821115610e6e575f815f905550600101610e58565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e9b82610e72565b9050919050565b610eab81610e91565b82525050565b5f602082019050610ec45f830184610ea2565b92915050565b5f604051905090565b5f80fd5b5f80fd5b610ee481610e91565b8114610eee575f80fd5b50565b5f81359050610eff81610edb565b92915050565b5f60208284031215610f1a57610f19610ed3565b5b5f610f2784828501610ef1565b91505092915050565b5f819050919050565b610f4281610f30565b8114610f4c575f80fd5b50565b5f81359050610f5d81610f39565b92915050565b5f60208284031215610f7857610f77610ed3565b5b5f610f8584828501610f4f565b91505092915050565b610f9781610f30565b82525050565b5f602082019050610fb05f830184610f8e565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61100482610fbe565b810181811067ffffffffffffffff8211171561102357611022610fce565b5b80604052505050565b5f611035610eca565b90506110418282610ffb565b919050565b5f67ffffffffffffffff8211156110605761105f610fce565b5b61106982610fbe565b9050602081019050919050565b828183375f83830152505050565b5f61109661109184611046565b61102c565b9050828152602081018484840111156110b2576110b1610fba565b5b6110bd848285611076565b509392505050565b5f82601f8301126110d9576110d8610fb6565b5b81356110e9848260208601611084565b91505092915050565b5f805f6060848603121561110957611108610ed3565b5b5f61111686828701610f4f565b935050602084013567ffffffffffffffff81111561113757611136610ed7565b5b611143868287016110c5565b925050604084013567ffffffffffffffff81111561116457611163610ed7565b5b611170868287016110c5565b9150509250925092565b5f67ffffffffffffffff82111561119457611193610fce565b5b602082029050602081019050919050565b5f80fd5b5f6111bb6111b68461117a565b61102c565b905080838252602082019050602084028301858111156111de576111dd6111a5565b5b835b8181101561122557803567ffffffffffffffff81111561120357611202610fb6565b5b80860161121089826110c5565b855260208501945050506020810190506111e0565b5050509392505050565b5f82601f83011261124357611242610fb6565b5b81356112538482602086016111a9565b91505092915050565b5f805f6060848603121561127357611272610ed3565b5b5f84013567ffffffffffffffff8111156112905761128f610ed7565b5b61129c868287016110c5565b935050602084013567ffffffffffffffff8111156112bd576112bc610ed7565b5b6112c98682870161122f565b92505060406112da86828701610ef1565b9150509250925092565b5f82825260208201905092915050565b7f546f6b656e2061646472657373000000000000000000000000000000000000005f82015250565b5f611328600d836112e4565b9150611333826112f4565b602082019050919050565b5f6020820190508181035f8301526113558161131c565b9050919050565b7f4d696e206465706f7369740000000000000000000000000000000000000000005f82015250565b5f611390600b836112e4565b915061139b8261135c565b602082019050919050565b5f6020820190508181035f8301526113bd81611384565b9050919050565b7f4a6f62206e6f7420666f756e64000000000000000000000000000000000000005f82015250565b5f6113f8600d836112e4565b9150611403826113c4565b602082019050919050565b5f6020820190508181035f830152611425816113ec565b9050919050565b5f81519050919050565b5f5b83811015611453578082015181840152602081019050611438565b5f8484015250505050565b5f6114688261142c565b61147281856112e4565b9350611482818560208601611436565b61148b81610fbe565b840191505092915050565b5f6060820190506114a95f830186610f8e565b81810360208301526114bb818561145e565b905081810360408301526114cf818461145e565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611533602e836112e4565b915061153e826114d9565b604082019050919050565b5f6020820190508181035f83015261156081611527565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61159f61159a61159584611567565b61157c565b611570565b9050919050565b6115af81611585565b82525050565b5f6020820190506115c85f8301846115a6565b92915050565b5f6040820190506115e15f830185610ea2565b6115ee6020830184610ea2565b9392505050565b5f8151905061160381610f39565b92915050565b5f6020828403121561161e5761161d610ed3565b5b5f61162b848285016115f5565b91505092915050565b7f546f6b656e20616c6c6f77616e6365206e6f7420656e6f7567680000000000005f82015250565b5f611668601a836112e4565b915061167382611634565b602082019050919050565b5f6020820190508181035f8301526116958161165c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6116d382610f30565b91506116de83610f30565b92508282019050808211156116f6576116f561169c565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061174057607f821691505b602082108103611753576117526116fc565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026117b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261177a565b6117bf868361177a565b95508019841693508086168417925050509392505050565b5f6117f16117ec6117e784610f30565b61157c565b610f30565b9050919050565b5f819050919050565b61180a836117d7565b61181e611816826117f8565b848454611786565b825550505050565b5f90565b611832611826565b61183d818484611801565b505050565b5b81811015611860576118555f8261182a565b600181019050611843565b5050565b601f8211156118a55761187681611759565b61187f8461176b565b8101602085101561188e578190505b6118a261189a8561176b565b830182611842565b50505b505050565b5f82821c905092915050565b5f6118c55f19846008026118aa565b1980831691505092915050565b5f6118dd83836118b6565b9150826002028217905092915050565b6118f68261142c565b67ffffffffffffffff81111561190f5761190e610fce565b5b6119198254611729565b611924828285611864565b5f60209050601f831160018114611955575f8415611943578287015190505b61194d85826118d2565b8655506119b4565b601f19841661196386611759565b5f5b8281101561198a57848901518255600182019150602085019450602081019050611965565b868310156119a757848901516119a3601f8916826118b6565b8355505b6001600288020188555050505b505050505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f6119ff8261142c565b611a0981856119e5565b9350611a19818560208601611436565b611a2281610fbe565b840191505092915050565b5f611a3883836119f5565b905092915050565b5f602082019050919050565b5f611a56826119bc565b611a6081856119c6565b935083602082028501611a72856119d6565b805f5b85811015611aad5784840389528151611a8e8582611a2d565b9450611a9983611a40565b925060208a01995050600181019050611a75565b50829750879550505050505092915050565b5f60a082019050611ad25f830188610f8e565b611adf6020830187610ea2565b611aec6040830186610ea2565b8181036060830152611afe818561145e565b90508181036080830152611b128184611a4c565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611b786026836112e4565b9150611b8382611b1e565b604082019050919050565b5f6020820190508181035f830152611ba581611b6c565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611c066035836112e4565b9150611c1182611bac565b604082019050919050565b5f6020820190508181035f830152611c3381611bfa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611c946039836112e4565b9150611c9f82611c3a565b604082019050919050565b5f6020820190508181035f830152611cc181611c88565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611cfc6020836112e4565b9150611d0782611cc8565b602082019050919050565b5f6020820190508181035f830152611d2981611cf0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611d8a603b836112e4565b9150611d9582611d30565b604082019050919050565b5f6020820190508181035f830152611db781611d7e565b905091905056fea2646970667358221220d3d209af1a40bd50d9cd212afddd8b721f789470d2e20d6d2bef5946d17bd48464736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100f3575f3560e01c8063a470295811610095578063d2a715c011610064578063d2a715c014610223578063f2fde38b14610241578063f3d3d4481461025d578063fb7cfdd714610279576100f3565b8063a4702958146101af578063c4d66de8146101b9578063c57380a2146101d5578063c75555fa146101f3576100f3565b806358e56db4116100d157806358e56db41461014d5780636c0f1f581461016b578063715018a6146101875780638da5cb5b14610191576100f3565b806310fe9ae8146100f757806326a4e8d2146101155780634c526c7614610131575b5f80fd5b6100ff610297565b60405161010c9190610eb1565b60405180910390f35b61012f600480360381019061012a9190610f05565b6102bf565b005b61014b60048036038101906101469190610f63565b6103d9565b005b61015561042e565b6040516101629190610f9d565b60405180910390f35b610185600480360381019061018091906110f2565b610437565b005b61018f61052c565b005b61019961053f565b6040516101a69190610eb1565b60405180910390f35b6101b7610566565b005b6101d360048036038101906101ce9190610f05565b61058a565b005b6101dd6106d2565b6040516101ea9190610eb1565b60405180910390f35b61020d6004803603810190610208919061125c565b6106fa565b60405161021a9190610f9d565b60405180910390f35b61022b610975565b6040516102389190610f9d565b60405180910390f35b61025b60048036038101906102569190610f05565b61097b565b005b61027760048036038101906102729190610f05565b6109fd565b005b610281610b05565b60405161028e9190610f9d565b60405180910390f35b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6102c7610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032c9061133e565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103e1610b89565b505f8111610424576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041b906113a6565b60405180910390fd5b8060048190555050565b5f600454905090565b61043f610b89565b505f60065f8581526020019081526020015f2090505f815f015403610499576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104909061140e565b60405180910390fd5b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636c0f1f588585856040518463ffffffff1660e01b81526004016104f993929190611496565b5f604051808303815f87803b158015610510575f80fd5b505af1158015610522573d5f803e3d5ffd5b5050505050505050565b610534610b0b565b61053d5f610cb6565b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056e610b0b565b5f600160146101000a81548160ff021916908315150217905550565b5f600160169054906101000a900460ff161590508080156105bc575060018060159054906101000a900460ff1660ff16105b806105ea57506105cb30610d77565b1580156105e9575060018060159054906101000a900460ff1660ff16145b5b610629576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062090611549565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156106655760018060166101000a81548160ff0219169083151502179055505b61066e826102bf565b5f60058190555080156106ce575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516106c591906115b5565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60045460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e846107446106d2565b6040518363ffffffff1660e01b81526004016107619291906115ce565b602060405180830381865afa15801561077c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a09190611609565b10156107e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d89061167e565b60405180910390fd5b60016005546107f091906116c9565b6005819055506040518060a0016040528060055481526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525060065f60055481526020019081526020015f205f820151815f01556020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301908161090791906118ed565b506080820151816004019080519060200190610924929190610da0565b509050507faa171d38d08c39622dbd189ddd0a5c0cf3ea10eeda0c7d4c2c75d13fcc4fe14a60055433848787604051610961959493929190611abf565b60405180910390a160055490509392505050565b60055481565b610983610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e890611b8e565b60405180910390fd5b6109fa81610cb6565b50565b610a05610b0b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90611c1c565b60405180910390fd5b600160149054906101000a900460ff16610ac2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab990611caa565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b610b13610d99565b73ffffffffffffffffffffffffffffffffffffffff16610b3161053f565b73ffffffffffffffffffffffffffffffffffffffff1614610b87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7e90611d12565b60405180910390fd5b565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611c1c565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c59610d99565b73ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690611da0565b60405180910390fd5b6001905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b828054828255905f5260205f20908101928215610de6579160200282015b82811115610de5578251829081610dd591906118ed565b5091602001919060010190610dbe565b5b509050610df39190610df7565b5090565b5b80821115610e16575f8181610e0d9190610e1a565b50600101610df8565b5090565b508054610e2690611729565b5f825580601f10610e375750610e54565b601f0160209004905f5260205f2090810190610e539190610e57565b5b50565b5b80821115610e6e575f815f905550600101610e58565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e9b82610e72565b9050919050565b610eab81610e91565b82525050565b5f602082019050610ec45f830184610ea2565b92915050565b5f604051905090565b5f80fd5b5f80fd5b610ee481610e91565b8114610eee575f80fd5b50565b5f81359050610eff81610edb565b92915050565b5f60208284031215610f1a57610f19610ed3565b5b5f610f2784828501610ef1565b91505092915050565b5f819050919050565b610f4281610f30565b8114610f4c575f80fd5b50565b5f81359050610f5d81610f39565b92915050565b5f60208284031215610f7857610f77610ed3565b5b5f610f8584828501610f4f565b91505092915050565b610f9781610f30565b82525050565b5f602082019050610fb05f830184610f8e565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61100482610fbe565b810181811067ffffffffffffffff8211171561102357611022610fce565b5b80604052505050565b5f611035610eca565b90506110418282610ffb565b919050565b5f67ffffffffffffffff8211156110605761105f610fce565b5b61106982610fbe565b9050602081019050919050565b828183375f83830152505050565b5f61109661109184611046565b61102c565b9050828152602081018484840111156110b2576110b1610fba565b5b6110bd848285611076565b509392505050565b5f82601f8301126110d9576110d8610fb6565b5b81356110e9848260208601611084565b91505092915050565b5f805f6060848603121561110957611108610ed3565b5b5f61111686828701610f4f565b935050602084013567ffffffffffffffff81111561113757611136610ed7565b5b611143868287016110c5565b925050604084013567ffffffffffffffff81111561116457611163610ed7565b5b611170868287016110c5565b9150509250925092565b5f67ffffffffffffffff82111561119457611193610fce565b5b602082029050602081019050919050565b5f80fd5b5f6111bb6111b68461117a565b61102c565b905080838252602082019050602084028301858111156111de576111dd6111a5565b5b835b8181101561122557803567ffffffffffffffff81111561120357611202610fb6565b5b80860161121089826110c5565b855260208501945050506020810190506111e0565b5050509392505050565b5f82601f83011261124357611242610fb6565b5b81356112538482602086016111a9565b91505092915050565b5f805f6060848603121561127357611272610ed3565b5b5f84013567ffffffffffffffff8111156112905761128f610ed7565b5b61129c868287016110c5565b935050602084013567ffffffffffffffff8111156112bd576112bc610ed7565b5b6112c98682870161122f565b92505060406112da86828701610ef1565b9150509250925092565b5f82825260208201905092915050565b7f546f6b656e2061646472657373000000000000000000000000000000000000005f82015250565b5f611328600d836112e4565b9150611333826112f4565b602082019050919050565b5f6020820190508181035f8301526113558161131c565b9050919050565b7f4d696e206465706f7369740000000000000000000000000000000000000000005f82015250565b5f611390600b836112e4565b915061139b8261135c565b602082019050919050565b5f6020820190508181035f8301526113bd81611384565b9050919050565b7f4a6f62206e6f7420666f756e64000000000000000000000000000000000000005f82015250565b5f6113f8600d836112e4565b9150611403826113c4565b602082019050919050565b5f6020820190508181035f830152611425816113ec565b9050919050565b5f81519050919050565b5f5b83811015611453578082015181840152602081019050611438565b5f8484015250505050565b5f6114688261142c565b61147281856112e4565b9350611482818560208601611436565b61148b81610fbe565b840191505092915050565b5f6060820190506114a95f830186610f8e565b81810360208301526114bb818561145e565b905081810360408301526114cf818461145e565b9050949350505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f611533602e836112e4565b915061153e826114d9565b604082019050919050565b5f6020820190508181035f83015261156081611527565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61159f61159a61159584611567565b61157c565b611570565b9050919050565b6115af81611585565b82525050565b5f6020820190506115c85f8301846115a6565b92915050565b5f6040820190506115e15f830185610ea2565b6115ee6020830184610ea2565b9392505050565b5f8151905061160381610f39565b92915050565b5f6020828403121561161e5761161d610ed3565b5b5f61162b848285016115f5565b91505092915050565b7f546f6b656e20616c6c6f77616e6365206e6f7420656e6f7567680000000000005f82015250565b5f611668601a836112e4565b915061167382611634565b602082019050919050565b5f6020820190508181035f8301526116958161165c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6116d382610f30565b91506116de83610f30565b92508282019050808211156116f6576116f561169c565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061174057607f821691505b602082108103611753576117526116fc565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026117b57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261177a565b6117bf868361177a565b95508019841693508086168417925050509392505050565b5f6117f16117ec6117e784610f30565b61157c565b610f30565b9050919050565b5f819050919050565b61180a836117d7565b61181e611816826117f8565b848454611786565b825550505050565b5f90565b611832611826565b61183d818484611801565b505050565b5b81811015611860576118555f8261182a565b600181019050611843565b5050565b601f8211156118a55761187681611759565b61187f8461176b565b8101602085101561188e578190505b6118a261189a8561176b565b830182611842565b50505b505050565b5f82821c905092915050565b5f6118c55f19846008026118aa565b1980831691505092915050565b5f6118dd83836118b6565b9150826002028217905092915050565b6118f68261142c565b67ffffffffffffffff81111561190f5761190e610fce565b5b6119198254611729565b611924828285611864565b5f60209050601f831160018114611955575f8415611943578287015190505b61194d85826118d2565b8655506119b4565b601f19841661196386611759565b5f5b8281101561198a57848901518255600182019150602085019450602081019050611965565b868310156119a757848901516119a3601f8916826118b6565b8355505b6001600288020188555050505b505050505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f82825260208201905092915050565b5f6119ff8261142c565b611a0981856119e5565b9350611a19818560208601611436565b611a2281610fbe565b840191505092915050565b5f611a3883836119f5565b905092915050565b5f602082019050919050565b5f611a56826119bc565b611a6081856119c6565b935083602082028501611a72856119d6565b805f5b85811015611aad5784840389528151611a8e8582611a2d565b9450611a9983611a40565b925060208a01995050600181019050611a75565b50829750879550505050505092915050565b5f60a082019050611ad25f830188610f8e565b611adf6020830187610ea2565b611aec6040830186610ea2565b8181036060830152611afe818561145e565b90508181036080830152611b128184611a4c565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611b786026836112e4565b9150611b8382611b1e565b604082019050919050565b5f6020820190508181035f830152611ba581611b6c565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611c066035836112e4565b9150611c1182611bac565b604082019050919050565b5f6020820190508181035f830152611c3381611bfa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611c946039836112e4565b9150611c9f82611c3a565b604082019050919050565b5f6020820190508181035f830152611cc181611c88565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611cfc6020836112e4565b9150611d0782611cc8565b602082019050919050565b5f6020820190508181035f830152611d2981611cf0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611d8a603b836112e4565b9150611d9582611d30565b604082019050919050565b5f6020820190508181035f830152611db781611d7e565b905091905056fea2646970667358221220d3d209af1a40bd50d9cd212afddd8b721f789470d2e20d6d2bef5946d17bd48464736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address)": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1475, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1478, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 6, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3572, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "tokenAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 3575, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "tokenContract", + "offset": 0, + "slot": "3", + "type": "t_contract(ILilypadToken)2213" + }, + { + "astId": 3577, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "requiredDeposit", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 3579, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "nextJobID", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 3584, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "jobOffers", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(JobOffer)6418_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_string_storage)dyn_storage": { + "base": "t_string_storage", + "encoding": "dynamic_array", + "label": "string[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadToken)2213": { + "encoding": "inplace", + "label": "contract ILilypadToken", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_struct(JobOffer)6418_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct SharedStructs.JobOffer)", + "numberOfBytes": "32", + "value": "t_struct(JobOffer)6418_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(JobOffer)6418_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.JobOffer", + "members": [ + { + "astId": 6408, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "id", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6410, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "calling_contract", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 6412, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "payee", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 6414, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "module", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 6417, + "contract": "contracts/LilypadOnChainJobCreator.sol:LilypadOnChainJobCreator", + "label": "inputs", + "offset": 0, + "slot": "4", + "type": "t_array(t_string_storage)dyn_storage" + } + ], + "numberOfBytes": "160" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadPayments.json b/hardhat/deployments/sepolia/LilypadPayments.json new file mode 100644 index 00000000..62a73296 --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadPayments.json @@ -0,0 +1,762 @@ +{ + "address": "0xC5b1737A2282E6283c54f67bC401426058BC170F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum LilypadPayments.PaymentReason", + "name": "reason", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "enum LilypadPayments.PaymentDirection", + "name": "direction", + "type": "uint8" + } + ], + "name": "Payment", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "jobCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "agreeJobCreator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "agreeResourceProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "jobCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "setTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutAgreeRefundJobCreator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutAgreeRefundResourceProvider", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutJudgeResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutCollateral", + "type": "uint256" + } + ], + "name": "timeoutSubmitResults", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x23669cc89ec0782d2518d770d30a3a9ce88d81d59a56f024a7e2d698c893b8d7", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0xC5b1737A2282E6283c54f67bC401426058BC170F", + "transactionIndex": 10, + "gasUsed": "2369600", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001000000000004000000000000000000000100020000000000000000000800100000000000000000000000000000400000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd2dd676b725c0b38a24287471874636446e4cc71440697ad31475e39d72ad753", + "transactionHash": "0x23669cc89ec0782d2518d770d30a3a9ce88d81d59a56f024a7e2d698c893b8d7", + "logs": [ + { + "transactionIndex": 10, + "blockNumber": 4609892, + "transactionHash": "0x23669cc89ec0782d2518d770d30a3a9ce88d81d59a56f024a7e2d698c893b8d7", + "address": "0xC5b1737A2282E6283c54f67bC401426058BC170F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0xd2dd676b725c0b38a24287471874636446e4cc71440697ad31475e39d72ad753" + } + ], + "blockNumber": 4609892, + "cumulativeGasUsed": "3765919", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum LilypadPayments.PaymentReason\",\"name\":\"reason\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"enum LilypadPayments.PaymentDirection\",\"name\":\"direction\",\"type\":\"uint8\"}],\"name\":\"Payment\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"jobCost\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"agreeJobCreator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"agreeResourceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"jobCost\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutAgreeRefundJobCreator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutAgreeRefundResourceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutJudgeResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutCollateral\",\"type\":\"uint256\"}],\"name\":\"timeoutSubmitResults\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"events\":{\"Payment(string,address,uint256,uint8,uint8)\":{\"notice\":\"Events\"}},\"kind\":\"user\",\"methods\":{\"addResult(string,address,uint256,uint256)\":{\"notice\":\"Results\"},\"agreeResourceProvider(string,address,uint256)\":{\"notice\":\"Agreements\"},\"mediationAcceptResult(string,address,address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Mediation\"},\"timeoutAgreeRefundResourceProvider(string,address,uint256)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadPayments.sol\":\"LilypadPayments\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\ninterface ILilypadPayments {\\n\\n /**\\n * Init\\n */\\n\\n function setTokenAddress(\\n address _tokenAddress\\n ) external;\\n\\n /**\\n * Agreements\\n */\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n /**\\n * Results\\n */\\n\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Mediation\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n\\n /**\\n * Timeouts\\n */\\n\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutSubmitResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutJudgeResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) external;\\n\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) external;\\n \\n}\\n\",\"keccak256\":\"0x5b3ea3fa7c4d031fccf44098eafa82cfd79d8358b2feb0c2057fd907b85df7d0\",\"license\":\"Apache-2.0\"},\"contracts/ILilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface ILilypadToken is IERC20 {\\n function escrowBalanceOf(\\n address _address\\n ) external returns (uint256);\\n\\n function payEscrow(\\n uint256 amount\\n ) external returns (bool);\\n\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) external returns (bool);\\n\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0xefae0a5923d57a0e20166dd5542a566a8752d0a015287302dbbeddd0386ee9ad\",\"license\":\"Apache-2.0\"},\"contracts/LilypadPayments.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./ILilypadToken.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\nimport \\\"./ILilypadPayments.sol\\\";\\n\\n// import \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\n// import \\\"hardhat/console.sol\\\";\\n// console.log(\\\"ensureDeal\\\");\\n// console.log(Strings.toString(uint256(SharedStructs.AgreementState.DealNegotiating)));\\n// console.log(Strings.toString(uint256(agreements[dealId].state)));\\n\\ncontract LilypadPayments is ControllerOwnable, Initializable {\\n\\n /**\\n * Types\\n */\\n\\n // the address of the LilypadToken contract\\n address private tokenAddress;\\n ILilypadToken private tokenContract;\\n\\n // used to cut off upgrades for the remote contract\\n bool private canChangeTokenAddress = true;\\n\\n /**\\n * Enums\\n */\\n enum PaymentReason {\\n\\n // the money the JC puts up to pay for the job\\n PaymentCollateral,\\n\\n // the money the RP puts up to attest it's results are correct\\n ResultsCollateral,\\n\\n // the money the RP, JC and Mediator all put up to prevent timeouts\\n TimeoutCollateral,\\n\\n // the money the RP gets paid for the job for running it successfully\\n JobPayment,\\n\\n // the money the JC pays the mediator for resolving a dispute\\n MediationFee\\n }\\n\\n enum PaymentDirection {\\n\\n // money flowing into the contract\\n // i.e. we GET paid\\n PaidIn,\\n\\n // money paid out to services\\n // i.e. we are PAYING\\n PaidOut,\\n\\n // collateral that is locked up being refunded\\n Refunded,\\n \\n // collateral that is locked up being slashed\\n Slashed\\n }\\n\\n /**\\n * Events\\n */\\n event Payment(\\n string dealId,\\n address payee,\\n uint256 amount,\\n PaymentReason reason,\\n PaymentDirection direction\\n );\\n\\n /**\\n * Init\\n */\\n\\n // used for debugging\\n mapping(address => string) private accountNames;\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize(\\n address _tokenAddress\\n ) public initializer {\\n setTokenAddress(_tokenAddress);\\n\\n // this is only for debugging\\n // accountNames[address(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)] = \\\"admin\\\";\\n // accountNames[address(0x70997970C51812dc3A010C7d01b50e0d17dc79C8)] = \\\"faucet\\\";\\n // accountNames[address(0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC)] = \\\"solver\\\";\\n // accountNames[address(0x90F79bf6EB2c4f870365E785982E1f101E93b906)] = \\\"mediator\\\";\\n // accountNames[address(0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65)] = \\\"resource_provider\\\";\\n // accountNames[address(0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc)] = \\\"job_creator\\\";\\n // accountNames[address(0x976EA74026E726554dB657fA54763abd0C3a0aa9)] = \\\"directory\\\";\\n }\\n\\n // the LilypadToken we are calling payinEscrow and payoutEscrow on\\n function setTokenAddress(address _tokenAddress) public onlyOwner {\\n require(_tokenAddress != address(0), \\\"LilepadPayments: Token address must be defined\\\");\\n require(canChangeTokenAddress, \\\"LilypadToken: canChangeTokenAddress is disabled\\\");\\n tokenAddress = _tokenAddress;\\n tokenContract = ILilypadToken(_tokenAddress);\\n }\\n\\n function getTokenAddress() public view returns(address) {\\n return tokenAddress;\\n }\\n\\n // set for canChangePaymentsAddress\\n function disableChangeTokenAddress() public onlyOwner {\\n canChangeTokenAddress = false;\\n }\\n\\n /**\\n * Controller handlers\\n * \\n * these methods are called by the controller to wrap various payment\\n * scenarios - hence they are all onlyOwner\\n */\\n\\n /**\\n * Agreements\\n */\\n\\n // * pay in the timeout collateral\\n function agreeResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n // we check this here to double check who we are about to charge (the RP)\\n // is who signed the TX and so we can take the money\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n _payEscrow(\\n dealId,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay in the payment collateral and timeout collateral\\n function agreeJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n _payEscrow(\\n dealId,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n _payEscrow(\\n dealId,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n /**\\n * Results\\n */\\n\\n // * pay back the timeout collateral\\n // * pay in the results collateral\\n function addResult(\\n string memory dealId,\\n address resourceProvider,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n _payEscrow(\\n dealId,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay the RP the job cost\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the job cost\\n // * refund the JC the timeout collateral\\n function acceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n\\n // what if the final job cost is more than the payment collateral?\\n // well - we have to cap the job cost at that collateral\\n // true - the RP has lost money but they agreed to the deal\\n uint256 actualPayment = jobCost;\\n uint256 jcRefund = 0;\\n if(jobCost > paymentCollateral) {\\n actualPayment = paymentCollateral;\\n } else {\\n jcRefund = paymentCollateral - jobCost;\\n }\\n\\n // pay the RP the actualPayment\\n _payOut(\\n dealId,\\n jobCreator,\\n resourceProvider,\\n actualPayment,\\n PaymentReason.JobPayment\\n );\\n\\n // if the job cost more than the payment collateral then we shold not go negative\\n // otherwise we are paying out more than the JC has put in\\n //\\n // the RP is loosing out a bit here but they agreed to doing the job\\n if(jcRefund > 0) {\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n jcRefund,\\n PaymentReason.PaymentCollateral\\n );\\n }\\n\\n // refund the JC timeout collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n\\n // refund the RP results collateral\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n // * charge the JC the mediation fee\\n // * refund the JC the timeout collateral\\n function checkResult(\\n string memory dealId,\\n address jobCreator,\\n uint256 timeoutCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n \\n // the refund of the timeout collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n\\n // the payment of the mediation fee\\n _payEscrow(\\n dealId,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n }\\n\\n /**\\n * Mediation\\n */\\n\\n // * pay the RP the job cost\\n // * refund the RP the results collateral\\n // * refund the JC the job collateral minus the job cost\\n // * pay the mediator for mediating\\n function mediationAcceptResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 jobCost,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n uint256 actualPayment = jobCost;\\n uint256 jcRefund = 0;\\n if(jobCost > paymentCollateral) {\\n actualPayment = paymentCollateral;\\n } else {\\n jcRefund = paymentCollateral - jobCost;\\n }\\n \\n // pay the RP the job cost from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n resourceProvider,\\n actualPayment,\\n PaymentReason.JobPayment\\n );\\n\\n // pay the mediator the fee from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n tx.origin,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n\\n // if the job cost more than the payment collateral then we shold not go negative\\n // otherwise we are paying out more than the JC has put in\\n //\\n // the RP is loosing out a bit here but they agreed to doing the job\\n if(jcRefund > 0) {\\n\\n // refund the JC the diff between payment collateral and job cost\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n jcRefund,\\n PaymentReason.PaymentCollateral\\n );\\n }\\n\\n // refund the RP the results collateral\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n // * refund the JC their payment collateral\\n // * slash the RP's results collateral\\n // * pay the mediator for mediating\\n function mediationRejectResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n // refund the JC their payment collateral\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // pay the mediator the fee from the JC\\n _payOut(\\n dealId,\\n jobCreator,\\n tx.origin,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n\\n // slash the RP\\n _slashEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n }\\n\\n /**\\n * Timeouts\\n */\\n function timeoutAgreeRefundResourceProvider(\\n string memory dealId,\\n address resourceProvider,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n function timeoutAgreeRefundJobCreator(\\n string memory dealId,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the JC's job collateral\\n // * pay back the JC's timeout collateral\\n // * slash the RP's results collateral\\n function timeoutSubmitResults(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the JC\\\");\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the job collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n \\n // the slashing of the timeout collateral for the RP\\n _slashEscrow(\\n dealId,\\n resourceProvider,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the RP's results collateral\\n // * pay the RP the cost of the job\\n // * slash the JC's timeout collateral\\n // * slash the JC's job collateral\\n function timeoutJudgeResults(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 resultsCollateral,\\n uint256 timeoutCollateral\\n ) public onlyController {\\n require(tx.origin == resourceProvider, \\\"LilypadPayments: Can only be called by the RP\\\");\\n // the refund of the results collateral to the RP\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n\\n // the slashing of the timeout collateral for the RP\\n _slashEscrow(\\n dealId,\\n jobCreator,\\n timeoutCollateral,\\n PaymentReason.TimeoutCollateral\\n );\\n }\\n\\n // * pay back the RP's results collateral\\n // * pay back the JC's payment collateral\\n // * pay back the JC's mediation fee\\n function timeoutMediateResult(\\n string memory dealId,\\n address resourceProvider,\\n address jobCreator,\\n uint256 paymentCollateral,\\n uint256 resultsCollateral,\\n uint256 mediationFee\\n ) public onlyController {\\n require(tx.origin == resourceProvider || tx.origin == jobCreator, \\\"LilypadPayments: Can only be called by the RP or JC\\\");\\n // the refund of the results collateral to the RP\\n _refundEscrow(\\n dealId,\\n resourceProvider,\\n resultsCollateral,\\n PaymentReason.ResultsCollateral\\n );\\n\\n // the refund of the payment collateral to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n paymentCollateral,\\n PaymentReason.PaymentCollateral\\n );\\n\\n // the refund of the mediation fee to the JC\\n _refundEscrow(\\n dealId,\\n jobCreator,\\n mediationFee,\\n PaymentReason.MediationFee\\n );\\n }\\n\\n /**\\n * Payment utils\\n */\\n\\n\\n function _payEscrow(\\n string memory dealId,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // we check they have that much in their token balance before moving to tokens to us\\n require(tokenContract.balanceOf(tx.origin) >= amount, \\\"LilypadPayments: Insufficient balance\\\");\\n\\n // console.log(\\\"_payEscrow\\\");\\n // console.log(accountNames[tx.origin]);\\n // console.log(amount);\\n\\n bool success = tokenContract.payEscrow(amount);\\n require(success, \\\"LilypadPayments: Pay escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n tx.origin,\\n amount,\\n reason,\\n PaymentDirection.PaidIn\\n );\\n }\\n\\n function _refundEscrow(\\n string memory dealId,\\n address toAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_refundEscrow\\\");\\n // console.log(accountNames[toAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.refundEscrow(toAddress, amount);\\n require(success, \\\"LilypadPayments: Refund escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n toAddress,\\n amount,\\n reason,\\n PaymentDirection.Refunded\\n );\\n }\\n\\n function _payOut(\\n string memory dealId,\\n address fromAddress,\\n address toAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_payJob\\\");\\n // console.log(accountNames[fromAddress]);\\n // console.log(accountNames[toAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.payJob(fromAddress, toAddress, amount);\\n require(success, \\\"LilypadPayments: Pay job failed\\\");\\n\\n emit Payment(\\n dealId,\\n toAddress,\\n amount,\\n reason,\\n PaymentDirection.PaidOut\\n );\\n }\\n\\n function _slashEscrow(\\n string memory dealId,\\n address slashedAddress,\\n uint256 amount,\\n PaymentReason reason\\n ) private {\\n // console.log(\\\"_slashEscrow\\\");\\n // console.log(accountNames[slashedAddress]);\\n // console.log(amount);\\n\\n bool success = tokenContract.slashEscrow(slashedAddress, amount);\\n require(success, \\\"LilypadPayments: Slash escrow failed\\\");\\n\\n emit Payment(\\n dealId,\\n slashedAddress,\\n amount,\\n reason,\\n PaymentDirection.Slashed\\n );\\n }\\n}\\n\",\"keccak256\":\"0x2967897646a0393955b571bef9b659cdeca6fb4eff85330ac0eb027f08ef981c\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055506001600360146101000a81548160ff02191690831515021790555034801562000045575f80fd5b50620000666200005a6200006c60201b60201c565b6200007360201b60201c565b62000134565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6128c080620001425f395ff3fe608060405234801561000f575f80fd5b5060043610610140575f3560e01c80639e3868dc116100b6578063b91880351161007a578063b9188035146102d2578063c4d66de8146102ee578063c57380a21461030a578063d2485cce14610328578063f2fde38b14610344578063f3d3d4481461036057610140565b80639e3868dc14610258578063a470295814610274578063aea382511461027e578063afe1dff71461029a578063b1356714146102b657610140565b80632a1f9072116101085780632a1f9072146101d257806338698529146101ee5780634bc28da11461020a578063715018a614610214578063823f3de11461021e5780638da5cb5b1461023a57610140565b806302fd8f801461014457806309cab510146101605780630ef0d89e1461017c57806310fe9ae81461019857806326a4e8d2146101b6575b5f80fd5b61015e60048036038101906101599190611951565b61037c565b005b61017a600480360381019061017591906119e4565b610420565b005b61019660048036038101906101919190611a64565b6104b6565b005b6101a061053f565b6040516101ad9190611adf565b60405180910390f35b6101d060048036038101906101cb9190611af8565b610567565b005b6101ec60048036038101906101e79190611b23565b6106af565b005b61020860048036038101906102039190611951565b610725565b005b6102126107bd565b005b61021c6107e1565b005b61023860048036038101906102339190611bdc565b6107f4565b005b6102426108cf565b60405161024f9190611adf565b60405180910390f35b610272600480360381019061026d9190611a64565b6108f6565b005b61027c61097e565b005b610298600480360381019061029391906119e4565b6109a2565b005b6102b460048036038101906102af91906119e4565b610a38565b005b6102d060048036038101906102cb9190611b23565b610ace565b005b6102ec60048036038101906102e791906119e4565b610bb1565b005b61030860048036038101906103039190611af8565b610c45565b005b610312610d86565b60405161031f9190611adf565b60405180910390f35b610342600480360381019061033d9190611bdc565b610dae565b005b61035e60048036038101906103599190611af8565b610de6565b005b61037a60048036038101906103759190611af8565b610e68565b005b610384610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146103f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ea90611d01565b60405180910390fd5b6103ff8584845f61109d565b61040c858483600261109d565b61041985858360026111c3565b5050505050565b610428610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048e90611d8f565b60405180910390fd5b6104a3848360016112e9565b6104b0848483600261109d565b50505050565b6104be610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052490611d8f565b60405180910390fd5b61053a838383600261109d565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056f6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d490611e1d565b60405180910390fd5b600360149054906101000a900460ff1661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062390611eab565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106b7610f70565b505f8490505f848611156106cd578491506106dc565b85856106d99190611ef6565b90505b6106ea89888a856003611564565b6106f8898832866004611564565b5f81111561070d5761070c8988835f61109d565b5b61071a898986600161109d565b505050505050505050565b61072d610f70565b508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461079c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079390611d8f565b60405180910390fd5b6107a9858584600161109d565b6107b685848360026111c3565b5050505050565b6107c56114e6565b5f600360146101000a81548160ff021916908315150217905550565b6107e96114e6565b6107f25f61168d565b565b6107fc610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16148061086257508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b6108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089890611f99565b60405180910390fd5b6108ae868684600161109d565b6108ba8685855f61109d565b6108c7868583600461109d565b505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108fe610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490611d8f565b60405180910390fd5b610979838260026112e9565b505050565b6109866114e6565b5f600160146101000a81548160ff021916908315150217905550565b6109aa610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1090611d01565b60405180910390fd5b610a26848484600261109d565b610a32848260046112e9565b50505050565b610a40610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611d01565b60405180910390fd5b610abb8484845f61109d565b610ac8848483600261109d565b50505050565b610ad6610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611d01565b60405180910390fd5b5f8490505f84861115610b5a57849150610b69565b8585610b669190611ef6565b90505b610b7789888a856003611564565b5f811115610b8c57610b8b8988835f61109d565b5b610b99898885600261109d565b610ba6898986600161109d565b505050505050505050565b610bb9610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f90611d01565b60405180910390fd5b610c3384835f6112e9565b610c3f848260026112e9565b50505050565b5f600160169054906101000a900460ff16159050808015610c77575060018060159054906101000a900460ff1660ff16105b80610ca55750610c863061174e565b158015610ca4575060018060159054906101000a900460ff1660ff16145b5b610ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdb90612027565b60405180910390fd5b60018060156101000a81548160ff021916908360ff1602179055508015610d205760018060166101000a81548160ff0219169083151502179055505b610d2982610567565b8015610d82575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d799190612093565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610db6610f70565b50610dc38685855f61109d565b610dd1868532846004611564565b610dde86868460016111c3565b505050505050565b610dee6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e539061211c565b60405180910390fd5b610e658161168d565b50565b610e706114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ede576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed5906121aa565b60405180910390fd5b600160149054906101000a900460ff16610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490612238565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff7906121aa565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611040611770565b73ffffffffffffffffffffffffffffffffffffffff1614611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906122c6565b60405180910390fd5b6001905090565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663599efa6b85856040518363ffffffff1660e01b81526004016110fa9291906122f3565b6020604051808303815f875af1158015611116573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113a919061234f565b90508061117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611173906123ea565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560026040516111b495949392919061252b565b60405180910390a15050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166388c2bdfe85856040518363ffffffff1660e01b81526004016112209291906122f3565b6020604051808303815f875af115801561123c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611260919061234f565b9050806112a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611299906125f3565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560036040516112da95949392919061252b565b60405180910390a15050505050565b8160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231326040518263ffffffff1660e01b81526004016113449190611adf565b602060405180830381865afa15801561135f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113839190612625565b10156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb906126c0565b60405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635407e93c846040518263ffffffff1660e01b815260040161141f91906126de565b6020604051808303815f875af115801561143b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061145f919061234f565b9050806114a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149890612767565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a9842843285855f6040516114d895949392919061252b565b60405180910390a150505050565b6114ee611770565b73ffffffffffffffffffffffffffffffffffffffff1661150c6108cf565b73ffffffffffffffffffffffffffffffffffffffff1614611562576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611559906127cf565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663065e86c88686866040518463ffffffff1660e01b81526004016115c3939291906127ed565b6020604051808303815f875af11580156115df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611603919061234f565b905080611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c9061286c565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a984286858585600160405161167d95949392919061252b565b60405180910390a1505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117d682611790565b810181811067ffffffffffffffff821117156117f5576117f46117a0565b5b80604052505050565b5f611807611777565b905061181382826117cd565b919050565b5f67ffffffffffffffff821115611832576118316117a0565b5b61183b82611790565b9050602081019050919050565b828183375f83830152505050565b5f61186861186384611818565b6117fe565b9050828152602081018484840111156118845761188361178c565b5b61188f848285611848565b509392505050565b5f82601f8301126118ab576118aa611788565b5b81356118bb848260208601611856565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118ed826118c4565b9050919050565b6118fd816118e3565b8114611907575f80fd5b50565b5f81359050611918816118f4565b92915050565b5f819050919050565b6119308161191e565b811461193a575f80fd5b50565b5f8135905061194b81611927565b92915050565b5f805f805f60a0868803121561196a57611969611780565b5b5f86013567ffffffffffffffff81111561198757611986611784565b5b61199388828901611897565b95505060206119a48882890161190a565b94505060406119b58882890161190a565b93505060606119c68882890161193d565b92505060806119d78882890161193d565b9150509295509295909350565b5f805f80608085870312156119fc576119fb611780565b5b5f85013567ffffffffffffffff811115611a1957611a18611784565b5b611a2587828801611897565b9450506020611a368782880161190a565b9350506040611a478782880161193d565b9250506060611a588782880161193d565b91505092959194509250565b5f805f60608486031215611a7b57611a7a611780565b5b5f84013567ffffffffffffffff811115611a9857611a97611784565b5b611aa486828701611897565b9350506020611ab58682870161190a565b9250506040611ac68682870161193d565b9150509250925092565b611ad9816118e3565b82525050565b5f602082019050611af25f830184611ad0565b92915050565b5f60208284031215611b0d57611b0c611780565b5b5f611b1a8482850161190a565b91505092915050565b5f805f805f805f60e0888a031215611b3e57611b3d611780565b5b5f88013567ffffffffffffffff811115611b5b57611b5a611784565b5b611b678a828b01611897565b9750506020611b788a828b0161190a565b9650506040611b898a828b0161190a565b9550506060611b9a8a828b0161193d565b9450506080611bab8a828b0161193d565b93505060a0611bbc8a828b0161193d565b92505060c0611bcd8a828b0161193d565b91505092959891949750929550565b5f805f805f8060c08789031215611bf657611bf5611780565b5b5f87013567ffffffffffffffff811115611c1357611c12611784565b5b611c1f89828a01611897565b9650506020611c3089828a0161190a565b9550506040611c4189828a0161190a565b9450506060611c5289828a0161193d565b9350506080611c6389828a0161193d565b92505060a0611c7489828a0161193d565b9150509295509295509295565b5f82825260208201905092915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865204a4300000000000000000000000000000000000000602082015250565b5f611ceb602d83611c81565b9150611cf682611c91565b604082019050919050565b5f6020820190508181035f830152611d1881611cdf565b9050919050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c65642062792074686520525000000000000000000000000000000000000000602082015250565b5f611d79602d83611c81565b9150611d8482611d1f565b604082019050919050565b5f6020820190508181035f830152611da681611d6d565b9050919050565b7f4c696c657061645061796d656e74733a20546f6b656e2061646472657373206d5f8201527f75737420626520646566696e6564000000000000000000000000000000000000602082015250565b5f611e07602e83611c81565b9150611e1282611dad565b604082019050919050565b5f6020820190508181035f830152611e3481611dfb565b9050919050565b7f4c696c79706164546f6b656e3a2063616e4368616e6765546f6b656e416464725f8201527f6573732069732064697361626c65640000000000000000000000000000000000602082015250565b5f611e95602f83611c81565b9150611ea082611e3b565b604082019050919050565b5f6020820190508181035f830152611ec281611e89565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f008261191e565b9150611f0b8361191e565b9250828203905081811115611f2357611f22611ec9565b5b92915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865205250206f72204a4300000000000000000000000000602082015250565b5f611f83603383611c81565b9150611f8e82611f29565b604082019050919050565b5f6020820190508181035f830152611fb081611f77565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f612011602e83611c81565b915061201c82611fb7565b604082019050919050565b5f6020820190508181035f83015261203e81612005565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61207d61207861207384612045565b61205a565b61204e565b9050919050565b61208d81612063565b82525050565b5f6020820190506120a65f830184612084565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612106602683611c81565b9150612111826120ac565b604082019050919050565b5f6020820190508181035f830152612133816120fa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f612194603583611c81565b915061219f8261213a565b604082019050919050565b5f6020820190508181035f8301526121c181612188565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f612222603983611c81565b915061222d826121c8565b604082019050919050565b5f6020820190508181035f83015261224f81612216565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6122b0603b83611c81565b91506122bb82612256565b604082019050919050565b5f6020820190508181035f8301526122dd816122a4565b9050919050565b6122ed8161191e565b82525050565b5f6040820190506123065f830185611ad0565b61231360208301846122e4565b9392505050565b5f8115159050919050565b61232e8161231a565b8114612338575f80fd5b50565b5f8151905061234981612325565b92915050565b5f6020828403121561236457612363611780565b5b5f6123718482850161233b565b91505092915050565b7f4c696c797061645061796d656e74733a20526566756e6420657363726f7720665f8201527f61696c6564000000000000000000000000000000000000000000000000000000602082015250565b5f6123d4602583611c81565b91506123df8261237a565b604082019050919050565b5f6020820190508181035f830152612401816123c8565b9050919050565b5f81519050919050565b5f5b8381101561242f578082015181840152602081019050612414565b5f8484015250505050565b5f61244482612408565b61244e8185611c81565b935061245e818560208601612412565b61246781611790565b840191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600581106124b0576124af612472565b5b50565b5f8190506124c08261249f565b919050565b5f6124cf826124b3565b9050919050565b6124df816124c5565b82525050565b600481106124f6576124f5612472565b5b50565b5f819050612506826124e5565b919050565b5f612515826124f9565b9050919050565b6125258161250b565b82525050565b5f60a0820190508181035f830152612543818861243a565b90506125526020830187611ad0565b61255f60408301866122e4565b61256c60608301856124d6565b612579608083018461251c565b9695505050505050565b7f4c696c797061645061796d656e74733a20536c61736820657363726f772066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f6125dd602483611c81565b91506125e882612583565b604082019050919050565b5f6020820190508181035f83015261260a816125d1565b9050919050565b5f8151905061261f81611927565b92915050565b5f6020828403121561263a57612639611780565b5b5f61264784828501612611565b91505092915050565b7f4c696c797061645061796d656e74733a20496e73756666696369656e742062615f8201527f6c616e6365000000000000000000000000000000000000000000000000000000602082015250565b5f6126aa602583611c81565b91506126b582612650565b604082019050919050565b5f6020820190508181035f8301526126d78161269e565b9050919050565b5f6020820190506126f15f8301846122e4565b92915050565b7f4c696c797061645061796d656e74733a2050617920657363726f77206661696c5f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f612751602283611c81565b915061275c826126f7565b604082019050919050565b5f6020820190508181035f83015261277e81612745565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6127b9602083611c81565b91506127c482612785565b602082019050919050565b5f6020820190508181035f8301526127e6816127ad565b9050919050565b5f6060820190506128005f830186611ad0565b61280d6020830185611ad0565b61281a60408301846122e4565b949350505050565b7f4c696c797061645061796d656e74733a20506179206a6f62206661696c6564005f82015250565b5f612856601f83611c81565b915061286182612822565b602082019050919050565b5f6020820190508181035f8301526128838161284a565b905091905056fea2646970667358221220824d577d5c1421b3c695c691b639c8ac5f9d1f7c90b2a900d0bf33b48f7b90f264736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610140575f3560e01c80639e3868dc116100b6578063b91880351161007a578063b9188035146102d2578063c4d66de8146102ee578063c57380a21461030a578063d2485cce14610328578063f2fde38b14610344578063f3d3d4481461036057610140565b80639e3868dc14610258578063a470295814610274578063aea382511461027e578063afe1dff71461029a578063b1356714146102b657610140565b80632a1f9072116101085780632a1f9072146101d257806338698529146101ee5780634bc28da11461020a578063715018a614610214578063823f3de11461021e5780638da5cb5b1461023a57610140565b806302fd8f801461014457806309cab510146101605780630ef0d89e1461017c57806310fe9ae81461019857806326a4e8d2146101b6575b5f80fd5b61015e60048036038101906101599190611951565b61037c565b005b61017a600480360381019061017591906119e4565b610420565b005b61019660048036038101906101919190611a64565b6104b6565b005b6101a061053f565b6040516101ad9190611adf565b60405180910390f35b6101d060048036038101906101cb9190611af8565b610567565b005b6101ec60048036038101906101e79190611b23565b6106af565b005b61020860048036038101906102039190611951565b610725565b005b6102126107bd565b005b61021c6107e1565b005b61023860048036038101906102339190611bdc565b6107f4565b005b6102426108cf565b60405161024f9190611adf565b60405180910390f35b610272600480360381019061026d9190611a64565b6108f6565b005b61027c61097e565b005b610298600480360381019061029391906119e4565b6109a2565b005b6102b460048036038101906102af91906119e4565b610a38565b005b6102d060048036038101906102cb9190611b23565b610ace565b005b6102ec60048036038101906102e791906119e4565b610bb1565b005b61030860048036038101906103039190611af8565b610c45565b005b610312610d86565b60405161031f9190611adf565b60405180910390f35b610342600480360381019061033d9190611bdc565b610dae565b005b61035e60048036038101906103599190611af8565b610de6565b005b61037a60048036038101906103759190611af8565b610e68565b005b610384610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146103f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ea90611d01565b60405180910390fd5b6103ff8584845f61109d565b61040c858483600261109d565b61041985858360026111c3565b5050505050565b610428610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048e90611d8f565b60405180910390fd5b6104a3848360016112e9565b6104b0848483600261109d565b50505050565b6104be610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461052d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052490611d8f565b60405180910390fd5b61053a838383600261109d565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056f6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d490611e1d565b60405180910390fd5b600360149054906101000a900460ff1661062c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062390611eab565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6106b7610f70565b505f8490505f848611156106cd578491506106dc565b85856106d99190611ef6565b90505b6106ea89888a856003611564565b6106f8898832866004611564565b5f81111561070d5761070c8988835f61109d565b5b61071a898986600161109d565b505050505050505050565b61072d610f70565b508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461079c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079390611d8f565b60405180910390fd5b6107a9858584600161109d565b6107b685848360026111c3565b5050505050565b6107c56114e6565b5f600360146101000a81548160ff021916908315150217905550565b6107e96114e6565b6107f25f61168d565b565b6107fc610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16148061086257508373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b6108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089890611f99565b60405180910390fd5b6108ae868684600161109d565b6108ba8685855f61109d565b6108c7868583600461109d565b505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108fe610f70565b508173ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461096d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096490611d8f565b60405180910390fd5b610979838260026112e9565b505050565b6109866114e6565b5f600160146101000a81548160ff021916908315150217905550565b6109aa610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1090611d01565b60405180910390fd5b610a26848484600261109d565b610a32848260046112e9565b50505050565b610a40610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611d01565b60405180910390fd5b610abb8484845f61109d565b610ac8848483600261109d565b50505050565b610ad6610f70565b508473ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611d01565b60405180910390fd5b5f8490505f84861115610b5a57849150610b69565b8585610b669190611ef6565b90505b610b7789888a856003611564565b5f811115610b8c57610b8b8988835f61109d565b5b610b99898885600261109d565b610ba6898986600161109d565b505050505050505050565b610bb9610f70565b508273ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1f90611d01565b60405180910390fd5b610c3384835f6112e9565b610c3f848260026112e9565b50505050565b5f600160169054906101000a900460ff16159050808015610c77575060018060159054906101000a900460ff1660ff16105b80610ca55750610c863061174e565b158015610ca4575060018060159054906101000a900460ff1660ff16145b5b610ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdb90612027565b60405180910390fd5b60018060156101000a81548160ff021916908360ff1602179055508015610d205760018060166101000a81548160ff0219169083151502179055505b610d2982610567565b8015610d82575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d799190612093565b60405180910390a15b5050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610db6610f70565b50610dc38685855f61109d565b610dd1868532846004611564565b610dde86868460016111c3565b505050505050565b610dee6114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e539061211c565b60405180910390fd5b610e658161168d565b50565b610e706114e6565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ede576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed5906121aa565b60405180910390fd5b600160149054906101000a900460ff16610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490612238565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff7906121aa565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611040611770565b73ffffffffffffffffffffffffffffffffffffffff1614611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906122c6565b60405180910390fd5b6001905090565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663599efa6b85856040518363ffffffff1660e01b81526004016110fa9291906122f3565b6020604051808303815f875af1158015611116573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113a919061234f565b90508061117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611173906123ea565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560026040516111b495949392919061252b565b60405180910390a15050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166388c2bdfe85856040518363ffffffff1660e01b81526004016112209291906122f3565b6020604051808303815f875af115801561123c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611260919061234f565b9050806112a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611299906125f3565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a98428585858560036040516112da95949392919061252b565b60405180910390a15050505050565b8160035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231326040518263ffffffff1660e01b81526004016113449190611adf565b602060405180830381865afa15801561135f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113839190612625565b10156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb906126c0565b60405180910390fd5b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635407e93c846040518263ffffffff1660e01b815260040161141f91906126de565b6020604051808303815f875af115801561143b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061145f919061234f565b9050806114a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149890612767565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a9842843285855f6040516114d895949392919061252b565b60405180910390a150505050565b6114ee611770565b73ffffffffffffffffffffffffffffffffffffffff1661150c6108cf565b73ffffffffffffffffffffffffffffffffffffffff1614611562576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611559906127cf565b60405180910390fd5b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663065e86c88686866040518463ffffffff1660e01b81526004016115c3939291906127ed565b6020604051808303815f875af11580156115df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611603919061234f565b905080611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163c9061286c565b60405180910390fd5b7f64861f505d0cfce7a0cc3629c70eb54f7de27be35939b48300935694958a984286858585600160405161167d95949392919061252b565b60405180910390a1505050505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117d682611790565b810181811067ffffffffffffffff821117156117f5576117f46117a0565b5b80604052505050565b5f611807611777565b905061181382826117cd565b919050565b5f67ffffffffffffffff821115611832576118316117a0565b5b61183b82611790565b9050602081019050919050565b828183375f83830152505050565b5f61186861186384611818565b6117fe565b9050828152602081018484840111156118845761188361178c565b5b61188f848285611848565b509392505050565b5f82601f8301126118ab576118aa611788565b5b81356118bb848260208601611856565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118ed826118c4565b9050919050565b6118fd816118e3565b8114611907575f80fd5b50565b5f81359050611918816118f4565b92915050565b5f819050919050565b6119308161191e565b811461193a575f80fd5b50565b5f8135905061194b81611927565b92915050565b5f805f805f60a0868803121561196a57611969611780565b5b5f86013567ffffffffffffffff81111561198757611986611784565b5b61199388828901611897565b95505060206119a48882890161190a565b94505060406119b58882890161190a565b93505060606119c68882890161193d565b92505060806119d78882890161193d565b9150509295509295909350565b5f805f80608085870312156119fc576119fb611780565b5b5f85013567ffffffffffffffff811115611a1957611a18611784565b5b611a2587828801611897565b9450506020611a368782880161190a565b9350506040611a478782880161193d565b9250506060611a588782880161193d565b91505092959194509250565b5f805f60608486031215611a7b57611a7a611780565b5b5f84013567ffffffffffffffff811115611a9857611a97611784565b5b611aa486828701611897565b9350506020611ab58682870161190a565b9250506040611ac68682870161193d565b9150509250925092565b611ad9816118e3565b82525050565b5f602082019050611af25f830184611ad0565b92915050565b5f60208284031215611b0d57611b0c611780565b5b5f611b1a8482850161190a565b91505092915050565b5f805f805f805f60e0888a031215611b3e57611b3d611780565b5b5f88013567ffffffffffffffff811115611b5b57611b5a611784565b5b611b678a828b01611897565b9750506020611b788a828b0161190a565b9650506040611b898a828b0161190a565b9550506060611b9a8a828b0161193d565b9450506080611bab8a828b0161193d565b93505060a0611bbc8a828b0161193d565b92505060c0611bcd8a828b0161193d565b91505092959891949750929550565b5f805f805f8060c08789031215611bf657611bf5611780565b5b5f87013567ffffffffffffffff811115611c1357611c12611784565b5b611c1f89828a01611897565b9650506020611c3089828a0161190a565b9550506040611c4189828a0161190a565b9450506060611c5289828a0161193d565b9350506080611c6389828a0161193d565b92505060a0611c7489828a0161193d565b9150509295509295509295565b5f82825260208201905092915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865204a4300000000000000000000000000000000000000602082015250565b5f611ceb602d83611c81565b9150611cf682611c91565b604082019050919050565b5f6020820190508181035f830152611d1881611cdf565b9050919050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c65642062792074686520525000000000000000000000000000000000000000602082015250565b5f611d79602d83611c81565b9150611d8482611d1f565b604082019050919050565b5f6020820190508181035f830152611da681611d6d565b9050919050565b7f4c696c657061645061796d656e74733a20546f6b656e2061646472657373206d5f8201527f75737420626520646566696e6564000000000000000000000000000000000000602082015250565b5f611e07602e83611c81565b9150611e1282611dad565b604082019050919050565b5f6020820190508181035f830152611e3481611dfb565b9050919050565b7f4c696c79706164546f6b656e3a2063616e4368616e6765546f6b656e416464725f8201527f6573732069732064697361626c65640000000000000000000000000000000000602082015250565b5f611e95602f83611c81565b9150611ea082611e3b565b604082019050919050565b5f6020820190508181035f830152611ec281611e89565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f008261191e565b9150611f0b8361191e565b9250828203905081811115611f2357611f22611ec9565b5b92915050565b7f4c696c797061645061796d656e74733a2043616e206f6e6c792062652063616c5f8201527f6c656420627920746865205250206f72204a4300000000000000000000000000602082015250565b5f611f83603383611c81565b9150611f8e82611f29565b604082019050919050565b5f6020820190508181035f830152611fb081611f77565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f612011602e83611c81565b915061201c82611fb7565b604082019050919050565b5f6020820190508181035f83015261203e81612005565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61207d61207861207384612045565b61205a565b61204e565b9050919050565b61208d81612063565b82525050565b5f6020820190506120a65f830184612084565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f612106602683611c81565b9150612111826120ac565b604082019050919050565b5f6020820190508181035f830152612133816120fa565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f612194603583611c81565b915061219f8261213a565b604082019050919050565b5f6020820190508181035f8301526121c181612188565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f612222603983611c81565b915061222d826121c8565b604082019050919050565b5f6020820190508181035f83015261224f81612216565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6122b0603b83611c81565b91506122bb82612256565b604082019050919050565b5f6020820190508181035f8301526122dd816122a4565b9050919050565b6122ed8161191e565b82525050565b5f6040820190506123065f830185611ad0565b61231360208301846122e4565b9392505050565b5f8115159050919050565b61232e8161231a565b8114612338575f80fd5b50565b5f8151905061234981612325565b92915050565b5f6020828403121561236457612363611780565b5b5f6123718482850161233b565b91505092915050565b7f4c696c797061645061796d656e74733a20526566756e6420657363726f7720665f8201527f61696c6564000000000000000000000000000000000000000000000000000000602082015250565b5f6123d4602583611c81565b91506123df8261237a565b604082019050919050565b5f6020820190508181035f830152612401816123c8565b9050919050565b5f81519050919050565b5f5b8381101561242f578082015181840152602081019050612414565b5f8484015250505050565b5f61244482612408565b61244e8185611c81565b935061245e818560208601612412565b61246781611790565b840191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600581106124b0576124af612472565b5b50565b5f8190506124c08261249f565b919050565b5f6124cf826124b3565b9050919050565b6124df816124c5565b82525050565b600481106124f6576124f5612472565b5b50565b5f819050612506826124e5565b919050565b5f612515826124f9565b9050919050565b6125258161250b565b82525050565b5f60a0820190508181035f830152612543818861243a565b90506125526020830187611ad0565b61255f60408301866122e4565b61256c60608301856124d6565b612579608083018461251c565b9695505050505050565b7f4c696c797061645061796d656e74733a20536c61736820657363726f772066615f8201527f696c656400000000000000000000000000000000000000000000000000000000602082015250565b5f6125dd602483611c81565b91506125e882612583565b604082019050919050565b5f6020820190508181035f83015261260a816125d1565b9050919050565b5f8151905061261f81611927565b92915050565b5f6020828403121561263a57612639611780565b5b5f61264784828501612611565b91505092915050565b7f4c696c797061645061796d656e74733a20496e73756666696369656e742062615f8201527f6c616e6365000000000000000000000000000000000000000000000000000000602082015250565b5f6126aa602583611c81565b91506126b582612650565b604082019050919050565b5f6020820190508181035f8301526126d78161269e565b9050919050565b5f6020820190506126f15f8301846122e4565b92915050565b7f4c696c797061645061796d656e74733a2050617920657363726f77206661696c5f8201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b5f612751602283611c81565b915061275c826126f7565b604082019050919050565b5f6020820190508181035f83015261277e81612745565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6127b9602083611c81565b91506127c482612785565b602082019050919050565b5f6020820190508181035f8301526127e6816127ad565b9050919050565b5f6060820190506128005f830186611ad0565b61280d6020830185611ad0565b61281a60408301846122e4565b949350505050565b7f4c696c797061645061796d656e74733a20506179206a6f62206661696c6564005f82015250565b5f612856601f83611c81565b915061286182612822565b602082019050919050565b5f6020820190508181035f8301526128838161284a565b905091905056fea2646970667358221220824d577d5c1421b3c695c691b639c8ac5f9d1f7c90b2a900d0bf33b48f7b90f264736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "Payment(string,address,uint256,uint8,uint8)": { + "notice": "Events" + } + }, + "kind": "user", + "methods": { + "addResult(string,address,uint256,uint256)": { + "notice": "Results" + }, + "agreeResourceProvider(string,address,uint256)": { + "notice": "Agreements" + }, + "mediationAcceptResult(string,address,address,uint256,uint256,uint256,uint256)": { + "notice": "Mediation" + }, + "timeoutAgreeRefundResourceProvider(string,address,uint256)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1475, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1478, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 6, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 3788, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "tokenAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 3791, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "tokenContract", + "offset": 0, + "slot": "3", + "type": "t_contract(ILilypadToken)2213" + }, + { + "astId": 3794, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "canChangeTokenAddress", + "offset": 20, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 3826, + "contract": "contracts/LilypadPayments.sol:LilypadPayments", + "label": "accountNames", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ILilypadToken)2213": { + "encoding": "inplace", + "label": "contract ILilypadToken", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_string_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadStorage.json b/hardhat/deployments/sepolia/LilypadStorage.json new file mode 100644 index 00000000..db95da3f --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadStorage.json @@ -0,0 +1,1746 @@ +{ + "address": "0x79Ee2d28eDDd9Ee0b68613b29Dab474623F8D1c6", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "indexed": false, + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + } + ], + "name": "DealStateChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "acceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "name": "addResult", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Result", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "agreeJobCreator", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "agreeResourceProvider", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "checkResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "name": "ensureDeal", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getAgreement", + "outputs": [ + { + "components": [ + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "resourceProviderAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jobCreatorAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealCreatedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dealAgreedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsSubmittedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCheckedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationAcceptedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationRejectedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutAgreeAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutSubmitResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutJudgeResultsAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeoutMediateResultsAt", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Agreement", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getDeal", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "components": [ + { + "internalType": "address", + "name": "solver", + "type": "address" + }, + { + "internalType": "address", + "name": "jobCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "resourceProvider", + "type": "address" + }, + { + "internalType": "address[]", + "name": "mediators", + "type": "address[]" + } + ], + "internalType": "struct SharedStructs.DealMembers", + "name": "members", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "agree", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "submitResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "judgeResults", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "timeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealTimeout", + "name": "mediateResults", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.DealTimeouts", + "name": "timeouts", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "instructionPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymentCollateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "resultsCollateralMultiple", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mediationFee", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.DealPricing", + "name": "pricing", + "type": "tuple" + } + ], + "internalType": "struct SharedStructs.Deal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "party", + "type": "address" + } + ], + "name": "getDealsForParty", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getJobCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getResult", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "string", + "name": "resultsId", + "type": "string" + }, + { + "internalType": "string", + "name": "dataId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "instructionCount", + "type": "uint256" + } + ], + "internalType": "struct SharedStructs.Result", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "getResultsCollateral", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "hasDeal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + }, + { + "internalType": "enum SharedStructs.AgreementState", + "name": "state", + "type": "uint8" + } + ], + "name": "isState", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationAcceptResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "mediationRejectResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutAgree", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutJudgeResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutMediateResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "dealId", + "type": "string" + } + ], + "name": "timeoutSubmitResult", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xcaded47756bb423bb266b7af20618c9645b85bf91c2bcee74acccc0d3151e537", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0x79Ee2d28eDDd9Ee0b68613b29Dab474623F8D1c6", + "transactionIndex": 12, + "gasUsed": "4534225", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000004000000000000000000000000020000000000000000000800000000000000010000000000000000400000000000000000000000000000000004001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4a8aa531c4f71b81f449c80483936ac217ed82503614c30d0a2b53de77428dd8", + "transactionHash": "0xcaded47756bb423bb266b7af20618c9645b85bf91c2bcee74acccc0d3151e537", + "logs": [ + { + "transactionIndex": 12, + "blockNumber": 4609895, + "transactionHash": "0xcaded47756bb423bb266b7af20618c9645b85bf91c2bcee74acccc0d3151e537", + "address": "0x79Ee2d28eDDd9Ee0b68613b29Dab474623F8D1c6", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 17, + "blockHash": "0x4a8aa531c4f71b81f449c80483936ac217ed82503614c30d0a2b53de77428dd8" + } + ], + "blockNumber": 4609895, + "cumulativeGasUsed": "6566264", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"}],\"name\":\"DealStateChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"acceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"name\":\"addResult\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Result\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"agreeJobCreator\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"agreeResourceProvider\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"checkResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"name\":\"ensureDeal\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getAgreement\",\"outputs\":[{\"components\":[{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"resourceProviderAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jobCreatorAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealCreatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dealAgreedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsSubmittedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCheckedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationAcceptedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationRejectedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutAgreeAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutSubmitResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutJudgeResultsAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeoutMediateResultsAt\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Agreement\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getDeal\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"solver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"jobCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resourceProvider\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"mediators\",\"type\":\"address[]\"}],\"internalType\":\"struct SharedStructs.DealMembers\",\"name\":\"members\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"agree\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"submitResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"judgeResults\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collateral\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealTimeout\",\"name\":\"mediateResults\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.DealTimeouts\",\"name\":\"timeouts\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"instructionPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paymentCollateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"resultsCollateralMultiple\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mediationFee\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.DealPricing\",\"name\":\"pricing\",\"type\":\"tuple\"}],\"internalType\":\"struct SharedStructs.Deal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"party\",\"type\":\"address\"}],\"name\":\"getDealsForParty\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getJobCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getResult\",\"outputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"resultsId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"dataId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"instructionCount\",\"type\":\"uint256\"}],\"internalType\":\"struct SharedStructs.Result\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"getResultsCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"hasDeal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.AgreementState\",\"name\":\"state\",\"type\":\"uint8\"}],\"name\":\"isState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationAcceptResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"mediationRejectResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutAgree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutJudgeResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutMediateResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"dealId\",\"type\":\"string\"}],\"name\":\"timeoutSubmitResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"acceptResult(string)\":{\"notice\":\"Judge Results\"},\"getAgreement(string)\":{\"notice\":\"Agreements\"},\"getDeal(string)\":{\"notice\":\"Deals\"},\"getJobCost(string)\":{\"notice\":\"Costings\"},\"getResult(string)\":{\"notice\":\"Post Results\"},\"hasDeal(string)\":{\"notice\":\"Checkers\"},\"initialize()\":{\"notice\":\"Init\"},\"mediationAcceptResult(string)\":{\"notice\":\"Mediati:\"},\"timeoutAgree(string)\":{\"notice\":\"Timeouts\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadStorage.sol\":\"LilypadStorage\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadStorage.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\ncontract LilypadStorage is ControllerOwnable, Initializable {\\n\\n // the address that is allowed to be the msg.sender for the payment functions\\n address private controllerAddress;\\n\\n // used to cut off upgrades for the remote contract\\n bool private canChangeControllerAddress = true;\\n\\n // a map of deal id -> deal\\n mapping(string => SharedStructs.Deal) private deals;\\n\\n // a map of party -> dealid[]\\n mapping(address => string[]) private dealsForParty;\\n\\n // a map of deal id -> agreement\\n mapping(string => SharedStructs.Agreement) private agreements;\\n\\n // a map of deal id -> result\\n mapping(string => SharedStructs.Result) private results;\\n\\n // a map of deal id -> result\\n mapping(string => SharedStructs.Result) private mediations;\\n\\n event DealStateChange(\\n string dealId,\\n SharedStructs.AgreementState state\\n );\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n /**\\n * Deals\\n */\\n\\n function getDeal(\\n string memory dealId\\n ) public view returns (SharedStructs.Deal memory) {\\n return deals[dealId];\\n }\\n\\n function getDealsForParty(\\n address party\\n ) public view returns (string[] memory) {\\n return dealsForParty[party];\\n }\\n\\n function checkDealMembers(\\n SharedStructs.DealMembers memory members\\n ) private pure {\\n require(members.resourceProvider != address(0), \\\"RP missing\\\");\\n require(members.jobCreator != address(0), \\\"JC missing\\\");\\n require(members.solver != address(0), \\\"Solver missing\\\");\\n require(members.mediators.length > 0, \\\"Mediators <= 0\\\");\\n require(members.resourceProvider != members.jobCreator, \\\"RP / JC same\\\");\\n }\\n\\n function checkTimeouts(\\n SharedStructs.DealTimeouts memory timeouts\\n ) private pure {\\n // the cost of the agree timeout cannot be > 0 because the whole point is\\n // one party has not paid anything into the contract is what has timed out\\n require(timeouts.agree.collateral == 0, \\\"Agree deposit must be 0\\\");\\n // the same is true of the mediation timeout - it's cost cannot be zero\\n require(timeouts.mediateResults.collateral == 0, \\\"Mediate deposit must be 0\\\");\\n }\\n\\n function compareDealMembers(\\n SharedStructs.DealMembers memory members1,\\n SharedStructs.DealMembers memory members2\\n ) private pure {\\n require(members1.resourceProvider == members2.resourceProvider, \\\"RP\\\");\\n require(members1.jobCreator == members2.jobCreator, \\\"JC\\\");\\n require(members1.solver == members2.solver, \\\"Solver\\\");\\n require(members1.mediators.length == members2.mediators.length, \\\"Mediators\\\");\\n for (uint256 i = 0; i < members1.mediators.length; i++) {\\n require(members1.mediators[i] == members2.mediators[i], \\\"Mediator\\\");\\n }\\n }\\n\\n function compareDealTimeout(\\n SharedStructs.DealTimeout memory timeout1,\\n SharedStructs.DealTimeout memory timeout2\\n ) private pure {\\n require(timeout1.timeout == timeout2.timeout, \\\"Timeout\\\");\\n require(timeout1.collateral == timeout2.collateral, \\\"Collateral\\\");\\n }\\n \\n function compareDealTimeouts(\\n SharedStructs.DealTimeouts memory timeouts1,\\n SharedStructs.DealTimeouts memory timeouts2\\n ) private pure {\\n compareDealTimeout(timeouts1.agree, timeouts2.agree);\\n compareDealTimeout(timeouts1.submitResults, timeouts2.submitResults);\\n compareDealTimeout(timeouts1.judgeResults, timeouts2.judgeResults);\\n compareDealTimeout(timeouts1.mediateResults, timeouts2.mediateResults);\\n }\\n\\n function compareDealPricing(\\n SharedStructs.DealPricing memory pricing1,\\n SharedStructs.DealPricing memory pricing2\\n ) private pure {\\n require(pricing1.instructionPrice == pricing2.instructionPrice, \\\"Price\\\");\\n require(pricing1.paymentCollateral == pricing2.paymentCollateral, \\\"Payment\\\");\\n require(pricing1.resultsCollateralMultiple == pricing2.resultsCollateralMultiple, \\\"Results\\\");\\n require(pricing1.mediationFee == pricing2.mediationFee, \\\"Mediation\\\");\\n }\\n\\n function ensureDeal(\\n string memory dealId,\\n SharedStructs.DealMembers memory members,\\n SharedStructs.DealTimeouts memory timeouts,\\n SharedStructs.DealPricing memory pricing\\n ) public onlyController returns (SharedStructs.Deal memory) {\\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \\\"DealNegotiating\\\");\\n checkDealMembers(members);\\n checkTimeouts(timeouts);\\n if(hasDeal(dealId)) {\\n SharedStructs.Deal memory existingDeal = getDeal(dealId);\\n compareDealMembers(existingDeal.members, members);\\n compareDealTimeouts(existingDeal.timeouts, timeouts);\\n compareDealPricing(existingDeal.pricing, pricing);\\n }\\n else {\\n deals[dealId] = SharedStructs.Deal(\\n dealId,\\n members,\\n timeouts,\\n pricing\\n );\\n dealsForParty[members.resourceProvider].push(dealId);\\n dealsForParty[members.jobCreator].push(dealId);\\n }\\n return deals[dealId];\\n }\\n\\n /**\\n * Agreements\\n */\\n \\n function getAgreement(\\n string memory dealId\\n ) public view returns (SharedStructs.Agreement memory) {\\n return agreements[dealId];\\n }\\n\\n function agreeResourceProvider(\\n string memory dealId\\n ) public onlyController returns (SharedStructs.Agreement memory) {\\n require(hasDeal(dealId), \\\"Deal does not exist\\\");\\n require(agreements[dealId].resourceProviderAgreedAt == 0, \\\"RP has already agreed\\\");\\n agreements[dealId].resourceProviderAgreedAt = block.timestamp;\\n _maybeAgreeDeal(dealId);\\n return agreements[dealId];\\n }\\n\\n function agreeJobCreator(\\n string memory dealId\\n ) public onlyController returns (SharedStructs.Agreement memory) {\\n require(hasDeal(dealId), \\\"Deal does not exist\\\");\\n require(agreements[dealId].jobCreatorAgreedAt == 0, \\\"JC has already agreed\\\");\\n agreements[dealId].jobCreatorAgreedAt = block.timestamp;\\n _maybeAgreeDeal(dealId);\\n return agreements[dealId];\\n }\\n\\n /**\\n * Post Results\\n */\\n\\n function getResult(\\n string memory dealId\\n ) public view returns (SharedStructs.Result memory) {\\n return results[dealId];\\n }\\n\\n function addResult(\\n string memory dealId,\\n string memory resultsId,\\n string memory dataId,\\n uint256 instructionCount\\n ) public onlyController returns (SharedStructs.Result memory) {\\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n agreements[dealId].resultsSubmittedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsSubmitted);\\n results[dealId] = SharedStructs.Result(\\n dealId,\\n resultsId,\\n dataId,\\n instructionCount\\n );\\n return results[dealId];\\n }\\n\\n /**\\n * Judge Results\\n */\\n\\n function acceptResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].resultsAcceptedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsAccepted);\\n }\\n\\n function checkResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].resultsCheckedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsChecked);\\n }\\n\\n /**\\n * Mediati:\\n */\\n\\n function mediationAcceptResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].mediationAcceptedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationAccepted);\\n }\\n\\n function mediationRejectResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].mediationRejectedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationRejected);\\n }\\n\\n /**\\n * Timeouts\\n */\\n\\n // called because one party submitted a deal and the other party\\n // did not agree in time\\n function timeoutAgree(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \\\"DealNegotiating\\\");\\n agreements[dealId].timeoutAgreeAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutAgree);\\n }\\n\\n // called because the JC waited too long for a result to be submitted\\n // and wants it's money back\\n function timeoutSubmitResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \\\"DealAgreed\\\");\\n agreements[dealId].timeoutSubmitResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutSubmitResults);\\n }\\n\\n // called because the RP waited too long for a judgement of it's results\\n // and wants it's money back\\n function timeoutJudgeResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \\\"ResultsSubmitted\\\");\\n agreements[dealId].timeoutJudgeResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutJudgeResults);\\n }\\n // called because the RP or JC waited too long for a mediation of it's results\\n // and both want their money back\\n function timeoutMediateResult(\\n string memory dealId\\n ) public onlyController {\\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \\\"ResultsChecked\\\");\\n agreements[dealId].timeoutMediateResultsAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutMediateResults);\\n }\\n\\n /**\\n * Costings\\n */\\n\\n function getJobCost(\\n string memory dealId\\n ) public view returns (uint256) {\\n return deals[dealId].pricing.instructionPrice * results[dealId].instructionCount;\\n }\\n\\n function getResultsCollateral(\\nstring memory dealId\\n ) public view returns (uint256) {\\n return deals[dealId].pricing.resultsCollateralMultiple * getJobCost(dealId);\\n }\\n\\n /**\\n * Checkers\\n */\\n\\n function hasDeal(\\n string memory dealId\\n ) public view returns (bool) {\\n return bytes(getDeal(dealId).dealId).length > 0;\\n }\\n\\n function isState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) public view returns (bool) {\\n // if we don't have a deal, we should check against DealNegotiating\\n // as this is the default state - otherwise it's impossible to check\\n // for isState('DealNegotiating')\\n if(!hasDeal(dealId)) {\\n return state == SharedStructs.AgreementState.DealNegotiating;\\n }\\n return agreements[dealId].state == state;\\n }\\n\\n /**\\n * Utils\\n */\\n\\n function _maybeAgreeDeal(\\n string memory dealId\\n ) private {\\n if(agreements[dealId].resourceProviderAgreedAt != 0 && agreements[dealId].jobCreatorAgreedAt != 0) {\\n agreements[dealId].dealAgreedAt = block.timestamp;\\n _changeAgreementState(dealId, SharedStructs.AgreementState.DealAgreed);\\n } else {\\n // this is used so we can know if a party can call an agree timeout trigger\\n agreements[dealId].dealCreatedAt = block.timestamp;\\n }\\n }\\n\\n function _changeAgreementState(\\n string memory dealId,\\n SharedStructs.AgreementState state\\n ) private {\\n agreements[dealId].state = state;\\n emit DealStateChange(dealId, state);\\n }\\n}\\n\",\"keccak256\":\"0x6c248c5abb18f2505d293f9b7bb962d75c234611a1fb3c9ac00b49344082c445\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055506001600260146101000a81548160ff02191690831515021790555034801562000045575f80fd5b50620000666200005a6200006c60201b60201c565b6200007360201b60201c565b62000134565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61500380620001425f395ff3fe608060405234801561000f575f80fd5b50600436106101a7575f3560e01c80638224ce5f116100f7578063cdd82d1d11610095578063e850be371161006f578063e850be37146104d9578063ec95b967146104f5578063f2fde38b14610525578063f3d3d44814610541576101a7565b8063cdd82d1d1461045d578063e70791801461048d578063e7b957d1146104bd576101a7565b8063a4702958116100d1578063a4702958146103d5578063a6370b0e146103df578063b050e74b1461040f578063c57380a21461043f576101a7565b80638224ce5f1461036b578063824518aa1461039b5780638da5cb5b146103b7576101a7565b8063498cc70d1161016457806373db5c6a1161013e57806373db5c6a146102f9578063795f9abf1461032957806380ffdfe0146103455780638129fc1c14610361576101a7565b8063498cc70d146102a3578063511a9f68146102d3578063715018a6146102ef576101a7565b806311d5af33146101ab5780632244ad2b146101db578063297f9e551461020b5780633955548e146102275780633c4135da1461025757806346834d1e14610287575b5f80fd5b6101c560048036038101906101c091906130bc565b61055d565b6040516101d2919061322c565b60405180910390f35b6101f560048036038101906101f09190613378565b61066e565b60405161020291906133d9565b60405180910390f35b61022560048036038101906102209190613378565b610685565b005b610241600480360381019061023c9190613425565b61070c565b60405161024e919061355a565b60405180910390f35b610271600480360381019061026c9190613378565b610a10565b60405161027e919061370b565b60405180910390f35b6102a1600480360381019061029c9190613378565b610be7565b005b6102bd60048036038101906102b89190613378565b610c6e565b6040516102ca919061355a565b60405180910390f35b6102ed60048036038101906102e89190613378565b610e5f565b005b6102f7610ee6565b005b610313600480360381019061030e9190613378565b610ef9565b6040516103209190613734565b60405180910390f35b610343600480360381019061033e9190613378565b610f51565b005b61035f600480360381019061035a9190613378565b610fd7565b005b61036961105e565b005b61038560048036038101906103809190613378565b611195565b6040516103929190613734565b60405180910390f35b6103b560048036038101906103b09190613378565b6111d5565b005b6103bf61125c565b6040516103cc919061375c565b60405180910390f35b6103dd611283565b005b6103f960048036038101906103f49190613a0a565b6112a7565b6040516104069190613cfc565b60405180910390f35b61042960048036038101906104249190613d3f565b611985565b60405161043691906133d9565b60405180910390f35b610447611a1d565b604051610454919061375c565b60405180910390f35b61047760048036038101906104729190613378565b611a45565b604051610484919061370b565b60405180910390f35b6104a760048036038101906104a29190613378565b611b39565b6040516104b49190613cfc565b60405180910390f35b6104d760048036038101906104d29190613378565b611e87565b005b6104f360048036038101906104ee9190613378565b611f0e565b005b61050f600480360381019061050a9190613378565b611f95565b60405161051c919061370b565b60405180910390f35b61053f600480360381019061053a91906130bc565b61216c565b005b61055b600480360381019061055691906130bc565b6121ee565b005b606060045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610663578382905f5260205f200180546105d890613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461060490613dc6565b801561064f5780601f106106265761010080835404028352916020019161064f565b820191905f5260205f20905b81548152906001019060200180831161063257829003601f168201915b5050505050815260200190600101906105bb565b505050509050919050565b5f8061067983611b39565b5f015151119050919050565b61068d6122f6565b50610699816002611985565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90613e50565b60405180910390fd5b426005826040516106e99190613ea8565b908152602001604051809103902060060181905550610709816003612423565b50565b610714612df8565b61071c6122f6565b50610728856001611985565b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075e90613f08565b60405180910390fd5b426005866040516107789190613ea8565b908152602001604051809103902060050181905550610798856002612423565b6040518060800160405280868152602001858152602001848152602001838152506006866040516107c99190613ea8565b90815260200160405180910390205f820151815f0190816107ea91906140c3565b50602082015181600101908161080091906140c3565b50604082015181600201908161081691906140c3565b50606082015181600301559050506006856040516108349190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461085c90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461088890613dc6565b80156108d35780601f106108aa576101008083540402835291602001916108d3565b820191905f5260205f20905b8154815290600101906020018083116108b657829003601f168201915b505050505081526020016001820180546108ec90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461091890613dc6565b80156109635780601f1061093a57610100808354040283529160200191610963565b820191905f5260205f20905b81548152906001019060200180831161094657829003601f168201915b5050505050815260200160028201805461097c90613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a890613dc6565b80156109f35780601f106109ca576101008083540402835291602001916109f3565b820191905f5260205f20905b8154815290600101906020018083116109d657829003601f168201915b505050505081526020016003820154815250509050949350505050565b610a18612e1f565b610a206122f6565b50610a2a8261066e565b610a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a60906141dc565b60405180910390fd5b5f600583604051610a7a9190613ea8565b90815260200160405180910390206002015414610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390614244565b60405180910390fd5b42600583604051610add9190613ea8565b908152602001604051809103902060020181905550610afb826124a7565b600582604051610b0b9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115610b4857610b4761357a565b5b600a811115610b5a57610b5961357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b610bef6122f6565b50610bfb816002611985565b610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190613e50565b60405180910390fd5b42600582604051610c4b9190613ea8565b908152602001604051809103902060070181905550610c6b816004612423565b50565b610c76612df8565b600682604051610c869190613ea8565b90815260200160405180910390206040518060800160405290815f82018054610cae90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613dc6565b8015610d255780601f10610cfc57610100808354040283529160200191610d25565b820191905f5260205f20905b815481529060010190602001808311610d0857829003601f168201915b50505050508152602001600182018054610d3e90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6a90613dc6565b8015610db55780601f10610d8c57610100808354040283529160200191610db5565b820191905f5260205f20905b815481529060010190602001808311610d9857829003601f168201915b50505050508152602001600282018054610dce90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90613dc6565b8015610e455780601f10610e1c57610100808354040283529160200191610e45565b820191905f5260205f20905b815481529060010190602001808311610e2857829003601f168201915b505050505081526020016003820154815250509050919050565b610e676122f6565b50610e73816001611985565b610eb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea990613f08565b60405180910390fd5b42600582604051610ec39190613ea8565b9081526020016040518091039020600b0181905550610ee3816008612423565b50565b610eee61255e565b610ef75f6125dc565b565b5f600682604051610f0a9190613ea8565b908152602001604051809103902060030154600383604051610f2c9190613ea8565b9081526020016040518091039020600d015f0154610f4a919061428f565b9050919050565b610f596122f6565b50610f64815f611985565b610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a9061431a565b60405180910390fd5b42600582604051610fb49190613ea8565b9081526020016040518091039020600a0181905550610fd4816007612423565b50565b610fdf6122f6565b50610feb816004611985565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102190614382565b60405180910390fd5b4260058260405161103b9190613ea8565b90815260200160405180910390206009018190555061105b816006612423565b50565b5f600160169054906101000a900460ff16159050808015611090575060018060159054906101000a900460ff1660ff16105b806110be575061109f3061269d565b1580156110bd575060018060159054906101000a900460ff1660ff16145b5b6110fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f490614410565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156111395760018060166101000a81548160ff0219169083151502179055505b8015611192575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516111899190614473565b60405180910390a15b50565b5f61119f82610ef9565b6003836040516111af9190613ea8565b9081526020016040518091039020600d01600201546111ce919061428f565b9050919050565b6111dd6122f6565b506111e9816004611985565b611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f90614382565b60405180910390fd5b426005826040516112399190613ea8565b908152602001604051809103902060080181905550611259816005612423565b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61128b61255e565b5f600160146101000a81548160ff021916908315150217905550565b6112af612e92565b6112b76122f6565b506112c2855f611985565b611301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89061431a565b60405180910390fd5b61130a846126bf565b611313836128d4565b61131c8561066e565b1561135d575f61132b86611b39565b905061133b81602001518661296a565b611349816040015185612be7565b611357816060015184612c31565b5061163c565b60405180608001604052808681526020018581526020018481526020018381525060038660405161138e9190613ea8565b90815260200160405180910390205f820151815f0190816113af91906140c3565b506020820151816001015f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030190805190602001906114a5929190612ecc565b5050506040820151816005015f820151815f015f820151815f01556020820151816001015550506020820151816002015f820151815f01556020820151816001015550506040820151816004015f820151815f01556020820151816001015550506060820151816006015f820151815f01556020820151816001015550505050606082015181600d015f820151815f0155602082015181600101556040820151816002015560608201518160030155505090505060045f856040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f9091909190915090816115c991906140c3565b5060045f856020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f90919091909150908161163a91906140c3565b505b60038560405161164c9190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461167490613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546116a090613dc6565b80156116eb5780601f106116c2576101008083540402835291602001916116eb565b820191905f5260205f20905b8154815290600101906020018083116116ce57829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561188457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161183b575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050949350505050565b5f61198f8361066e565b6119c1575f600a8111156119a6576119a561357a565b5b82600a8111156119b9576119b861357a565b5b149050611a17565b81600a8111156119d4576119d361357a565b5b6005846040516119e49190613ea8565b90815260200160405180910390205f015f9054906101000a900460ff16600a811115611a1357611a1261357a565b5b1490505b92915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611a4d612e1f565b600582604051611a5d9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115611a9a57611a9961357a565b5b600a811115611aac57611aab61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b611b41612e92565b600382604051611b519190613ea8565b90815260200160405180910390206040518060800160405290815f82018054611b7990613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ba590613dc6565b8015611bf05780601f10611bc757610100808354040283529160200191611bf0565b820191905f5260205f20905b815481529060010190602001808311611bd357829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201805480602002602001604051908101604052809291908181526020018280548015611d8957602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611d40575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050919050565b611e8f6122f6565b50611e9b816004611985565b611eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed190614382565b60405180910390fd5b42600582604051611eeb9190613ea8565b9081526020016040518091039020600d0181905550611f0b81600a612423565b50565b611f166122f6565b50611f22816002611985565b611f61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5890613e50565b60405180910390fd5b42600582604051611f729190613ea8565b9081526020016040518091039020600c0181905550611f92816009612423565b50565b611f9d612e1f565b611fa56122f6565b50611faf8261066e565b611fee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe5906141dc565b60405180910390fd5b5f600583604051611fff9190613ea8565b90815260200160405180910390206001015414612051576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612048906144d6565b60405180910390fd5b426005836040516120629190613ea8565b908152602001604051809103902060010181905550612080826124a7565b6005826040516120909190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a8111156120cd576120cc61357a565b5b600a8111156120df576120de61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b61217461255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d990614564565b60405180910390fd5b6121eb816125dc565b50565b6121f661255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225b906145f2565b60405180910390fd5b600160149054906101000a900460ff166122b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122aa90614680565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237d906145f2565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123c6612d5b565b73ffffffffffffffffffffffffffffffffffffffff161461241c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124139061470e565b60405180910390fd5b6001905090565b806005836040516124349190613ea8565b90815260200160405180910390205f015f6101000a81548160ff0219169083600a8111156124655761246461357a565b5b02179055507f10ca3d89184491f5d8de422bd36534abe6eb4b4aa1429a261bdb5ff1dd9ac386828260405161249b929190614773565b60405180910390a15050565b5f6005826040516124b89190613ea8565b908152602001604051809103902060010154141580156124f957505f6005826040516124e49190613ea8565b90815260200160405180910390206002015414155b15612534574260058260405161250f9190613ea8565b90815260200160405180910390206004018190555061252f816001612423565b61255b565b426005826040516125459190613ea8565b9081526020016040518091039020600301819055505b50565b612566612d5b565b73ffffffffffffffffffffffffffffffffffffffff1661258461125c565b73ffffffffffffffffffffffffffffffffffffffff16146125da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d1906147eb565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1603612731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161272890614853565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16036127a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279a906148bb565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603612814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280b90614923565b60405180910390fd5b5f8160600151511161285b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128529061498b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16036128d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c8906149f3565b60405180910390fd5b50565b5f815f0151602001511461291d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291490614a5b565b60405180910390fd5b5f81606001516020015114612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295e90614ac3565b60405180910390fd5b50565b806040015173ffffffffffffffffffffffffffffffffffffffff16826040015173ffffffffffffffffffffffffffffffffffffffff16146129e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d790614b2b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614612a56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4d90614b93565b60405180910390fd5b805f015173ffffffffffffffffffffffffffffffffffffffff16825f015173ffffffffffffffffffffffffffffffffffffffff1614612aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac190614bfb565b60405180910390fd5b80606001515182606001515114612b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0d90614c63565b60405180910390fd5b5f5b826060015151811015612be25781606001518181518110612b3c57612b3b614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1683606001518281518110612b7157612b70614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc690614cf8565b60405180910390fd5b8080612bda90614d16565b915050612b18565b505050565b612bf7825f0151825f0151612d62565b612c0982602001518260200151612d62565b612c1b82604001518260400151612d62565b612c2d82606001518260600151612d62565b5050565b805f0151825f015114612c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7090614da7565b60405180910390fd5b8060200151826020015114612cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cba90614e0f565b60405180910390fd5b8060400151826040015114612d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d0490614e77565b60405180910390fd5b8060600151826060015114612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e90614edf565b60405180910390fd5b5050565b5f33905090565b805f0151825f015114612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190614f47565b60405180910390fd5b8060200151826020015114612df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612deb90614faf565b60405180910390fd5b5050565b60405180608001604052806060815260200160608152602001606081526020015f81525090565b604051806101c001604052805f600a811115612e3e57612e3d61357a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b604051806080016040528060608152602001612eac612f53565b8152602001612eb9612fba565b8152602001612ec6612ffa565b81525090565b828054828255905f5260205f20908101928215612f42579160200282015b82811115612f41578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190612eea565b5b509050612f4f919061301e565b5090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6040518060800160405280612fcd613039565b8152602001612fda613039565b8152602001612fe7613039565b8152602001612ff4613039565b81525090565b60405180608001604052805f81526020015f81526020015f81526020015f81525090565b5b80821115613035575f815f90555060010161301f565b5090565b60405180604001604052805f81526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61308b82613062565b9050919050565b61309b81613081565b81146130a5575f80fd5b50565b5f813590506130b681613092565b92915050565b5f602082840312156130d1576130d061305a565b5b5f6130de848285016130a8565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561314757808201518184015260208101905061312c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61316c82613110565b613176818561311a565b935061318681856020860161312a565b61318f81613152565b840191505092915050565b5f6131a58383613162565b905092915050565b5f602082019050919050565b5f6131c3826130e7565b6131cd81856130f1565b9350836020820285016131df85613101565b805f5b8581101561321a57848403895281516131fb858261319a565b9450613206836131ad565b925060208a019950506001810190506131e2565b50829750879550505050505092915050565b5f6020820190508181035f83015261324481846131b9565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61328a82613152565b810181811067ffffffffffffffff821117156132a9576132a8613254565b5b80604052505050565b5f6132bb613051565b90506132c78282613281565b919050565b5f67ffffffffffffffff8211156132e6576132e5613254565b5b6132ef82613152565b9050602081019050919050565b828183375f83830152505050565b5f61331c613317846132cc565b6132b2565b90508281526020810184848401111561333857613337613250565b5b6133438482856132fc565b509392505050565b5f82601f83011261335f5761335e61324c565b5b813561336f84826020860161330a565b91505092915050565b5f6020828403121561338d5761338c61305a565b5b5f82013567ffffffffffffffff8111156133aa576133a961305e565b5b6133b68482850161334b565b91505092915050565b5f8115159050919050565b6133d3816133bf565b82525050565b5f6020820190506133ec5f8301846133ca565b92915050565b5f819050919050565b613404816133f2565b811461340e575f80fd5b50565b5f8135905061341f816133fb565b92915050565b5f805f806080858703121561343d5761343c61305a565b5b5f85013567ffffffffffffffff81111561345a5761345961305e565b5b6134668782880161334b565b945050602085013567ffffffffffffffff8111156134875761348661305e565b5b6134938782880161334b565b935050604085013567ffffffffffffffff8111156134b4576134b361305e565b5b6134c08782880161334b565b92505060606134d187828801613411565b91505092959194509250565b6134e6816133f2565b82525050565b5f608083015f8301518482035f8601526135068282613162565b915050602083015184820360208601526135208282613162565b9150506040830151848203604086015261353a8282613162565b915050606083015161354f60608601826134dd565b508091505092915050565b5f6020820190508181035f83015261357281846134ec565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b81106135b8576135b761357a565b5b50565b5f8190506135c8826135a7565b919050565b5f6135d7826135bb565b9050919050565b6135e7816135cd565b82525050565b6101c082015f8201516136025f8501826135de565b50602082015161361560208501826134dd565b50604082015161362860408501826134dd565b50606082015161363b60608501826134dd565b50608082015161364e60808501826134dd565b5060a082015161366160a08501826134dd565b5060c082015161367460c08501826134dd565b5060e082015161368760e08501826134dd565b5061010082015161369c6101008501826134dd565b506101208201516136b16101208501826134dd565b506101408201516136c66101408501826134dd565b506101608201516136db6101608501826134dd565b506101808201516136f06101808501826134dd565b506101a08201516137056101a08501826134dd565b50505050565b5f6101c08201905061371f5f8301846135ed565b92915050565b61372e816133f2565b82525050565b5f6020820190506137475f830184613725565b92915050565b61375681613081565b82525050565b5f60208201905061376f5f83018461374d565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561379757613796613254565b5b602082029050602081019050919050565b5f80fd5b5f6137be6137b98461377d565b6132b2565b905080838252602082019050602084028301858111156137e1576137e06137a8565b5b835b8181101561380a57806137f688826130a8565b8452602084019350506020810190506137e3565b5050509392505050565b5f82601f8301126138285761382761324c565b5b81356138388482602086016137ac565b91505092915050565b5f6080828403121561385657613855613775565b5b61386060806132b2565b90505f61386f848285016130a8565b5f830152506020613882848285016130a8565b6020830152506040613896848285016130a8565b604083015250606082013567ffffffffffffffff8111156138ba576138b9613779565b5b6138c684828501613814565b60608301525092915050565b5f604082840312156138e7576138e6613775565b5b6138f160406132b2565b90505f61390084828501613411565b5f83015250602061391384828501613411565b60208301525092915050565b5f610100828403121561393557613934613775565b5b61393f60806132b2565b90505f61394e848285016138d2565b5f830152506040613961848285016138d2565b6020830152506080613975848285016138d2565b60408301525060c0613989848285016138d2565b60608301525092915050565b5f608082840312156139aa576139a9613775565b5b6139b460806132b2565b90505f6139c384828501613411565b5f8301525060206139d684828501613411565b60208301525060406139ea84828501613411565b60408301525060606139fe84828501613411565b60608301525092915050565b5f805f806101c08587031215613a2357613a2261305a565b5b5f85013567ffffffffffffffff811115613a4057613a3f61305e565b5b613a4c8782880161334b565b945050602085013567ffffffffffffffff811115613a6d57613a6c61305e565b5b613a7987828801613841565b9350506040613a8a8782880161391f565b925050610140613a9c87828801613995565b91505092959194509250565b613ab181613081565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f613aeb8383613aa8565b60208301905092915050565b5f602082019050919050565b5f613b0d82613ab7565b613b178185613ac1565b9350613b2283613ad1565b805f5b83811015613b52578151613b398882613ae0565b9750613b4483613af7565b925050600181019050613b25565b5085935050505092915050565b5f608083015f830151613b745f860182613aa8565b506020830151613b876020860182613aa8565b506040830151613b9a6040860182613aa8565b5060608301518482036060860152613bb28282613b03565b9150508091505092915050565b604082015f820151613bd35f8501826134dd565b506020820151613be660208501826134dd565b50505050565b61010082015f820151613c015f850182613bbf565b506020820151613c146040850182613bbf565b506040820151613c276080850182613bbf565b506060820151613c3a60c0850182613bbf565b50505050565b608082015f820151613c545f8501826134dd565b506020820151613c6760208501826134dd565b506040820151613c7a60408501826134dd565b506060820151613c8d60608501826134dd565b50505050565b5f6101c083015f8301518482035f860152613cae8282613162565b91505060208301518482036020860152613cc88282613b5f565b9150506040830151613cdd6040860182613bec565b506060830151613cf1610140860182613c40565b508091505092915050565b5f6020820190508181035f830152613d148184613c93565b905092915050565b600b8110613d28575f80fd5b50565b5f81359050613d3981613d1c565b92915050565b5f8060408385031215613d5557613d5461305a565b5b5f83013567ffffffffffffffff811115613d7257613d7161305e565b5b613d7e8582860161334b565b9250506020613d8f85828601613d2b565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680613ddd57607f821691505b602082108103613df057613def613d99565b5b50919050565b5f82825260208201905092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f613e3a601083613df6565b9150613e4582613e06565b602082019050919050565b5f6020820190508181035f830152613e6781613e2e565b9050919050565b5f81905092915050565b5f613e8282613110565b613e8c8185613e6e565b9350613e9c81856020860161312a565b80840191505092915050565b5f613eb38284613e78565b915081905092915050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f613ef2600a83613df6565b9150613efd82613ebe565b602082019050919050565b5f6020820190508181035f830152613f1f81613ee6565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302613f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613f47565b613f8c8683613f47565b95508019841693508086168417925050509392505050565b5f819050919050565b5f613fc7613fc2613fbd846133f2565b613fa4565b6133f2565b9050919050565b5f819050919050565b613fe083613fad565b613ff4613fec82613fce565b848454613f53565b825550505050565b5f90565b614008613ffc565b614013818484613fd7565b505050565b5b818110156140365761402b5f82614000565b600181019050614019565b5050565b601f82111561407b5761404c81613f26565b61405584613f38565b81016020851015614064578190505b61407861407085613f38565b830182614018565b50505b505050565b5f82821c905092915050565b5f61409b5f1984600802614080565b1980831691505092915050565b5f6140b3838361408c565b9150826002028217905092915050565b6140cc82613110565b67ffffffffffffffff8111156140e5576140e4613254565b5b6140ef8254613dc6565b6140fa82828561403a565b5f60209050601f83116001811461412b575f8415614119578287015190505b61412385826140a8565b86555061418a565b601f19841661413986613f26565b5f5b828110156141605784890151825560018201915060208501945060208101905061413b565b8683101561417d5784890151614179601f89168261408c565b8355505b6001600288020188555050505b505050505050565b7f4465616c20646f6573206e6f74206578697374000000000000000000000000005f82015250565b5f6141c6601383613df6565b91506141d182614192565b602082019050919050565b5f6020820190508181035f8301526141f3816141ba565b9050919050565b7f4a432068617320616c72656164792061677265656400000000000000000000005f82015250565b5f61422e601583613df6565b9150614239826141fa565b602082019050919050565b5f6020820190508181035f83015261425b81614222565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614299826133f2565b91506142a4836133f2565b92508282026142b2816133f2565b915082820484148315176142c9576142c8614262565b5b5092915050565b7f4465616c4e65676f74696174696e6700000000000000000000000000000000005f82015250565b5f614304600f83613df6565b915061430f826142d0565b602082019050919050565b5f6020820190508181035f830152614331816142f8565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61436c600e83613df6565b915061437782614338565b602082019050919050565b5f6020820190508181035f83015261439981614360565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6143fa602e83613df6565b9150614405826143a0565b604082019050919050565b5f6020820190508181035f830152614427816143ee565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f61445d6144586144538461442e565b613fa4565b614437565b9050919050565b61446d81614443565b82525050565b5f6020820190506144865f830184614464565b92915050565b7f52502068617320616c72656164792061677265656400000000000000000000005f82015250565b5f6144c0601583613df6565b91506144cb8261448c565b602082019050919050565b5f6020820190508181035f8301526144ed816144b4565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61454e602683613df6565b9150614559826144f4565b604082019050919050565b5f6020820190508181035f83015261457b81614542565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f6145dc603583613df6565b91506145e782614582565b604082019050919050565b5f6020820190508181035f830152614609816145d0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61466a603983613df6565b915061467582614610565b604082019050919050565b5f6020820190508181035f8301526146978161465e565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6146f8603b83613df6565b91506147038261469e565b604082019050919050565b5f6020820190508181035f830152614725816146ec565b9050919050565b5f61473682613110565b6147408185613df6565b935061475081856020860161312a565b61475981613152565b840191505092915050565b61476d816135cd565b82525050565b5f6040820190508181035f83015261478b818561472c565b905061479a6020830184614764565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6147d5602083613df6565b91506147e0826147a1565b602082019050919050565b5f6020820190508181035f830152614802816147c9565b9050919050565b7f5250206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f61483d600a83613df6565b915061484882614809565b602082019050919050565b5f6020820190508181035f83015261486a81614831565b9050919050565b7f4a43206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f6148a5600a83613df6565b91506148b082614871565b602082019050919050565b5f6020820190508181035f8301526148d281614899565b9050919050565b7f536f6c766572206d697373696e670000000000000000000000000000000000005f82015250565b5f61490d600e83613df6565b9150614918826148d9565b602082019050919050565b5f6020820190508181035f83015261493a81614901565b9050919050565b7f4d65646961746f7273203c3d20300000000000000000000000000000000000005f82015250565b5f614975600e83613df6565b915061498082614941565b602082019050919050565b5f6020820190508181035f8301526149a281614969565b9050919050565b7f5250202f204a432073616d6500000000000000000000000000000000000000005f82015250565b5f6149dd600c83613df6565b91506149e8826149a9565b602082019050919050565b5f6020820190508181035f830152614a0a816149d1565b9050919050565b7f4167726565206465706f736974206d75737420626520300000000000000000005f82015250565b5f614a45601783613df6565b9150614a5082614a11565b602082019050919050565b5f6020820190508181035f830152614a7281614a39565b9050919050565b7f4d656469617465206465706f736974206d7573742062652030000000000000005f82015250565b5f614aad601983613df6565b9150614ab882614a79565b602082019050919050565b5f6020820190508181035f830152614ada81614aa1565b9050919050565b7f52500000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b15600283613df6565b9150614b2082614ae1565b602082019050919050565b5f6020820190508181035f830152614b4281614b09565b9050919050565b7f4a430000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b7d600283613df6565b9150614b8882614b49565b602082019050919050565b5f6020820190508181035f830152614baa81614b71565b9050919050565b7f536f6c76657200000000000000000000000000000000000000000000000000005f82015250565b5f614be5600683613df6565b9150614bf082614bb1565b602082019050919050565b5f6020820190508181035f830152614c1281614bd9565b9050919050565b7f4d65646961746f727300000000000000000000000000000000000000000000005f82015250565b5f614c4d600983613df6565b9150614c5882614c19565b602082019050919050565b5f6020820190508181035f830152614c7a81614c41565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d65646961746f720000000000000000000000000000000000000000000000005f82015250565b5f614ce2600883613df6565b9150614ced82614cae565b602082019050919050565b5f6020820190508181035f830152614d0f81614cd6565b9050919050565b5f614d20826133f2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614d5257614d51614262565b5b600182019050919050565b7f50726963650000000000000000000000000000000000000000000000000000005f82015250565b5f614d91600583613df6565b9150614d9c82614d5d565b602082019050919050565b5f6020820190508181035f830152614dbe81614d85565b9050919050565b7f5061796d656e74000000000000000000000000000000000000000000000000005f82015250565b5f614df9600783613df6565b9150614e0482614dc5565b602082019050919050565b5f6020820190508181035f830152614e2681614ded565b9050919050565b7f526573756c7473000000000000000000000000000000000000000000000000005f82015250565b5f614e61600783613df6565b9150614e6c82614e2d565b602082019050919050565b5f6020820190508181035f830152614e8e81614e55565b9050919050565b7f4d6564696174696f6e00000000000000000000000000000000000000000000005f82015250565b5f614ec9600983613df6565b9150614ed482614e95565b602082019050919050565b5f6020820190508181035f830152614ef681614ebd565b9050919050565b7f54696d656f7574000000000000000000000000000000000000000000000000005f82015250565b5f614f31600783613df6565b9150614f3c82614efd565b602082019050919050565b5f6020820190508181035f830152614f5e81614f25565b9050919050565b7f436f6c6c61746572616c000000000000000000000000000000000000000000005f82015250565b5f614f99600a83613df6565b9150614fa482614f65565b602082019050919050565b5f6020820190508181035f830152614fc681614f8d565b905091905056fea26469706673582212208a4ece8015b739b867606d7c639d41d2e97c699769bc0be4f3dd82bd24a8824664736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106101a7575f3560e01c80638224ce5f116100f7578063cdd82d1d11610095578063e850be371161006f578063e850be37146104d9578063ec95b967146104f5578063f2fde38b14610525578063f3d3d44814610541576101a7565b8063cdd82d1d1461045d578063e70791801461048d578063e7b957d1146104bd576101a7565b8063a4702958116100d1578063a4702958146103d5578063a6370b0e146103df578063b050e74b1461040f578063c57380a21461043f576101a7565b80638224ce5f1461036b578063824518aa1461039b5780638da5cb5b146103b7576101a7565b8063498cc70d1161016457806373db5c6a1161013e57806373db5c6a146102f9578063795f9abf1461032957806380ffdfe0146103455780638129fc1c14610361576101a7565b8063498cc70d146102a3578063511a9f68146102d3578063715018a6146102ef576101a7565b806311d5af33146101ab5780632244ad2b146101db578063297f9e551461020b5780633955548e146102275780633c4135da1461025757806346834d1e14610287575b5f80fd5b6101c560048036038101906101c091906130bc565b61055d565b6040516101d2919061322c565b60405180910390f35b6101f560048036038101906101f09190613378565b61066e565b60405161020291906133d9565b60405180910390f35b61022560048036038101906102209190613378565b610685565b005b610241600480360381019061023c9190613425565b61070c565b60405161024e919061355a565b60405180910390f35b610271600480360381019061026c9190613378565b610a10565b60405161027e919061370b565b60405180910390f35b6102a1600480360381019061029c9190613378565b610be7565b005b6102bd60048036038101906102b89190613378565b610c6e565b6040516102ca919061355a565b60405180910390f35b6102ed60048036038101906102e89190613378565b610e5f565b005b6102f7610ee6565b005b610313600480360381019061030e9190613378565b610ef9565b6040516103209190613734565b60405180910390f35b610343600480360381019061033e9190613378565b610f51565b005b61035f600480360381019061035a9190613378565b610fd7565b005b61036961105e565b005b61038560048036038101906103809190613378565b611195565b6040516103929190613734565b60405180910390f35b6103b560048036038101906103b09190613378565b6111d5565b005b6103bf61125c565b6040516103cc919061375c565b60405180910390f35b6103dd611283565b005b6103f960048036038101906103f49190613a0a565b6112a7565b6040516104069190613cfc565b60405180910390f35b61042960048036038101906104249190613d3f565b611985565b60405161043691906133d9565b60405180910390f35b610447611a1d565b604051610454919061375c565b60405180910390f35b61047760048036038101906104729190613378565b611a45565b604051610484919061370b565b60405180910390f35b6104a760048036038101906104a29190613378565b611b39565b6040516104b49190613cfc565b60405180910390f35b6104d760048036038101906104d29190613378565b611e87565b005b6104f360048036038101906104ee9190613378565b611f0e565b005b61050f600480360381019061050a9190613378565b611f95565b60405161051c919061370b565b60405180910390f35b61053f600480360381019061053a91906130bc565b61216c565b005b61055b600480360381019061055691906130bc565b6121ee565b005b606060045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610663578382905f5260205f200180546105d890613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461060490613dc6565b801561064f5780601f106106265761010080835404028352916020019161064f565b820191905f5260205f20905b81548152906001019060200180831161063257829003601f168201915b5050505050815260200190600101906105bb565b505050509050919050565b5f8061067983611b39565b5f015151119050919050565b61068d6122f6565b50610699816002611985565b6106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106cf90613e50565b60405180910390fd5b426005826040516106e99190613ea8565b908152602001604051809103902060060181905550610709816003612423565b50565b610714612df8565b61071c6122f6565b50610728856001611985565b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075e90613f08565b60405180910390fd5b426005866040516107789190613ea8565b908152602001604051809103902060050181905550610798856002612423565b6040518060800160405280868152602001858152602001848152602001838152506006866040516107c99190613ea8565b90815260200160405180910390205f820151815f0190816107ea91906140c3565b50602082015181600101908161080091906140c3565b50604082015181600201908161081691906140c3565b50606082015181600301559050506006856040516108349190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461085c90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461088890613dc6565b80156108d35780601f106108aa576101008083540402835291602001916108d3565b820191905f5260205f20905b8154815290600101906020018083116108b657829003601f168201915b505050505081526020016001820180546108ec90613dc6565b80601f016020809104026020016040519081016040528092919081815260200182805461091890613dc6565b80156109635780601f1061093a57610100808354040283529160200191610963565b820191905f5260205f20905b81548152906001019060200180831161094657829003601f168201915b5050505050815260200160028201805461097c90613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a890613dc6565b80156109f35780601f106109ca576101008083540402835291602001916109f3565b820191905f5260205f20905b8154815290600101906020018083116109d657829003601f168201915b505050505081526020016003820154815250509050949350505050565b610a18612e1f565b610a206122f6565b50610a2a8261066e565b610a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a60906141dc565b60405180910390fd5b5f600583604051610a7a9190613ea8565b90815260200160405180910390206002015414610acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac390614244565b60405180910390fd5b42600583604051610add9190613ea8565b908152602001604051809103902060020181905550610afb826124a7565b600582604051610b0b9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115610b4857610b4761357a565b5b600a811115610b5a57610b5961357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b610bef6122f6565b50610bfb816002611985565b610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190613e50565b60405180910390fd5b42600582604051610c4b9190613ea8565b908152602001604051809103902060070181905550610c6b816004612423565b50565b610c76612df8565b600682604051610c869190613ea8565b90815260200160405180910390206040518060800160405290815f82018054610cae90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613dc6565b8015610d255780601f10610cfc57610100808354040283529160200191610d25565b820191905f5260205f20905b815481529060010190602001808311610d0857829003601f168201915b50505050508152602001600182018054610d3e90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6a90613dc6565b8015610db55780601f10610d8c57610100808354040283529160200191610db5565b820191905f5260205f20905b815481529060010190602001808311610d9857829003601f168201915b50505050508152602001600282018054610dce90613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90613dc6565b8015610e455780601f10610e1c57610100808354040283529160200191610e45565b820191905f5260205f20905b815481529060010190602001808311610e2857829003601f168201915b505050505081526020016003820154815250509050919050565b610e676122f6565b50610e73816001611985565b610eb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea990613f08565b60405180910390fd5b42600582604051610ec39190613ea8565b9081526020016040518091039020600b0181905550610ee3816008612423565b50565b610eee61255e565b610ef75f6125dc565b565b5f600682604051610f0a9190613ea8565b908152602001604051809103902060030154600383604051610f2c9190613ea8565b9081526020016040518091039020600d015f0154610f4a919061428f565b9050919050565b610f596122f6565b50610f64815f611985565b610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a9061431a565b60405180910390fd5b42600582604051610fb49190613ea8565b9081526020016040518091039020600a0181905550610fd4816007612423565b50565b610fdf6122f6565b50610feb816004611985565b61102a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102190614382565b60405180910390fd5b4260058260405161103b9190613ea8565b90815260200160405180910390206009018190555061105b816006612423565b50565b5f600160169054906101000a900460ff16159050808015611090575060018060159054906101000a900460ff1660ff16105b806110be575061109f3061269d565b1580156110bd575060018060159054906101000a900460ff1660ff16145b5b6110fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f490614410565b60405180910390fd5b60018060156101000a81548160ff021916908360ff16021790555080156111395760018060166101000a81548160ff0219169083151502179055505b8015611192575f600160166101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516111899190614473565b60405180910390a15b50565b5f61119f82610ef9565b6003836040516111af9190613ea8565b9081526020016040518091039020600d01600201546111ce919061428f565b9050919050565b6111dd6122f6565b506111e9816004611985565b611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f90614382565b60405180910390fd5b426005826040516112399190613ea8565b908152602001604051809103902060080181905550611259816005612423565b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61128b61255e565b5f600160146101000a81548160ff021916908315150217905550565b6112af612e92565b6112b76122f6565b506112c2855f611985565b611301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89061431a565b60405180910390fd5b61130a846126bf565b611313836128d4565b61131c8561066e565b1561135d575f61132b86611b39565b905061133b81602001518661296a565b611349816040015185612be7565b611357816060015184612c31565b5061163c565b60405180608001604052808681526020018581526020018481526020018381525060038660405161138e9190613ea8565b90815260200160405180910390205f820151815f0190816113af91906140c3565b506020820151816001015f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030190805190602001906114a5929190612ecc565b5050506040820151816005015f820151815f015f820151815f01556020820151816001015550506020820151816002015f820151815f01556020820151816001015550506040820151816004015f820151815f01556020820151816001015550506060820151816006015f820151815f01556020820151816001015550505050606082015181600d015f820151815f0155602082015181600101556040820151816002015560608201518160030155505090505060045f856040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f9091909190915090816115c991906140c3565b5060045f856020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2085908060018154018082558091505060019003905f5260205f20015f90919091909150908161163a91906140c3565b505b60038560405161164c9190613ea8565b90815260200160405180910390206040518060800160405290815f8201805461167490613dc6565b80601f01602080910402602001604051908101604052809291908181526020018280546116a090613dc6565b80156116eb5780601f106116c2576101008083540402835291602001916116eb565b820191905f5260205f20905b8154815290600101906020018083116116ce57829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561188457602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161183b575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050949350505050565b5f61198f8361066e565b6119c1575f600a8111156119a6576119a561357a565b5b82600a8111156119b9576119b861357a565b5b149050611a17565b81600a8111156119d4576119d361357a565b5b6005846040516119e49190613ea8565b90815260200160405180910390205f015f9054906101000a900460ff16600a811115611a1357611a1261357a565b5b1490505b92915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611a4d612e1f565b600582604051611a5d9190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a811115611a9a57611a9961357a565b5b600a811115611aac57611aab61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b611b41612e92565b600382604051611b519190613ea8565b90815260200160405180910390206040518060800160405290815f82018054611b7990613dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054611ba590613dc6565b8015611bf05780601f10611bc757610100808354040283529160200191611bf0565b820191905f5260205f20905b815481529060010190602001808311611bd357829003601f168201915b50505050508152602001600182016040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201805480602002602001604051908101604052809291908181526020018280548015611d8957602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611d40575b5050505050815250508152602001600582016040518060800160405290815f82016040518060400160405290815f82015481526020016001820154815250508152602001600282016040518060400160405290815f82015481526020016001820154815250508152602001600482016040518060400160405290815f82015481526020016001820154815250508152602001600682016040518060400160405290815f8201548152602001600182015481525050815250508152602001600d82016040518060800160405290815f82015481526020016001820154815260200160028201548152602001600382015481525050815250509050919050565b611e8f6122f6565b50611e9b816004611985565b611eda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed190614382565b60405180910390fd5b42600582604051611eeb9190613ea8565b9081526020016040518091039020600d0181905550611f0b81600a612423565b50565b611f166122f6565b50611f22816002611985565b611f61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5890613e50565b60405180910390fd5b42600582604051611f729190613ea8565b9081526020016040518091039020600c0181905550611f92816009612423565b50565b611f9d612e1f565b611fa56122f6565b50611faf8261066e565b611fee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe5906141dc565b60405180910390fd5b5f600583604051611fff9190613ea8565b90815260200160405180910390206001015414612051576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612048906144d6565b60405180910390fd5b426005836040516120629190613ea8565b908152602001604051809103902060010181905550612080826124a7565b6005826040516120909190613ea8565b9081526020016040518091039020604051806101c00160405290815f82015f9054906101000a900460ff16600a8111156120cd576120cc61357a565b5b600a8111156120df576120de61357a565b5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d820154815250509050919050565b61217461255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036121e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d990614564565b60405180910390fd5b6121eb816125dc565b50565b6121f661255e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225b906145f2565b60405180910390fd5b600160149054906101000a900460ff166122b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122aa90614680565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237d906145f2565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123c6612d5b565b73ffffffffffffffffffffffffffffffffffffffff161461241c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124139061470e565b60405180910390fd5b6001905090565b806005836040516124349190613ea8565b90815260200160405180910390205f015f6101000a81548160ff0219169083600a8111156124655761246461357a565b5b02179055507f10ca3d89184491f5d8de422bd36534abe6eb4b4aa1429a261bdb5ff1dd9ac386828260405161249b929190614773565b60405180910390a15050565b5f6005826040516124b89190613ea8565b908152602001604051809103902060010154141580156124f957505f6005826040516124e49190613ea8565b90815260200160405180910390206002015414155b15612534574260058260405161250f9190613ea8565b90815260200160405180910390206004018190555061252f816001612423565b61255b565b426005826040516125459190613ea8565b9081526020016040518091039020600301819055505b50565b612566612d5b565b73ffffffffffffffffffffffffffffffffffffffff1661258461125c565b73ffffffffffffffffffffffffffffffffffffffff16146125da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d1906147eb565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1603612731576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161272890614853565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16036127a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279a906148bb565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1603612814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280b90614923565b60405180910390fd5b5f8160600151511161285b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128529061498b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16036128d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c8906149f3565b60405180910390fd5b50565b5f815f0151602001511461291d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291490614a5b565b60405180910390fd5b5f81606001516020015114612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295e90614ac3565b60405180910390fd5b50565b806040015173ffffffffffffffffffffffffffffffffffffffff16826040015173ffffffffffffffffffffffffffffffffffffffff16146129e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d790614b2b565b60405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff16826020015173ffffffffffffffffffffffffffffffffffffffff1614612a56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4d90614b93565b60405180910390fd5b805f015173ffffffffffffffffffffffffffffffffffffffff16825f015173ffffffffffffffffffffffffffffffffffffffff1614612aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac190614bfb565b60405180910390fd5b80606001515182606001515114612b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0d90614c63565b60405180910390fd5b5f5b826060015151811015612be25781606001518181518110612b3c57612b3b614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1683606001518281518110612b7157612b70614c81565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614612bcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc690614cf8565b60405180910390fd5b8080612bda90614d16565b915050612b18565b505050565b612bf7825f0151825f0151612d62565b612c0982602001518260200151612d62565b612c1b82604001518260400151612d62565b612c2d82606001518260600151612d62565b5050565b805f0151825f015114612c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7090614da7565b60405180910390fd5b8060200151826020015114612cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cba90614e0f565b60405180910390fd5b8060400151826040015114612d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d0490614e77565b60405180910390fd5b8060600151826060015114612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e90614edf565b60405180910390fd5b5050565b5f33905090565b805f0151825f015114612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190614f47565b60405180910390fd5b8060200151826020015114612df4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612deb90614faf565b60405180910390fd5b5050565b60405180608001604052806060815260200160608152602001606081526020015f81525090565b604051806101c001604052805f600a811115612e3e57612e3d61357a565b5b81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b604051806080016040528060608152602001612eac612f53565b8152602001612eb9612fba565b8152602001612ec6612ffa565b81525090565b828054828255905f5260205f20908101928215612f42579160200282015b82811115612f41578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190612eea565b5b509050612f4f919061301e565b5090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6040518060800160405280612fcd613039565b8152602001612fda613039565b8152602001612fe7613039565b8152602001612ff4613039565b81525090565b60405180608001604052805f81526020015f81526020015f81526020015f81525090565b5b80821115613035575f815f90555060010161301f565b5090565b60405180604001604052805f81526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61308b82613062565b9050919050565b61309b81613081565b81146130a5575f80fd5b50565b5f813590506130b681613092565b92915050565b5f602082840312156130d1576130d061305a565b5b5f6130de848285016130a8565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561314757808201518184015260208101905061312c565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61316c82613110565b613176818561311a565b935061318681856020860161312a565b61318f81613152565b840191505092915050565b5f6131a58383613162565b905092915050565b5f602082019050919050565b5f6131c3826130e7565b6131cd81856130f1565b9350836020820285016131df85613101565b805f5b8581101561321a57848403895281516131fb858261319a565b9450613206836131ad565b925060208a019950506001810190506131e2565b50829750879550505050505092915050565b5f6020820190508181035f83015261324481846131b9565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61328a82613152565b810181811067ffffffffffffffff821117156132a9576132a8613254565b5b80604052505050565b5f6132bb613051565b90506132c78282613281565b919050565b5f67ffffffffffffffff8211156132e6576132e5613254565b5b6132ef82613152565b9050602081019050919050565b828183375f83830152505050565b5f61331c613317846132cc565b6132b2565b90508281526020810184848401111561333857613337613250565b5b6133438482856132fc565b509392505050565b5f82601f83011261335f5761335e61324c565b5b813561336f84826020860161330a565b91505092915050565b5f6020828403121561338d5761338c61305a565b5b5f82013567ffffffffffffffff8111156133aa576133a961305e565b5b6133b68482850161334b565b91505092915050565b5f8115159050919050565b6133d3816133bf565b82525050565b5f6020820190506133ec5f8301846133ca565b92915050565b5f819050919050565b613404816133f2565b811461340e575f80fd5b50565b5f8135905061341f816133fb565b92915050565b5f805f806080858703121561343d5761343c61305a565b5b5f85013567ffffffffffffffff81111561345a5761345961305e565b5b6134668782880161334b565b945050602085013567ffffffffffffffff8111156134875761348661305e565b5b6134938782880161334b565b935050604085013567ffffffffffffffff8111156134b4576134b361305e565b5b6134c08782880161334b565b92505060606134d187828801613411565b91505092959194509250565b6134e6816133f2565b82525050565b5f608083015f8301518482035f8601526135068282613162565b915050602083015184820360208601526135208282613162565b9150506040830151848203604086015261353a8282613162565b915050606083015161354f60608601826134dd565b508091505092915050565b5f6020820190508181035f83015261357281846134ec565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600b81106135b8576135b761357a565b5b50565b5f8190506135c8826135a7565b919050565b5f6135d7826135bb565b9050919050565b6135e7816135cd565b82525050565b6101c082015f8201516136025f8501826135de565b50602082015161361560208501826134dd565b50604082015161362860408501826134dd565b50606082015161363b60608501826134dd565b50608082015161364e60808501826134dd565b5060a082015161366160a08501826134dd565b5060c082015161367460c08501826134dd565b5060e082015161368760e08501826134dd565b5061010082015161369c6101008501826134dd565b506101208201516136b16101208501826134dd565b506101408201516136c66101408501826134dd565b506101608201516136db6101608501826134dd565b506101808201516136f06101808501826134dd565b506101a08201516137056101a08501826134dd565b50505050565b5f6101c08201905061371f5f8301846135ed565b92915050565b61372e816133f2565b82525050565b5f6020820190506137475f830184613725565b92915050565b61375681613081565b82525050565b5f60208201905061376f5f83018461374d565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561379757613796613254565b5b602082029050602081019050919050565b5f80fd5b5f6137be6137b98461377d565b6132b2565b905080838252602082019050602084028301858111156137e1576137e06137a8565b5b835b8181101561380a57806137f688826130a8565b8452602084019350506020810190506137e3565b5050509392505050565b5f82601f8301126138285761382761324c565b5b81356138388482602086016137ac565b91505092915050565b5f6080828403121561385657613855613775565b5b61386060806132b2565b90505f61386f848285016130a8565b5f830152506020613882848285016130a8565b6020830152506040613896848285016130a8565b604083015250606082013567ffffffffffffffff8111156138ba576138b9613779565b5b6138c684828501613814565b60608301525092915050565b5f604082840312156138e7576138e6613775565b5b6138f160406132b2565b90505f61390084828501613411565b5f83015250602061391384828501613411565b60208301525092915050565b5f610100828403121561393557613934613775565b5b61393f60806132b2565b90505f61394e848285016138d2565b5f830152506040613961848285016138d2565b6020830152506080613975848285016138d2565b60408301525060c0613989848285016138d2565b60608301525092915050565b5f608082840312156139aa576139a9613775565b5b6139b460806132b2565b90505f6139c384828501613411565b5f8301525060206139d684828501613411565b60208301525060406139ea84828501613411565b60408301525060606139fe84828501613411565b60608301525092915050565b5f805f806101c08587031215613a2357613a2261305a565b5b5f85013567ffffffffffffffff811115613a4057613a3f61305e565b5b613a4c8782880161334b565b945050602085013567ffffffffffffffff811115613a6d57613a6c61305e565b5b613a7987828801613841565b9350506040613a8a8782880161391f565b925050610140613a9c87828801613995565b91505092959194509250565b613ab181613081565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f613aeb8383613aa8565b60208301905092915050565b5f602082019050919050565b5f613b0d82613ab7565b613b178185613ac1565b9350613b2283613ad1565b805f5b83811015613b52578151613b398882613ae0565b9750613b4483613af7565b925050600181019050613b25565b5085935050505092915050565b5f608083015f830151613b745f860182613aa8565b506020830151613b876020860182613aa8565b506040830151613b9a6040860182613aa8565b5060608301518482036060860152613bb28282613b03565b9150508091505092915050565b604082015f820151613bd35f8501826134dd565b506020820151613be660208501826134dd565b50505050565b61010082015f820151613c015f850182613bbf565b506020820151613c146040850182613bbf565b506040820151613c276080850182613bbf565b506060820151613c3a60c0850182613bbf565b50505050565b608082015f820151613c545f8501826134dd565b506020820151613c6760208501826134dd565b506040820151613c7a60408501826134dd565b506060820151613c8d60608501826134dd565b50505050565b5f6101c083015f8301518482035f860152613cae8282613162565b91505060208301518482036020860152613cc88282613b5f565b9150506040830151613cdd6040860182613bec565b506060830151613cf1610140860182613c40565b508091505092915050565b5f6020820190508181035f830152613d148184613c93565b905092915050565b600b8110613d28575f80fd5b50565b5f81359050613d3981613d1c565b92915050565b5f8060408385031215613d5557613d5461305a565b5b5f83013567ffffffffffffffff811115613d7257613d7161305e565b5b613d7e8582860161334b565b9250506020613d8f85828601613d2b565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680613ddd57607f821691505b602082108103613df057613def613d99565b5b50919050565b5f82825260208201905092915050565b7f526573756c74735375626d6974746564000000000000000000000000000000005f82015250565b5f613e3a601083613df6565b9150613e4582613e06565b602082019050919050565b5f6020820190508181035f830152613e6781613e2e565b9050919050565b5f81905092915050565b5f613e8282613110565b613e8c8185613e6e565b9350613e9c81856020860161312a565b80840191505092915050565b5f613eb38284613e78565b915081905092915050565b7f4465616c416772656564000000000000000000000000000000000000000000005f82015250565b5f613ef2600a83613df6565b9150613efd82613ebe565b602082019050919050565b5f6020820190508181035f830152613f1f81613ee6565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302613f827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613f47565b613f8c8683613f47565b95508019841693508086168417925050509392505050565b5f819050919050565b5f613fc7613fc2613fbd846133f2565b613fa4565b6133f2565b9050919050565b5f819050919050565b613fe083613fad565b613ff4613fec82613fce565b848454613f53565b825550505050565b5f90565b614008613ffc565b614013818484613fd7565b505050565b5b818110156140365761402b5f82614000565b600181019050614019565b5050565b601f82111561407b5761404c81613f26565b61405584613f38565b81016020851015614064578190505b61407861407085613f38565b830182614018565b50505b505050565b5f82821c905092915050565b5f61409b5f1984600802614080565b1980831691505092915050565b5f6140b3838361408c565b9150826002028217905092915050565b6140cc82613110565b67ffffffffffffffff8111156140e5576140e4613254565b5b6140ef8254613dc6565b6140fa82828561403a565b5f60209050601f83116001811461412b575f8415614119578287015190505b61412385826140a8565b86555061418a565b601f19841661413986613f26565b5f5b828110156141605784890151825560018201915060208501945060208101905061413b565b8683101561417d5784890151614179601f89168261408c565b8355505b6001600288020188555050505b505050505050565b7f4465616c20646f6573206e6f74206578697374000000000000000000000000005f82015250565b5f6141c6601383613df6565b91506141d182614192565b602082019050919050565b5f6020820190508181035f8301526141f3816141ba565b9050919050565b7f4a432068617320616c72656164792061677265656400000000000000000000005f82015250565b5f61422e601583613df6565b9150614239826141fa565b602082019050919050565b5f6020820190508181035f83015261425b81614222565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614299826133f2565b91506142a4836133f2565b92508282026142b2816133f2565b915082820484148315176142c9576142c8614262565b5b5092915050565b7f4465616c4e65676f74696174696e6700000000000000000000000000000000005f82015250565b5f614304600f83613df6565b915061430f826142d0565b602082019050919050565b5f6020820190508181035f830152614331816142f8565b9050919050565b7f526573756c7473436865636b65640000000000000000000000000000000000005f82015250565b5f61436c600e83613df6565b915061437782614338565b602082019050919050565b5f6020820190508181035f83015261439981614360565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6143fa602e83613df6565b9150614405826143a0565b604082019050919050565b5f6020820190508181035f830152614427816143ee565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f61445d6144586144538461442e565b613fa4565b614437565b9050919050565b61446d81614443565b82525050565b5f6020820190506144865f830184614464565b92915050565b7f52502068617320616c72656164792061677265656400000000000000000000005f82015250565b5f6144c0601583613df6565b91506144cb8261448c565b602082019050919050565b5f6020820190508181035f8301526144ed816144b4565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61454e602683613df6565b9150614559826144f4565b604082019050919050565b5f6020820190508181035f83015261457b81614542565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f6145dc603583613df6565b91506145e782614582565b604082019050919050565b5f6020820190508181035f830152614609816145d0565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f61466a603983613df6565b915061467582614610565b604082019050919050565b5f6020820190508181035f8301526146978161465e565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f6146f8603b83613df6565b91506147038261469e565b604082019050919050565b5f6020820190508181035f830152614725816146ec565b9050919050565b5f61473682613110565b6147408185613df6565b935061475081856020860161312a565b61475981613152565b840191505092915050565b61476d816135cd565b82525050565b5f6040820190508181035f83015261478b818561472c565b905061479a6020830184614764565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6147d5602083613df6565b91506147e0826147a1565b602082019050919050565b5f6020820190508181035f830152614802816147c9565b9050919050565b7f5250206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f61483d600a83613df6565b915061484882614809565b602082019050919050565b5f6020820190508181035f83015261486a81614831565b9050919050565b7f4a43206d697373696e67000000000000000000000000000000000000000000005f82015250565b5f6148a5600a83613df6565b91506148b082614871565b602082019050919050565b5f6020820190508181035f8301526148d281614899565b9050919050565b7f536f6c766572206d697373696e670000000000000000000000000000000000005f82015250565b5f61490d600e83613df6565b9150614918826148d9565b602082019050919050565b5f6020820190508181035f83015261493a81614901565b9050919050565b7f4d65646961746f7273203c3d20300000000000000000000000000000000000005f82015250565b5f614975600e83613df6565b915061498082614941565b602082019050919050565b5f6020820190508181035f8301526149a281614969565b9050919050565b7f5250202f204a432073616d6500000000000000000000000000000000000000005f82015250565b5f6149dd600c83613df6565b91506149e8826149a9565b602082019050919050565b5f6020820190508181035f830152614a0a816149d1565b9050919050565b7f4167726565206465706f736974206d75737420626520300000000000000000005f82015250565b5f614a45601783613df6565b9150614a5082614a11565b602082019050919050565b5f6020820190508181035f830152614a7281614a39565b9050919050565b7f4d656469617465206465706f736974206d7573742062652030000000000000005f82015250565b5f614aad601983613df6565b9150614ab882614a79565b602082019050919050565b5f6020820190508181035f830152614ada81614aa1565b9050919050565b7f52500000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b15600283613df6565b9150614b2082614ae1565b602082019050919050565b5f6020820190508181035f830152614b4281614b09565b9050919050565b7f4a430000000000000000000000000000000000000000000000000000000000005f82015250565b5f614b7d600283613df6565b9150614b8882614b49565b602082019050919050565b5f6020820190508181035f830152614baa81614b71565b9050919050565b7f536f6c76657200000000000000000000000000000000000000000000000000005f82015250565b5f614be5600683613df6565b9150614bf082614bb1565b602082019050919050565b5f6020820190508181035f830152614c1281614bd9565b9050919050565b7f4d65646961746f727300000000000000000000000000000000000000000000005f82015250565b5f614c4d600983613df6565b9150614c5882614c19565b602082019050919050565b5f6020820190508181035f830152614c7a81614c41565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4d65646961746f720000000000000000000000000000000000000000000000005f82015250565b5f614ce2600883613df6565b9150614ced82614cae565b602082019050919050565b5f6020820190508181035f830152614d0f81614cd6565b9050919050565b5f614d20826133f2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614d5257614d51614262565b5b600182019050919050565b7f50726963650000000000000000000000000000000000000000000000000000005f82015250565b5f614d91600583613df6565b9150614d9c82614d5d565b602082019050919050565b5f6020820190508181035f830152614dbe81614d85565b9050919050565b7f5061796d656e74000000000000000000000000000000000000000000000000005f82015250565b5f614df9600783613df6565b9150614e0482614dc5565b602082019050919050565b5f6020820190508181035f830152614e2681614ded565b9050919050565b7f526573756c7473000000000000000000000000000000000000000000000000005f82015250565b5f614e61600783613df6565b9150614e6c82614e2d565b602082019050919050565b5f6020820190508181035f830152614e8e81614e55565b9050919050565b7f4d6564696174696f6e00000000000000000000000000000000000000000000005f82015250565b5f614ec9600983613df6565b9150614ed482614e95565b602082019050919050565b5f6020820190508181035f830152614ef681614ebd565b9050919050565b7f54696d656f7574000000000000000000000000000000000000000000000000005f82015250565b5f614f31600783613df6565b9150614f3c82614efd565b602082019050919050565b5f6020820190508181035f830152614f5e81614f25565b9050919050565b7f436f6c6c61746572616c000000000000000000000000000000000000000000005f82015250565b5f614f99600a83613df6565b9150614fa482614f65565b602082019050919050565b5f6020820190508181035f830152614fc681614f8d565b905091905056fea26469706673582212208a4ece8015b739b867606d7c639d41d2e97c699769bc0be4f3dd82bd24a8824664736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "acceptResult(string)": { + "notice": "Judge Results" + }, + "getAgreement(string)": { + "notice": "Agreements" + }, + "getDeal(string)": { + "notice": "Deals" + }, + "getJobCost(string)": { + "notice": "Costings" + }, + "getResult(string)": { + "notice": "Post Results" + }, + "hasDeal(string)": { + "notice": "Checkers" + }, + "initialize()": { + "notice": "Init" + }, + "mediationAcceptResult(string)": { + "notice": "Mediati:" + }, + "timeoutAgree(string)": { + "notice": "Timeouts" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1475, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1478, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 6, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_initialized", + "offset": 21, + "slot": "1", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "_initializing", + "offset": 22, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 4637, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "controllerAddress", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 4640, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "2", + "type": "t_bool" + }, + { + "astId": 4645, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "deals", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_string_memory_ptr,t_struct(Deal)6367_storage)" + }, + { + "astId": 4650, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealsForParty", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_array(t_string_storage)dyn_storage)" + }, + { + "astId": 4655, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "agreements", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_string_memory_ptr,t_struct(Agreement)6406_storage)" + }, + { + "astId": 4660, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "results", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_string_memory_ptr,t_struct(Result)6376_storage)" + }, + { + "astId": 4665, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediations", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_string_memory_ptr,t_struct(Result)6376_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_string_storage)dyn_storage": { + "base": "t_string_storage", + "encoding": "dynamic_array", + "label": "string[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_enum(AgreementState)6307": { + "encoding": "inplace", + "label": "enum SharedStructs.AgreementState", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_array(t_string_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string[])", + "numberOfBytes": "32", + "value": "t_array(t_string_storage)dyn_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Agreement)6406_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Agreement)", + "numberOfBytes": "32", + "value": "t_struct(Agreement)6406_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Deal)6367_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Deal)", + "numberOfBytes": "32", + "value": "t_struct(Deal)6367_storage" + }, + "t_mapping(t_string_memory_ptr,t_struct(Result)6376_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => struct SharedStructs.Result)", + "numberOfBytes": "32", + "value": "t_struct(Result)6376_storage" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Agreement)6406_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Agreement", + "members": [ + { + "astId": 6379, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "state", + "offset": 0, + "slot": "0", + "type": "t_enum(AgreementState)6307" + }, + { + "astId": 6381, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resourceProviderAgreedAt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 6383, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "jobCreatorAgreedAt", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 6385, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealCreatedAt", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 6387, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealAgreedAt", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 6389, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsSubmittedAt", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 6391, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsAcceptedAt", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 6393, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsCheckedAt", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 6395, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationAcceptedAt", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 6397, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationRejectedAt", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 6399, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutAgreeAt", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 6401, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutSubmitResultsAt", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 6403, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutJudgeResultsAt", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 6405, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeoutMediateResultsAt", + "offset": 0, + "slot": "13", + "type": "t_uint256" + } + ], + "numberOfBytes": "448" + }, + "t_struct(Deal)6367_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Deal", + "members": [ + { + "astId": 6357, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealId", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 6360, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "members", + "offset": 0, + "slot": "1", + "type": "t_struct(DealMembers)6328_storage" + }, + { + "astId": 6363, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeouts", + "offset": 0, + "slot": "5", + "type": "t_struct(DealTimeouts)6346_storage" + }, + { + "astId": 6366, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "pricing", + "offset": 0, + "slot": "13", + "type": "t_struct(DealPricing)6355_storage" + } + ], + "numberOfBytes": "544" + }, + "t_struct(DealMembers)6328_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealMembers", + "members": [ + { + "astId": 6320, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "solver", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6322, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "jobCreator", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 6324, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resourceProvider", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 6327, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediators", + "offset": 0, + "slot": "3", + "type": "t_array(t_address)dyn_storage" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DealPricing)6355_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealPricing", + "members": [ + { + "astId": 6348, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "instructionPrice", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6350, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "paymentCollateral", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 6352, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsCollateralMultiple", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 6354, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediationFee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DealTimeout)6333_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealTimeout", + "members": [ + { + "astId": 6330, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "timeout", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 6332, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "collateral", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_struct(DealTimeouts)6346_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.DealTimeouts", + "members": [ + { + "astId": 6336, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "agree", + "offset": 0, + "slot": "0", + "type": "t_struct(DealTimeout)6333_storage" + }, + { + "astId": 6339, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "submitResults", + "offset": 0, + "slot": "2", + "type": "t_struct(DealTimeout)6333_storage" + }, + { + "astId": 6342, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "judgeResults", + "offset": 0, + "slot": "4", + "type": "t_struct(DealTimeout)6333_storage" + }, + { + "astId": 6345, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "mediateResults", + "offset": 0, + "slot": "6", + "type": "t_struct(DealTimeout)6333_storage" + } + ], + "numberOfBytes": "256" + }, + "t_struct(Result)6376_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.Result", + "members": [ + { + "astId": 6369, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dealId", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 6371, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "resultsId", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 6373, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "dataId", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 6375, + "contract": "contracts/LilypadStorage.sol:LilypadStorage", + "label": "instructionCount", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadToken.json b/hardhat/deployments/sepolia/LilypadToken.json new file mode 100644 index 00000000..14bae00c --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadToken.json @@ -0,0 +1,794 @@ +{ + "address": "0x90bC5e91B2bC6BBa240001B169fd73DeA75E072A", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "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": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "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": "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": [], + "name": "disableChangeControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "escrowBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getControllerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "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": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "payEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "payJob", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "refundEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_controllerAddress", + "type": "address" + } + ], + "name": "setControllerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "slashedAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "slashEscrow", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "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": "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" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xa8976a246184fcca5827c4cac4638c21ecfe489d5aa1e38129540e75a00ce398", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0x90bC5e91B2bC6BBa240001B169fd73DeA75E072A", + "transactionIndex": 14, + "gasUsed": "2234137", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000000000004000000000000000000000000020000000000000000002800000000000000000000000010000000400000000000000000000000000000000008001000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000080002000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4065685da3499060d459abf128f57b6ddde25de68c8ee25dfb6c904303b7ecc5", + "transactionHash": "0xa8976a246184fcca5827c4cac4638c21ecfe489d5aa1e38129540e75a00ce398", + "logs": [ + { + "transactionIndex": 14, + "blockNumber": 4609891, + "transactionHash": "0xa8976a246184fcca5827c4cac4638c21ecfe489d5aa1e38129540e75a00ce398", + "address": "0x90bC5e91B2bC6BBa240001B169fd73DeA75E072A", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 31, + "blockHash": "0x4065685da3499060d459abf128f57b6ddde25de68c8ee25dfb6c904303b7ecc5" + }, + { + "transactionIndex": 14, + "blockNumber": 4609891, + "transactionHash": "0xa8976a246184fcca5827c4cac4638c21ecfe489d5aa1e38129540e75a00ce398", + "address": "0x90bC5e91B2bC6BBa240001B169fd73DeA75E072A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000", + "logIndex": 32, + "blockHash": "0x4065685da3499060d459abf128f57b6ddde25de68c8ee25dfb6c904303b7ecc5" + } + ], + "blockNumber": 4609891, + "cumulativeGasUsed": "4650786", + "status": 1, + "byzantium": true + }, + "args": [ + "Lilypad Token Test", + "LPTT", + "1000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"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\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"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\":\"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\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"escrowBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payJob\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"refundEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"slashedAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"slashEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadToken.sol\":\"LilypadToken\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC20.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC20 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * IMPORTANT: This contract does not include public pause and unpause functions. In\\n * addition to inheriting this contract, you must define both functions, invoking the\\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\\n * make the contract unpausable.\\n */\\nabstract contract ERC20Pausable is ERC20, Pausable {\\n /**\\n * @dev See {ERC20-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {\\n super._beforeTokenTransfer(from, to, amount);\\n\\n require(!paused(), \\\"ERC20Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0x180079d8b66f41427ac8ba376d9b60da8161eb327827d3085623798305d4658b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadToken.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\n/*\\n standard ERC20 token but with some additional features:\\n\\n * ControllerOwnable\\n * for paying in, we use tx.origin so the actual payee must call the contract\\n * for paying out - we use the Controller Ownable feature so only the payments contract\\n can pay out from the escrow account\\n * escrowBalanceOf\\n * get the current escrow balance for an address\\n * payEscrow\\n * pay into the escrow account\\n * refundEscrow\\n * get refunded from the escrow account\\n * payJob\\n * reduce the \\\"from\\\" account by X amount\\n * actually pay that amount to the \\\"to\\\" address\\n * slashEscrow\\n * reduce the \\\"slashed\\\" account by X amount\\n\\n the escrow functions are designed to be called by the payments contract\\n\\n * deploy this contract as admin\\n * deploy the payments contract as admin and pass this address to it\\n * update the ControllerOwnable address of this contract to be the payments contract\\n \\n now, only the payments contract can call the escrow functions that pay out\\n\\n */\\ncontract LilypadToken is ControllerOwnable, ERC20, ERC20Pausable {\\n\\n // keep track of the current escrow balance for each address\\n mapping(address => uint256) private escrowBalances;\\n\\n constructor(\\n string memory name,\\n string memory symbol,\\n uint256 initialSupply\\n ) ERC20(name, symbol) {\\n _mint(msg.sender, initialSupply);\\n }\\n\\n function escrowBalanceOf(\\n address _address\\n ) public view returns (uint256) {\\n return escrowBalances[_address];\\n }\\n\\n // money being paid into the escrow account\\n function payEscrow(\\n uint256 amount\\n ) public returns (bool) {\\n // it's important we use tx.origin and not msg.sender here\\n // msg.sender will be the payments contract\\n // tx.origin will be the user who called the controller -> payments -> token\\n // i.e. the account that is actually paying into the escrow address\\n _transfer(tx.origin, address(this), amount);\\n escrowBalances[tx.origin] += amount;\\n return true;\\n }\\n\\n // money being paid back from the escrow account\\n function refundEscrow(\\n address toAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(toAddress != address(0), \\\"LilypadToken: toAddress cannot be zero address\\\");\\n require(escrowBalances[toAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[toAddress] -= amount;\\n _transfer(address(this), toAddress, amount);\\n return true;\\n }\\n\\n // pay the RP account from the JC escrow account\\n function payJob(\\n address fromAddress,\\n address toAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(escrowBalances[fromAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[fromAddress] -= amount;\\n _transfer(address(this), toAddress, amount);\\n return true;\\n }\\n\\n // the given party has been slashed so the money stays in the contract\\n // TODO: what should happen to slashed funds?\\n // at the moment we move them to the owner address so they are not locked\\n function slashEscrow(\\n address slashedAddress,\\n uint256 amount\\n ) public onlyController returns (bool) {\\n require(escrowBalances[slashedAddress] >= amount, \\\"LilypadToken: not enough funds in escrow\\\");\\n escrowBalances[slashedAddress] -= amount;\\n _transfer(address(this), owner(), amount);\\n return true;\\n }\\n\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Pausable) {\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0xb9c559cdc356a5acb42dd33475982cebb8aefd282e79f4dc7f928f24967b162a\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405260018060146101000a81548160ff0219169083151502179055503480156200002a575f80fd5b5060405162002efd38038062002efd833981810160405281019062000050919062000559565b82826200007262000066620000cc60201b60201c565b620000d360201b60201c565b81600590816200008391906200081e565b5080600690816200009591906200081e565b5050505f60075f6101000a81548160ff021916908315150217905550620000c333826200019460201b60201c565b50505062000aa7565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000205576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001fc9062000960565b60405180910390fd5b620002185f8383620002fa60201b60201c565b8060045f8282546200022b9190620009ad565b925050819055508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002db9190620009f8565b60405180910390a3620002f65f83836200031260201b60201c565b5050565b6200030d8383836200031760201b60201c565b505050565b505050565b6200032a8383836200038260201b60201c565b6200033a6200038760201b60201c565b156200037d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003749062000a87565b60405180910390fd5b505050565b505050565b5f60075f9054906101000a900460ff16905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620003fd82620003b5565b810181811067ffffffffffffffff821117156200041f576200041e620003c5565b5b80604052505050565b5f620004336200039c565b9050620004418282620003f2565b919050565b5f67ffffffffffffffff821115620004635762000462620003c5565b5b6200046e82620003b5565b9050602081019050919050565b5f5b838110156200049a5780820151818401526020810190506200047d565b5f8484015250505050565b5f620004bb620004b58462000446565b62000428565b905082815260208101848484011115620004da57620004d9620003b1565b5b620004e78482856200047b565b509392505050565b5f82601f830112620005065762000505620003ad565b5b815162000518848260208601620004a5565b91505092915050565b5f819050919050565b620005358162000521565b811462000540575f80fd5b50565b5f8151905062000553816200052a565b92915050565b5f805f60608486031215620005735762000572620003a5565b5b5f84015167ffffffffffffffff811115620005935762000592620003a9565b5b620005a186828701620004ef565b935050602084015167ffffffffffffffff811115620005c557620005c4620003a9565b5b620005d386828701620004ef565b9250506040620005e68682870162000543565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200063f57607f821691505b602082108103620006555762000654620005fa565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620006b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200067c565b620006c586836200067c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6200070662000700620006fa8462000521565b620006dd565b62000521565b9050919050565b5f819050919050565b6200072183620006e6565b6200073962000730826200070d565b84845462000688565b825550505050565b5f90565b6200074f62000741565b6200075c81848462000716565b505050565b5b818110156200078357620007775f8262000745565b60018101905062000762565b5050565b601f821115620007d2576200079c816200065b565b620007a7846200066d565b81016020851015620007b7578190505b620007cf620007c6856200066d565b83018262000761565b50505b505050565b5f82821c905092915050565b5f620007f45f1984600802620007d7565b1980831691505092915050565b5f6200080e8383620007e3565b9150826002028217905092915050565b6200082982620005f0565b67ffffffffffffffff811115620008455762000844620003c5565b5b62000851825462000627565b6200085e82828562000787565b5f60209050601f83116001811462000894575f84156200087f578287015190505b6200088b858262000801565b865550620008fa565b601f198416620008a4866200065b565b5f5b82811015620008cd57848901518255600182019150602085019450602081019050620008a6565b86831015620008ed5784890151620008e9601f891682620007e3565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000948601f8362000902565b9150620009558262000912565b602082019050919050565b5f6020820190508181035f83015262000979816200093a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620009b98262000521565b9150620009c68362000521565b9250828201905080821115620009e157620009e062000980565b5b92915050565b620009f28162000521565b82525050565b5f60208201905062000a0d5f830184620009e7565b92915050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f62000a6f602a8362000902565b915062000a7c8262000a13565b604082019050919050565b5f6020820190508181035f83015262000aa08162000a61565b9050919050565b6124488062000ab55f395ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea26469706673582212201d8d13bbe4cf01e08b4ea25478b99ae89cdf8b5ea85127299fa37feb146b075164736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea26469706673582212201d8d13bbe4cf01e08b4ea25478b99ae89cdf8b5ea85127299fa37feb146b075164736f6c63430008150033", + "devdoc": { + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1475, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "controllerAddress", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1478, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "canChangeControllerAddress", + "offset": 20, + "slot": "1", + "type": "t_bool" + }, + { + "astId": 735, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_balances", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 741, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_allowances", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 743, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 745, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_name", + "offset": 0, + "slot": "5", + "type": "t_string_storage" + }, + { + "astId": 747, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_symbol", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 629, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "_paused", + "offset": 0, + "slot": "7", + "type": "t_bool" + }, + { + "astId": 5707, + "contract": "contracts/LilypadToken.sol:LilypadToken", + "label": "escrowBalances", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/LilypadUsers.json b/hardhat/deployments/sepolia/LilypadUsers.json new file mode 100644 index 00000000..b03c4757 --- /dev/null +++ b/hardhat/deployments/sepolia/LilypadUsers.json @@ -0,0 +1,419 @@ +{ + "address": "0x70eC3b0aFA059174dD54d7702624f1Dd402b706b", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "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" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "addUserToList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + } + ], + "name": "getUser", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "internalType": "struct SharedStructs.User", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "removeUserFromList", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum SharedStructs.ServiceType", + "name": "serviceType", + "type": "uint8" + } + ], + "name": "showUsersInList", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "name": "updateUser", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "metadataCID", + "type": "string" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "enum SharedStructs.ServiceType[]", + "name": "roles", + "type": "uint8[]" + } + ], + "internalType": "struct SharedStructs.User", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf689a1f057d7edb2d7894ad7f379022cbd77ddd5e9aee9bf1214daecc90e76b9", + "receipt": { + "to": null, + "from": "0x23f318fAe637F7F7081D71d2ECD62cb62D27ac4f", + "contractAddress": "0x70eC3b0aFA059174dD54d7702624f1Dd402b706b", + "transactionIndex": 39, + "gasUsed": "1846678", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000004000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000001000000000000000000000000000000000000010000000000000000000000000001000000000000000000000000000000000000000000040000000000000000000000000000000000000000020000000000000008000000000000000000000000000000000000000000000000000", + "blockHash": "0x620aa4c9b103060185a1de4b05c10f2446228898b0d3046b7aeac28edfce7654", + "transactionHash": "0xf689a1f057d7edb2d7894ad7f379022cbd77ddd5e9aee9bf1214daecc90e76b9", + "logs": [ + { + "transactionIndex": 39, + "blockNumber": 4609897, + "transactionHash": "0xf689a1f057d7edb2d7894ad7f379022cbd77ddd5e9aee9bf1214daecc90e76b9", + "address": "0x70eC3b0aFA059174dD54d7702624f1Dd402b706b", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000023f318fae637f7f7081d71d2ecd62cb62d27ac4f" + ], + "data": "0x", + "logIndex": 37, + "blockHash": "0x620aa4c9b103060185a1de4b05c10f2446228898b0d3046b7aeac28edfce7654" + } + ], + "blockNumber": 4609897, + "cumulativeGasUsed": "5919761", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "26a3d6e19028b7f1dccb6c7997bc34c1", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"addUserToList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"}],\"name\":\"getUser\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"internalType\":\"struct SharedStructs.User\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"removeUserFromList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum SharedStructs.ServiceType\",\"name\":\"serviceType\",\"type\":\"uint8\"}],\"name\":\"showUsersInList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"name\":\"updateUser\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"metadataCID\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"enum SharedStructs.ServiceType[]\",\"name\":\"roles\",\"type\":\"uint8[]\"}],\"internalType\":\"struct SharedStructs.User\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getUser(address)\":{\"notice\":\"Users\"},\"initialize()\":{\"notice\":\"Init\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/LilypadUsers.sol\":\"LilypadUsers\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/ControllerOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n// as well as being ownable (i.e. our admin wallet)\\n// this contract has a modifier called onlyController\\n// it works the same way as Ownable but only the Owner\\n// can change the controller address so it gives us a way of\\n// re-pointing contracts if needed\\ncontract ControllerOwnable is Ownable {\\n\\n // the address of the controller that is allowed to call functions\\n address private controllerAddress;\\n\\n // used to \\\"freeze\\\" the controller address - even the admin cannot\\n // change it from this point onwards\\n bool private canChangeControllerAddress = true;\\n\\n modifier onlyController() {\\n _checkControllerAccess();\\n _;\\n }\\n\\n function _checkControllerAccess() internal view virtual returns (bool) {\\n require(controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(_msgSender() == controllerAddress, \\\"ControllerOwnable: Only the controller can call this method\\\");\\n return true;\\n }\\n\\n function setControllerAddress(address _controllerAddress) public onlyOwner {\\n require(_controllerAddress != address(0), \\\"ControllerOwnable: Controller address must be defined\\\");\\n require(canChangeControllerAddress, \\\"ControllerOwnable: canChangeControllerAddress is disabled\\\");\\n controllerAddress = _controllerAddress;\\n }\\n\\n function getControllerAddress() public view returns (address) {\\n return controllerAddress;\\n }\\n\\n function disableChangeControllerAddress() public onlyOwner {\\n canChangeControllerAddress = false;\\n }\\n}\\n\",\"keccak256\":\"0xecfd8b0beb12340f51cefee5e121932fa7aee0a41fb7d0233966419d153ef429\",\"license\":\"Apache-2.0\"},\"contracts/LilypadUsers.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"./SharedStructs.sol\\\";\\nimport \\\"./ControllerOwnable.sol\\\";\\n\\ncontract LilypadUsers is Ownable, Initializable {\\n\\n // a map of user address -> user\\n mapping(address => SharedStructs.User) private users;\\n\\n // a map of user type => user address[]\\n mapping(SharedStructs.ServiceType => address[]) private usersByType;\\n\\n /**\\n * Init\\n */\\n\\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\\n function initialize() public initializer {\\n \\n }\\n\\n /**\\n * Users\\n */\\n\\n function getUser(\\n address userAddress\\n ) public view returns (SharedStructs.User memory) {\\n return users[userAddress];\\n }\\n\\n function updateUser(\\n string memory metadataCID,\\n string memory url,\\n SharedStructs.ServiceType[] memory roles\\n ) public returns (SharedStructs.User memory) {\\n SharedStructs.User memory newUser = SharedStructs.User(\\n tx.origin,\\n metadataCID,\\n url,\\n roles\\n );\\n users[tx.origin] = newUser;\\n return newUser;\\n }\\n\\n function addUserToList(\\n SharedStructs.ServiceType serviceType\\n ) public {\\n require(users[tx.origin].userAddress != address(0), \\\"User must exist\\\");\\n (, bool found) = _getUserListIndex(serviceType, tx.origin);\\n require(!found, \\\"User is already part of that list\\\");\\n require(_doesUserHaveRole(serviceType, tx.origin), \\\"User must have that role\\\");\\n usersByType[serviceType].push(tx.origin);\\n }\\n\\n function removeUserFromList(\\n SharedStructs.ServiceType serviceType\\n ) public {\\n require(users[tx.origin].userAddress != address(0), \\\"User must exist\\\");\\n (uint256 index, bool found) = _getUserListIndex(serviceType, tx.origin);\\n require(found, \\\"User is not part of that list\\\");\\n for (uint256 i = index; i < usersByType[serviceType].length - 1; i++) {\\n usersByType[serviceType][i] = usersByType[serviceType][i + 1];\\n }\\n usersByType[serviceType].pop();\\n }\\n\\n function showUsersInList(\\n SharedStructs.ServiceType serviceType\\n ) public view returns (address[] memory) {\\n return usersByType[serviceType];\\n }\\n\\n // returns the index of the user found in the service list\\n // it returns 0 and false if the user is not found\\n function _getUserListIndex(\\n SharedStructs.ServiceType serviceType,\\n address userAddress\\n ) private view returns (uint256, bool) {\\n uint256 ret = 0;\\n bool found = false;\\n for (uint256 i = 0; i < usersByType[serviceType].length; i++) {\\n if (usersByType[serviceType][i] == userAddress) {\\n ret = i;\\n found = true;\\n break;\\n }\\n }\\n return (ret, found);\\n }\\n\\n function _doesUserHaveRole(\\n SharedStructs.ServiceType serviceType,\\n address userAddress\\n ) private view returns (bool) {\\n bool found = false;\\n for (uint256 i = 0; i < users[userAddress].roles.length; i++) {\\n if (users[userAddress].roles[i] == serviceType) {\\n found = true;\\n break;\\n }\\n }\\n return found;\\n }\\n}\\n\",\"keccak256\":\"0x7bca139366d9913f795252bae9583f7d634a599927cace6fc2163c22a6cf16c4\",\"license\":\"Apache-2.0\"},\"contracts/SharedStructs.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.6;\\n\\nlibrary SharedStructs {\\n\\n enum ServiceType {\\n Solver,\\n Mediator,\\n ResourceProvider,\\n JobCreator\\n }\\n\\n enum AgreementState {\\n\\n // the two parties have not yet both agreed to the deal\\n DealNegotiating,\\n\\n // both parties have agreed\\n DealAgreed,\\n\\n // results have been submitted by the RP\\n ResultsSubmitted,\\n\\n // the JC has accepted the results\\n ResultsAccepted,\\n\\n // the JC has checked the results\\n ResultsChecked,\\n\\n // a mediator has accepted the results\\n MediationAccepted,\\n\\n // a mediator has rejected the results\\n MediationRejected,\\n\\n // this means the counter-party did not agree to the deal in time\\n TimeoutAgree,\\n\\n // this means the RP did not submit results in time\\n TimeoutSubmitResults,\\n\\n // this means the JC did not accept or reject results in time\\n TimeoutJudgeResults,\\n\\n // this means the mediator did not accept or submit judgement in time\\n TimeoutMediateResults\\n\\n }\\n\\n // we map addresses onto infomation about the user\\n struct User {\\n address userAddress;\\n // the CID of information for this user\\n string metadataCID;\\n string url;\\n ServiceType[] roles;\\n }\\n\\n // the various addresses involved in runnig a deal\\n struct DealMembers {\\n // the address of the solver service that the RP and JC have agreed to use\\n address solver;\\n // the addresses of the RP and JC that have agreed to this deal\\n address jobCreator;\\n address resourceProvider;\\n // the list of mediators that the RP and JC have agreed to use\\n address[] mediators;\\n }\\n\\n // a timeout represents the agreed amount of time and the penalty\\n // that is applied if the timeout is exceeded \\n struct DealTimeout {\\n uint256 timeout;\\n uint256 collateral;\\n }\\n \\n // the various forms of timeout a deal can have\\n struct DealTimeouts { \\n DealTimeout agree;\\n DealTimeout submitResults;\\n DealTimeout judgeResults;\\n DealTimeout mediateResults;\\n }\\n\\n // configure the cost of a deal\\n struct DealPricing {\\n // agreed price per instruction\\n uint256 instructionPrice;\\n\\n // the collateral that the JC has put up to pay for the job\\n // the final cost of the job will be deducted from this\\n uint256 paymentCollateral;\\n\\n // how much collateral the RP will post to attest it's results are correct\\n // this is a multiple of the cost of the job which is known at results\\n // submission time\\n uint256 resultsCollateralMultiple;\\n\\n // how much is the JC willing to pay the mediator to resolve disputes\\n uint256 mediationFee;\\n }\\n\\n // a Deal forms the information that is agreed between both parties\\n // both parties must have called \\\"agree_deal\\\" with the exact\\n // same parameters before the deal is considered valid\\n // a Deal is immutable - nothing about it can be updated\\n struct Deal {\\n // the CID of the Deal document on IPFS (and directory service)\\n // this contains the job spec, the job offer and the resource offer\\n string dealId;\\n\\n // who is participating in this deal\\n DealMembers members;\\n \\n // the timeout settings for a deal\\n DealTimeouts timeouts;\\n\\n // the pricing settings for a deal\\n DealPricing pricing; \\n }\\n\\n // what the RP submits back once having run the job\\n // this is also immutable\\n struct Result {\\n // the id of the deal that this result is for\\n string dealId;\\n\\n // the CID of the results on IPFS (and directory service)\\n // NOTE - this is not the CID of actual results data rather\\n // of the JSON object reporting that data\\n string resultsId;\\n\\n // this is the actual lower level data CID\\n string dataId;\\n\\n // how many instructions were executed by the RP\\n uint256 instructionCount;\\n }\\n\\n // an agreement keeps track of the state of a deal and it's fields can be mutated\\n struct Agreement {\\n // the current state of the agreement\\n AgreementState state;\\n\\n uint256 resourceProviderAgreedAt;\\n uint256 jobCreatorAgreedAt;\\n uint256 dealCreatedAt;\\n uint256 dealAgreedAt;\\n\\n uint256 resultsSubmittedAt;\\n uint256 resultsAcceptedAt;\\n uint256 resultsCheckedAt;\\n\\n uint256 mediationAcceptedAt;\\n uint256 mediationRejectedAt;\\n\\n uint256 timeoutAgreeAt;\\n uint256 timeoutSubmitResultsAt;\\n uint256 timeoutJudgeResultsAt;\\n uint256 timeoutMediateResultsAt;\\n }\\n\\n struct JobOffer {\\n uint256 id;\\n \\n // this is the contract that will be triggered\\n // once there are some results\\n address calling_contract;\\n\\n // this is the address that is paying for the job\\n // they must have called approve on the token contract\\n // and granted the solver address the number of tokens\\n // required\\n address payee;\\n\\n // the job spec\\n string module;\\n string[] inputs;\\n }\\n}\\n\",\"keccak256\":\"0x17ae1fe0274d61f5460caee95e214371a378a3e49730e5bdc4833506de99fcb6\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561000f575f80fd5b5061002c61002161003160201b60201c565b61003860201b60201c565b6100f9565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612002806101065f395ff3fe608060405234801561000f575f80fd5b5060043610610091575f3560e01c8063a15dcc8a11610064578063a15dcc8a146100f7578063a7f96f0614610127578063aeb5ec0114610143578063ebbbca271461015f578063f2fde38b1461018f57610091565b80636f77926b14610095578063715018a6146100c55780638129fc1c146100cf5780638da5cb5b146100d9575b5f80fd5b6100af60048036038101906100aa91906111cf565b6101ab565b6040516100bc919061141c565b60405180910390f35b6100cd6103ff565b005b6100d7610412565b005b6100e1610547565b6040516100ee919061144b565b60405180910390f35b610111600480360381019061010c9190611487565b61056e565b60405161011e919061155a565b60405180910390f35b610141600480360381019061013c9190611487565b61062e565b005b61015d60048036038101906101589190611487565b610932565b005b6101796004803603810190610174919061176a565b610b2d565b604051610186919061141c565b60405180910390f35b6101a960048036038101906101a491906111cf565b610c48565b005b6101b361105b565b60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805461025f9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461028b9061183b565b80156102d65780601f106102ad576101008083540402835291602001916102d6565b820191905f5260205f20905b8154815290600101906020018083116102b957829003601f168201915b505050505081526020016002820180546102ef9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461031b9061183b565b80156103665780601f1061033d57610100808354040283529160200191610366565b820191905f5260205f20905b81548152906001019060200180831161034957829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103ef57602002820191905f5260205f20905f905b82829054906101000a900460ff1660038111156103ca576103c96112bc565b5b815260200190600101906020825f010492830192600103820291508084116103aa5790505b5050505050815250509050919050565b610407610cca565b6104105f610d48565b565b5f8060159054906101000a900460ff16159050808015610443575060015f60149054906101000a900460ff1660ff16105b80610471575061045230610e09565b158015610470575060015f60149054906101000a900460ff1660ff16145b5b6104b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a7906118eb565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156104ec5760015f60156101000a81548160ff0219169083151502179055505b8015610544575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161053b9190611957565b60405180910390a15b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060025f836003811115610586576105856112bc565b5b6003811115610598576105976112bc565b5b81526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561062257602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116105d9575b50505050509050919050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f1906119ba565b60405180910390fd5b5f806107068332610e2b565b915091508061074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190611a22565b60405180910390fd5b5f8290505b600160025f866003811115610767576107666112bc565b5b6003811115610779576107786112bc565b5b81526020019081526020015f20805490506107949190611a76565b8110156108b55760025f8560038111156107b1576107b06112bc565b5b60038111156107c3576107c26112bc565b5b81526020019081526020015f206001826107dd9190611aa9565b815481106107ee576107ed611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f86600381111561082c5761082b6112bc565b5b600381111561083e5761083d6112bc565b5b81526020019081526020015f20828154811061085d5761085c611adc565b5b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806108ad90611b09565b91505061074f565b5060025f8460038111156108cc576108cb6112bc565b5b60038111156108de576108dd6112bc565b5b81526020019081526020015f208054806108fb576108fa611b50565b5b600190038181905f5260205f20015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036109fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f5906119ba565b60405180910390fd5b5f610a098232610e2b565b9150508015610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490611bed565b60405180910390fd5b610a578232610f41565b610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d90611c55565b60405180910390fd5b60025f836003811115610aac57610aab6112bc565b5b6003811115610abe57610abd6112bc565b5b81526020019081526020015f2032908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b3561105b565b5f60405180608001604052803273ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481525090508060015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610c069190611e07565b506040820151816002019081610c1c9190611e07565b506060820151816003019080519060200190610c39929190611098565b50905050809150509392505050565b610c50610cca565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb590611f46565b60405180910390fd5b610cc781610d48565b50565b610cd2611054565b73ffffffffffffffffffffffffffffffffffffffff16610cf0610547565b73ffffffffffffffffffffffffffffffffffffffff1614610d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3d90611fae565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f805f805f5b60025f886003811115610e4757610e466112bc565b5b6003811115610e5957610e586112bc565b5b81526020019081526020015f2080549050811015610f31578573ffffffffffffffffffffffffffffffffffffffff1660025f896003811115610e9e57610e9d6112bc565b5b6003811115610eb057610eaf6112bc565b5b81526020019081526020015f208281548110610ecf57610ece611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f1e5780925060019150610f31565b8080610f2990611b09565b915050610e31565b5081819350935050509250929050565b5f805f90505f5b60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018054905081101561104957846003811115610fa657610fa56112bc565b5b60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018281548110610ff857610ff7611adc565b5b905f5260205f2090602091828204019190069054906101000a900460ff166003811115611028576110276112bc565b5b036110365760019150611049565b808061104190611b09565b915050610f48565b508091505092915050565b5f33905090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160608152602001606081525090565b828054828255905f5260205f2090601f01602090048101928215611138579160200282015f5b8382111561110a57835183826101000a81548160ff021916908360038111156110ea576110e96112bc565b5b021790555092602001926001016020815f010492830192600103026110be565b80156111365782816101000a81549060ff02191690556001016020815f0104928301926001030261110a565b505b5090506111459190611149565b5090565b5b80821115611160575f815f90555060010161114a565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61119e82611175565b9050919050565b6111ae81611194565b81146111b8575f80fd5b50565b5f813590506111c9816111a5565b92915050565b5f602082840312156111e4576111e361116d565b5b5f6111f1848285016111bb565b91505092915050565b61120381611194565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611240578082015181840152602081019050611225565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61126582611209565b61126f8185611213565b935061127f818560208601611223565b6112888161124b565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600481106112fa576112f96112bc565b5b50565b5f81905061130a826112e9565b919050565b5f611319826112fd565b9050919050565b6113298161130f565b82525050565b5f61133a8383611320565b60208301905092915050565b5f602082019050919050565b5f61135c82611293565b611366818561129d565b9350611371836112ad565b805f5b838110156113a1578151611388888261132f565b975061139383611346565b925050600181019050611374565b5085935050505092915050565b5f608083015f8301516113c35f8601826111fa565b50602083015184820360208601526113db828261125b565b915050604083015184820360408601526113f5828261125b565b9150506060830151848203606086015261140f8282611352565b9150508091505092915050565b5f6020820190508181035f83015261143481846113ae565b905092915050565b61144581611194565b82525050565b5f60208201905061145e5f83018461143c565b92915050565b60048110611470575f80fd5b50565b5f8135905061148181611464565b92915050565b5f6020828403121561149c5761149b61116d565b5b5f6114a984828501611473565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6114e683836111fa565b60208301905092915050565b5f602082019050919050565b5f611508826114b2565b61151281856114bc565b935061151d836114cc565b805f5b8381101561154d57815161153488826114db565b975061153f836114f2565b925050600181019050611520565b5085935050505092915050565b5f6020820190508181035f83015261157281846114fe565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6115b88261124b565b810181811067ffffffffffffffff821117156115d7576115d6611582565b5b80604052505050565b5f6115e9611164565b90506115f582826115af565b919050565b5f67ffffffffffffffff82111561161457611613611582565b5b61161d8261124b565b9050602081019050919050565b828183375f83830152505050565b5f61164a611645846115fa565b6115e0565b9050828152602081018484840111156116665761166561157e565b5b61167184828561162a565b509392505050565b5f82601f83011261168d5761168c61157a565b5b813561169d848260208601611638565b91505092915050565b5f67ffffffffffffffff8211156116c0576116bf611582565b5b602082029050602081019050919050565b5f80fd5b5f6116e76116e2846116a6565b6115e0565b9050808382526020820190506020840283018581111561170a576117096116d1565b5b835b81811015611733578061171f8882611473565b84526020840193505060208101905061170c565b5050509392505050565b5f82601f8301126117515761175061157a565b5b81356117618482602086016116d5565b91505092915050565b5f805f606084860312156117815761178061116d565b5b5f84013567ffffffffffffffff81111561179e5761179d611171565b5b6117aa86828701611679565b935050602084013567ffffffffffffffff8111156117cb576117ca611171565b5b6117d786828701611679565b925050604084013567ffffffffffffffff8111156117f8576117f7611171565b5b6118048682870161173d565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061185257607f821691505b6020821081036118655761186461180e565b5b50919050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6118d5602e8361186b565b91506118e08261187b565b604082019050919050565b5f6020820190508181035f830152611902816118c9565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61194161193c61193784611909565b61191e565b611912565b9050919050565b61195181611927565b82525050565b5f60208201905061196a5f830184611948565b92915050565b7f55736572206d75737420657869737400000000000000000000000000000000005f82015250565b5f6119a4600f8361186b565b91506119af82611970565b602082019050919050565b5f6020820190508181035f8301526119d181611998565b9050919050565b7f55736572206973206e6f742070617274206f662074686174206c6973740000005f82015250565b5f611a0c601d8361186b565b9150611a17826119d8565b602082019050919050565b5f6020820190508181035f830152611a3981611a00565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a8082611a40565b9150611a8b83611a40565b9250828203905081811115611aa357611aa2611a49565b5b92915050565b5f611ab382611a40565b9150611abe83611a40565b9250828201905080821115611ad657611ad5611a49565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611b1382611a40565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b4557611b44611a49565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f5573657220697320616c72656164792070617274206f662074686174206c69735f8201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b5f611bd760218361186b565b9150611be282611b7d565b604082019050919050565b5f6020820190508181035f830152611c0481611bcb565b9050919050565b7f55736572206d7573742068617665207468617420726f6c6500000000000000005f82015250565b5f611c3f60188361186b565b9150611c4a82611c0b565b602082019050919050565b5f6020820190508181035f830152611c6c81611c33565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ccf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611c94565b611cd98683611c94565b95508019841693508086168417925050509392505050565b5f611d0b611d06611d0184611a40565b61191e565b611a40565b9050919050565b5f819050919050565b611d2483611cf1565b611d38611d3082611d12565b848454611ca0565b825550505050565b5f90565b611d4c611d40565b611d57818484611d1b565b505050565b5b81811015611d7a57611d6f5f82611d44565b600181019050611d5d565b5050565b601f821115611dbf57611d9081611c73565b611d9984611c85565b81016020851015611da8578190505b611dbc611db485611c85565b830182611d5c565b50505b505050565b5f82821c905092915050565b5f611ddf5f1984600802611dc4565b1980831691505092915050565b5f611df78383611dd0565b9150826002028217905092915050565b611e1082611209565b67ffffffffffffffff811115611e2957611e28611582565b5b611e33825461183b565b611e3e828285611d7e565b5f60209050601f831160018114611e6f575f8415611e5d578287015190505b611e678582611dec565b865550611ece565b601f198416611e7d86611c73565b5f5b82811015611ea457848901518255600182019150602085019450602081019050611e7f565b86831015611ec15784890151611ebd601f891682611dd0565b8355505b6001600288020188555050505b505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611f3060268361186b565b9150611f3b82611ed6565b604082019050919050565b5f6020820190508181035f830152611f5d81611f24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611f9860208361186b565b9150611fa382611f64565b602082019050919050565b5f6020820190508181035f830152611fc581611f8c565b905091905056fea26469706673582212202ad3a9ed2b779db7b64f8c5c2748e8654fcdc1b2d92243d639bc20f410abdfdf64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610091575f3560e01c8063a15dcc8a11610064578063a15dcc8a146100f7578063a7f96f0614610127578063aeb5ec0114610143578063ebbbca271461015f578063f2fde38b1461018f57610091565b80636f77926b14610095578063715018a6146100c55780638129fc1c146100cf5780638da5cb5b146100d9575b5f80fd5b6100af60048036038101906100aa91906111cf565b6101ab565b6040516100bc919061141c565b60405180910390f35b6100cd6103ff565b005b6100d7610412565b005b6100e1610547565b6040516100ee919061144b565b60405180910390f35b610111600480360381019061010c9190611487565b61056e565b60405161011e919061155a565b60405180910390f35b610141600480360381019061013c9190611487565b61062e565b005b61015d60048036038101906101589190611487565b610932565b005b6101796004803603810190610174919061176a565b610b2d565b604051610186919061141c565b60405180910390f35b6101a960048036038101906101a491906111cf565b610c48565b005b6101b361105b565b60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060800160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201805461025f9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461028b9061183b565b80156102d65780601f106102ad576101008083540402835291602001916102d6565b820191905f5260205f20905b8154815290600101906020018083116102b957829003601f168201915b505050505081526020016002820180546102ef9061183b565b80601f016020809104026020016040519081016040528092919081815260200182805461031b9061183b565b80156103665780601f1061033d57610100808354040283529160200191610366565b820191905f5260205f20905b81548152906001019060200180831161034957829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156103ef57602002820191905f5260205f20905f905b82829054906101000a900460ff1660038111156103ca576103c96112bc565b5b815260200190600101906020825f010492830192600103820291508084116103aa5790505b5050505050815250509050919050565b610407610cca565b6104105f610d48565b565b5f8060159054906101000a900460ff16159050808015610443575060015f60149054906101000a900460ff1660ff16105b80610471575061045230610e09565b158015610470575060015f60149054906101000a900460ff1660ff16145b5b6104b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a7906118eb565b60405180910390fd5b60015f60146101000a81548160ff021916908360ff16021790555080156104ec5760015f60156101000a81548160ff0219169083151502179055505b8015610544575f8060156101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161053b9190611957565b60405180910390a15b50565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060025f836003811115610586576105856112bc565b5b6003811115610598576105976112bc565b5b81526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561062257602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116105d9575b50505050509050919050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036106fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f1906119ba565b60405180910390fd5b5f806107068332610e2b565b915091508061074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190611a22565b60405180910390fd5b5f8290505b600160025f866003811115610767576107666112bc565b5b6003811115610779576107786112bc565b5b81526020019081526020015f20805490506107949190611a76565b8110156108b55760025f8560038111156107b1576107b06112bc565b5b60038111156107c3576107c26112bc565b5b81526020019081526020015f206001826107dd9190611aa9565b815481106107ee576107ed611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f86600381111561082c5761082b6112bc565b5b600381111561083e5761083d6112bc565b5b81526020019081526020015f20828154811061085d5761085c611adc565b5b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806108ad90611b09565b91505061074f565b5060025f8460038111156108cc576108cb6112bc565b5b60038111156108de576108dd6112bc565b5b81526020019081526020015f208054806108fb576108fa611b50565b5b600190038181905f5260205f20015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055505050565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036109fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f5906119ba565b60405180910390fd5b5f610a098232610e2b565b9150508015610a4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4490611bed565b60405180910390fd5b610a578232610f41565b610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d90611c55565b60405180910390fd5b60025f836003811115610aac57610aab6112bc565b5b6003811115610abe57610abd6112bc565b5b81526020019081526020015f2032908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b3561105b565b5f60405180608001604052803273ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481525090508060015f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610c069190611e07565b506040820151816002019081610c1c9190611e07565b506060820151816003019080519060200190610c39929190611098565b50905050809150509392505050565b610c50610cca565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb590611f46565b60405180910390fd5b610cc781610d48565b50565b610cd2611054565b73ffffffffffffffffffffffffffffffffffffffff16610cf0610547565b73ffffffffffffffffffffffffffffffffffffffff1614610d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3d90611fae565b60405180910390fd5b565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f805f805f5b60025f886003811115610e4757610e466112bc565b5b6003811115610e5957610e586112bc565b5b81526020019081526020015f2080549050811015610f31578573ffffffffffffffffffffffffffffffffffffffff1660025f896003811115610e9e57610e9d6112bc565b5b6003811115610eb057610eaf6112bc565b5b81526020019081526020015f208281548110610ecf57610ece611adc565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f1e5780925060019150610f31565b8080610f2990611b09565b915050610e31565b5081819350935050509250929050565b5f805f90505f5b60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018054905081101561104957846003811115610fa657610fa56112bc565b5b60015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206003018281548110610ff857610ff7611adc565b5b905f5260205f2090602091828204019190069054906101000a900460ff166003811115611028576110276112bc565b5b036110365760019150611049565b808061104190611b09565b915050610f48565b508091505092915050565b5f33905090565b60405180608001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160608152602001606081525090565b828054828255905f5260205f2090601f01602090048101928215611138579160200282015f5b8382111561110a57835183826101000a81548160ff021916908360038111156110ea576110e96112bc565b5b021790555092602001926001016020815f010492830192600103026110be565b80156111365782816101000a81549060ff02191690556001016020815f0104928301926001030261110a565b505b5090506111459190611149565b5090565b5b80821115611160575f815f90555060010161114a565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61119e82611175565b9050919050565b6111ae81611194565b81146111b8575f80fd5b50565b5f813590506111c9816111a5565b92915050565b5f602082840312156111e4576111e361116d565b5b5f6111f1848285016111bb565b91505092915050565b61120381611194565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611240578082015181840152602081019050611225565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61126582611209565b61126f8185611213565b935061127f818560208601611223565b6112888161124b565b840191505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600481106112fa576112f96112bc565b5b50565b5f81905061130a826112e9565b919050565b5f611319826112fd565b9050919050565b6113298161130f565b82525050565b5f61133a8383611320565b60208301905092915050565b5f602082019050919050565b5f61135c82611293565b611366818561129d565b9350611371836112ad565b805f5b838110156113a1578151611388888261132f565b975061139383611346565b925050600181019050611374565b5085935050505092915050565b5f608083015f8301516113c35f8601826111fa565b50602083015184820360208601526113db828261125b565b915050604083015184820360408601526113f5828261125b565b9150506060830151848203606086015261140f8282611352565b9150508091505092915050565b5f6020820190508181035f83015261143481846113ae565b905092915050565b61144581611194565b82525050565b5f60208201905061145e5f83018461143c565b92915050565b60048110611470575f80fd5b50565b5f8135905061148181611464565b92915050565b5f6020828403121561149c5761149b61116d565b5b5f6114a984828501611473565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6114e683836111fa565b60208301905092915050565b5f602082019050919050565b5f611508826114b2565b61151281856114bc565b935061151d836114cc565b805f5b8381101561154d57815161153488826114db565b975061153f836114f2565b925050600181019050611520565b5085935050505092915050565b5f6020820190508181035f83015261157281846114fe565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6115b88261124b565b810181811067ffffffffffffffff821117156115d7576115d6611582565b5b80604052505050565b5f6115e9611164565b90506115f582826115af565b919050565b5f67ffffffffffffffff82111561161457611613611582565b5b61161d8261124b565b9050602081019050919050565b828183375f83830152505050565b5f61164a611645846115fa565b6115e0565b9050828152602081018484840111156116665761166561157e565b5b61167184828561162a565b509392505050565b5f82601f83011261168d5761168c61157a565b5b813561169d848260208601611638565b91505092915050565b5f67ffffffffffffffff8211156116c0576116bf611582565b5b602082029050602081019050919050565b5f80fd5b5f6116e76116e2846116a6565b6115e0565b9050808382526020820190506020840283018581111561170a576117096116d1565b5b835b81811015611733578061171f8882611473565b84526020840193505060208101905061170c565b5050509392505050565b5f82601f8301126117515761175061157a565b5b81356117618482602086016116d5565b91505092915050565b5f805f606084860312156117815761178061116d565b5b5f84013567ffffffffffffffff81111561179e5761179d611171565b5b6117aa86828701611679565b935050602084013567ffffffffffffffff8111156117cb576117ca611171565b5b6117d786828701611679565b925050604084013567ffffffffffffffff8111156117f8576117f7611171565b5b6118048682870161173d565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061185257607f821691505b6020821081036118655761186461180e565b5b50919050565b5f82825260208201905092915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c7265615f8201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b5f6118d5602e8361186b565b91506118e08261187b565b604082019050919050565b5f6020820190508181035f830152611902816118c9565b9050919050565b5f819050919050565b5f60ff82169050919050565b5f819050919050565b5f61194161193c61193784611909565b61191e565b611912565b9050919050565b61195181611927565b82525050565b5f60208201905061196a5f830184611948565b92915050565b7f55736572206d75737420657869737400000000000000000000000000000000005f82015250565b5f6119a4600f8361186b565b91506119af82611970565b602082019050919050565b5f6020820190508181035f8301526119d181611998565b9050919050565b7f55736572206973206e6f742070617274206f662074686174206c6973740000005f82015250565b5f611a0c601d8361186b565b9150611a17826119d8565b602082019050919050565b5f6020820190508181035f830152611a3981611a00565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a8082611a40565b9150611a8b83611a40565b9250828203905081811115611aa357611aa2611a49565b5b92915050565b5f611ab382611a40565b9150611abe83611a40565b9250828201905080821115611ad657611ad5611a49565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611b1382611a40565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b4557611b44611a49565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b7f5573657220697320616c72656164792070617274206f662074686174206c69735f8201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b5f611bd760218361186b565b9150611be282611b7d565b604082019050919050565b5f6020820190508181035f830152611c0481611bcb565b9050919050565b7f55736572206d7573742068617665207468617420726f6c6500000000000000005f82015250565b5f611c3f60188361186b565b9150611c4a82611c0b565b602082019050919050565b5f6020820190508181035f830152611c6c81611c33565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ccf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611c94565b611cd98683611c94565b95508019841693508086168417925050509392505050565b5f611d0b611d06611d0184611a40565b61191e565b611a40565b9050919050565b5f819050919050565b611d2483611cf1565b611d38611d3082611d12565b848454611ca0565b825550505050565b5f90565b611d4c611d40565b611d57818484611d1b565b505050565b5b81811015611d7a57611d6f5f82611d44565b600181019050611d5d565b5050565b601f821115611dbf57611d9081611c73565b611d9984611c85565b81016020851015611da8578190505b611dbc611db485611c85565b830182611d5c565b50505b505050565b5f82821c905092915050565b5f611ddf5f1984600802611dc4565b1980831691505092915050565b5f611df78383611dd0565b9150826002028217905092915050565b611e1082611209565b67ffffffffffffffff811115611e2957611e28611582565b5b611e33825461183b565b611e3e828285611d7e565b5f60209050601f831160018114611e6f575f8415611e5d578287015190505b611e678582611dec565b865550611ece565b601f198416611e7d86611c73565b5f5b82811015611ea457848901518255600182019150602085019450602081019050611e7f565b86831015611ec15784890151611ebd601f891682611dd0565b8355505b6001600288020188555050505b505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611f3060268361186b565b9150611f3b82611ed6565b604082019050919050565b5f6020820190508181035f830152611f5d81611f24565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f611f9860208361186b565b9150611fa382611f64565b602082019050919050565b5f6020820190508181035f830152611fc581611f8c565b905091905056fea26469706673582212202ad3a9ed2b779db7b64f8c5c2748e8654fcdc1b2d92243d639bc20f410abdfdf64736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + } + }, + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getUser(address)": { + "notice": "Users" + }, + "initialize()": { + "notice": "Init" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 506, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_initialized", + "offset": 20, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "_initializing", + "offset": 21, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 5977, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "users", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(User)6318_storage)" + }, + { + "astId": 5983, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "usersByType", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_enum(ServiceType)6295,t_array(t_address)dyn_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_enum(ServiceType)6295)dyn_storage": { + "base": "t_enum(ServiceType)6295", + "encoding": "dynamic_array", + "label": "enum SharedStructs.ServiceType[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_enum(ServiceType)6295": { + "encoding": "inplace", + "label": "enum SharedStructs.ServiceType", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(User)6318_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct SharedStructs.User)", + "numberOfBytes": "32", + "value": "t_struct(User)6318_storage" + }, + "t_mapping(t_enum(ServiceType)6295,t_array(t_address)dyn_storage)": { + "encoding": "mapping", + "key": "t_enum(ServiceType)6295", + "label": "mapping(enum SharedStructs.ServiceType => address[])", + "numberOfBytes": "32", + "value": "t_array(t_address)dyn_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(User)6318_storage": { + "encoding": "inplace", + "label": "struct SharedStructs.User", + "members": [ + { + "astId": 6309, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "userAddress", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6311, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "metadataCID", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 6313, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "url", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 6317, + "contract": "contracts/LilypadUsers.sol:LilypadUsers", + "label": "roles", + "offset": 0, + "slot": "3", + "type": "t_array(t_enum(ServiceType)6295)dyn_storage" + } + ], + "numberOfBytes": "128" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/hardhat/deployments/sepolia/solcInputs/26a3d6e19028b7f1dccb6c7997bc34c1.json b/hardhat/deployments/sepolia/solcInputs/26a3d6e19028b7f1dccb6c7997bc34c1.json new file mode 100644 index 00000000..7b4a1901 --- /dev/null +++ b/hardhat/deployments/sepolia/solcInputs/26a3d6e19028b7f1dccb6c7997bc34c1.json @@ -0,0 +1,122 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC20.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC20 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * IMPORTANT: This contract does not include public pause and unpause functions. In\n * addition to inheriting this contract, you must define both functions, invoking the\n * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate\n * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will\n * make the contract unpausable.\n */\nabstract contract ERC20Pausable is ERC20, Pausable {\n /**\n * @dev See {ERC20-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {\n super._beforeTokenTransfer(from, to, amount);\n\n require(!paused(), \"ERC20Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "contracts/ControllerOwnable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// as well as being ownable (i.e. our admin wallet)\n// this contract has a modifier called onlyController\n// it works the same way as Ownable but only the Owner\n// can change the controller address so it gives us a way of\n// re-pointing contracts if needed\ncontract ControllerOwnable is Ownable {\n\n // the address of the controller that is allowed to call functions\n address private controllerAddress;\n\n // used to \"freeze\" the controller address - even the admin cannot\n // change it from this point onwards\n bool private canChangeControllerAddress = true;\n\n modifier onlyController() {\n _checkControllerAccess();\n _;\n }\n\n function _checkControllerAccess() internal view virtual returns (bool) {\n require(controllerAddress != address(0), \"ControllerOwnable: Controller address must be defined\");\n require(_msgSender() == controllerAddress, \"ControllerOwnable: Only the controller can call this method\");\n return true;\n }\n\n function setControllerAddress(address _controllerAddress) public onlyOwner {\n require(_controllerAddress != address(0), \"ControllerOwnable: Controller address must be defined\");\n require(canChangeControllerAddress, \"ControllerOwnable: canChangeControllerAddress is disabled\");\n controllerAddress = _controllerAddress;\n }\n\n function getControllerAddress() public view returns (address) {\n return controllerAddress;\n }\n\n function disableChangeControllerAddress() public onlyOwner {\n canChangeControllerAddress = false;\n }\n}\n" + }, + "contracts/ExampleClient.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ILilypadJobManager.sol\";\nimport \"./ILilypadJobClient.sol\";\n\ncontract ExampleClient is Ownable, Initializable, ILilypadJobClient {\n\n address private jobManagerAddress;\n ILilypadJobManager private jobManagerContract;\n\n mapping(uint256 => string) private jobResults;\n\n event JobCreated(\n uint256 id,\n string message\n );\n\n event JobCompleted(\n uint256 id,\n string dealId,\n string dataId\n );\n\n function initialize(address _jobManagerAddress) public initializer {\n setJobManagerAddress(_jobManagerAddress);\n }\n\n function setJobManagerAddress(address _jobManagerAddress) public onlyOwner {\n require(_jobManagerAddress != address(0), \"Job manager address\");\n jobManagerAddress = _jobManagerAddress;\n jobManagerContract = ILilypadJobManager(jobManagerAddress);\n }\n\n function getJobResult(uint256 _jobID) public view returns (string memory) {\n return jobResults[_jobID];\n }\n\n function runCowsay(\n string memory message\n ) public {\n string[] memory inputs = new string[](1);\n inputs[0] = string(abi.encodePacked(\"Message=\", message));\n uint256 id = jobManagerContract.runJob(\n \"cowsay:v0.0.1\",\n inputs,\n msg.sender\n );\n\n emit JobCreated(\n id,\n message\n );\n }\n\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) public override {\n jobResults[id] = dataId;\n emit JobCompleted(\n id,\n dealId,\n dataId\n );\n }\n}\n" + }, + "contracts/ILilypadController.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadController {\n\n function agree(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) external returns (SharedStructs.Agreement memory);\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) external;\n\n function acceptResult(\n string memory dealId\n ) external;\n \n function checkResult(\n string memory dealId\n ) external;\n\n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n\n function timeoutAgree(\n string memory dealId\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId\n ) external;\n \n function timeoutMediateResult(\n string memory dealId\n ) external;\n}\n" + }, + "contracts/ILilypadJobClient.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\n// a smart contract that is running a job\n// it will call the IOnChainJobManager with it's job\n// which will end up with the resultsAdded function being called by the manager\ninterface ILilypadJobClient {\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) external;\n}\n" + }, + "contracts/ILilypadJobManager.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadJobClient.sol\";\n\n// the smart contract that is responsible for handling the life\n// cycle of a job - it will pay the registered solver to manage the job\n// this is the simple implementation - later we can implement the whole protocol\n// where the calling smart contract can decide if it wants to agree to a resource offer\n// and accept results\ninterface ILilypadJobManager is ILilypadJobClient {\n function runJob(\n string memory module,\n string[] memory inputs,\n address payee\n ) external returns (uint256);\n}\n" + }, + "contracts/ILilypadMediation.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\n// this is our controller contract\n// it will be called by the mediation handler once a decision has been reached\ninterface ILilypadMediationRequester {\n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n}\n\n// this is the contract that will handle mediating a deal\ninterface ILilypadMediationHandler {\n function mediationRequest(\n SharedStructs.Deal memory deal \n ) external; \n}\n" + }, + "contracts/ILilypadPayments.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\ninterface ILilypadPayments {\n\n /**\n * Init\n */\n\n function setTokenAddress(\n address _tokenAddress\n ) external;\n\n /**\n * Agreements\n */\n function agreeResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) external;\n\n function agreeJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n /**\n * Results\n */\n\n function addResult(\n string memory dealId,\n address resourceProvider,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function acceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function checkResult(\n string memory dealId,\n address jobCreator,\n uint256 timeoutCollateral,\n uint256 mediationFee\n ) external;\n\n /**\n * Mediation\n */\n\n function mediationAcceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n\n function mediationRejectResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n\n /**\n * Timeouts\n */\n\n function timeoutAgreeRefundResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutAgreeRefundJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) external;\n\n function timeoutMediateResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) external;\n \n}\n" + }, + "contracts/ILilypadStorage.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadStorage {\n \n /**\n * Deals\n */\n\n function getDeal(\n string memory dealId\n ) external returns (SharedStructs.Deal memory);\n\n function getDealsForParty(\n address party\n ) external returns (uint256[] memory);\n\n function ensureDeal(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) external returns (SharedStructs.Deal memory);\n\n /**\n * Agreements\n */\n\n function getAgreement(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n \n function agreeResourceProvider(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n\n function agreeJobCreator(\n string memory dealId\n ) external returns (SharedStructs.Agreement memory);\n \n /**\n * Post Results\n */\n\n function getResult(\n string memory dealId\n ) external returns (SharedStructs.Result memory);\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) external returns (SharedStructs.Result memory);\n\n /**\n * Judge Results\n */\n\n function acceptResult(\n string memory dealId\n ) external;\n\n function checkResult(\n string memory dealId\n ) external;\n\n /**\n * Mediation\n */\n \n function mediationAcceptResult(\n string memory dealId\n ) external;\n\n function mediationRejectResult(\n string memory dealId\n ) external;\n\n /**\n * Timeouts\n */\n function timeoutAgree(\n string memory dealId\n ) external;\n\n function timeoutSubmitResult(\n string memory dealId\n ) external;\n\n function timeoutJudgeResult(\n string memory dealId\n ) external;\n\n function timeoutMediateResult(\n string memory dealId\n ) external;\n\n /**\n * Costings\n */\n\n function getJobCost(\n string memory dealId\n ) external returns (uint256);\n\n function getResultsCollateral(\n string memory dealId\n ) external returns (uint256);\n \n /**\n * Checkers\n */\n\n function hasDeal(\n string memory dealId\n ) external returns (bool);\n\n function isState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) external returns (bool);\n \n}\n" + }, + "contracts/ILilypadToken.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface ILilypadToken is IERC20 {\n function escrowBalanceOf(\n address _address\n ) external returns (uint256);\n\n function payEscrow(\n uint256 amount\n ) external returns (bool);\n\n function refundEscrow(\n address toAddress,\n uint256 amount\n ) external returns (bool);\n\n function payJob(\n address fromAddress,\n address toAddress,\n uint256 amount\n ) external returns (bool);\n\n function slashEscrow(\n address slashedAddress,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "contracts/ILilypadUsers.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./SharedStructs.sol\";\n\ninterface ILilypadUsers {\n\n /**\n * Users\n */\n\n function getUser(\n address userAddress\n ) external returns (SharedStructs.User memory);\n\n function updateUser(\n string memory metadataCID,\n string memory url,\n SharedStructs.ServiceType[] memory roles\n ) external returns (SharedStructs.User memory);\n\n // add the given user to a list of service types\n // that can be easily discovered (e.g. how to list the solvers)\n function addUserToList(\n SharedStructs.ServiceType serviceType\n ) external;\n\n function removeUserFromList(\n SharedStructs.ServiceType serviceType\n ) external;\n\n function showUsersInList(\n SharedStructs.ServiceType serviceType\n ) external returns (address[] memory);\n \n}\n" + }, + "contracts/LilypadController.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadController.sol\";\nimport \"./ILilypadStorage.sol\";\nimport \"./ILilypadPayments.sol\";\nimport \"./ILilypadMediation.sol\";\n\ncontract LilypadController is ILilypadController, Ownable, Initializable {\n\n /**\n * Types\n */\n \n address private storageAddress;\n address private userAddress;\n address private paymentsAddress;\n address private mediationAddress;\n address private jobCreatorAddress;\n\n ILilypadStorage private storageContract;\n ILilypadPayments private paymentsContract;\n ILilypadMediationHandler private mediationContract;\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _storageAddress,\n address _usersAddress,\n address _paymentsAddress,\n address _mediationAddress,\n address _jobCreatorAddress\n ) public initializer {\n setStorageAddress(_storageAddress);\n setUsersAddress(_usersAddress);\n setPaymentsAddress(_paymentsAddress);\n setMediationAddress(_mediationAddress);\n setJobCreatorAddress(_jobCreatorAddress);\n }\n\n function setStorageAddress(address _storageAddress) public onlyOwner {\n require(_storageAddress != address(0), \"Storage address\");\n storageAddress = _storageAddress;\n storageContract = ILilypadStorage(storageAddress);\n }\n\n function getStorageAddress() public view returns(address) {\n return storageAddress;\n }\n\n function setUsersAddress(address _usersAddress) public onlyOwner {\n require(_usersAddress != address(0), \"Users address\");\n userAddress = _usersAddress;\n }\n\n function getUsersAddress() public view returns(address) {\n return userAddress;\n }\n\n function setPaymentsAddress(address _paymentsAddress) public onlyOwner {\n require(_paymentsAddress != address(0), \"Payments address\");\n paymentsAddress = _paymentsAddress;\n paymentsContract = ILilypadPayments(_paymentsAddress);\n }\n\n function getPaymentsAddress() public view returns(address) {\n return paymentsAddress;\n }\n\n function setMediationAddress(address _mediationAddress) public onlyOwner {\n require(_mediationAddress != address(0), \"Mediation address\");\n mediationAddress = _mediationAddress;\n mediationContract = ILilypadMediationHandler(_mediationAddress);\n }\n\n function getMediationAddress() public view returns(address) {\n return mediationAddress;\n }\n\n function setJobCreatorAddress(address _jobCreatorAddress) public onlyOwner {\n require(_jobCreatorAddress != address(0), \"JobCreator address\");\n jobCreatorAddress = _jobCreatorAddress;\n }\n\n function getJobCreatorAddress() public view returns(address) {\n return jobCreatorAddress;\n }\n\n /**\n * Agreements\n */\n\n // * create the deal if not exists\n // * otherwise compare the values to ensure 2 sided agreement\n // * check the RP or JC is calling this\n // * if RP:\n // * mark the deal as RP agreed\n // * pay in the timeout collateral\n // * if JC:\n // * mark the deal as JC agreed\n // * pay in the payment collateral and timeout collateral\n // * if both sides have agreed then mark the deal as agreed\n // * emit the event\n function agree(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) public override returns (SharedStructs.Agreement memory) {\n SharedStructs.Deal memory deal = storageContract.ensureDeal(\n dealId,\n members,\n timeouts,\n pricing\n );\n bool isResourceProvider = tx.origin == deal.members.resourceProvider;\n bool isJobCreator = tx.origin == deal.members.jobCreator;\n require(isResourceProvider || isJobCreator, \"Only RP / JC\");\n\n if(isResourceProvider) {\n storageContract.agreeResourceProvider(dealId);\n paymentsContract.agreeResourceProvider(\n dealId,\n deal.members.resourceProvider,\n deal.timeouts.submitResults.collateral\n );\n }\n else if(isJobCreator) {\n storageContract.agreeJobCreator(dealId);\n paymentsContract.agreeJobCreator(\n dealId,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n // the JC paus the judge results collateral\n deal.timeouts.judgeResults.collateral\n );\n }\n return storageContract.getAgreement(dealId);\n }\n\n /**\n * Results\n */\n\n // * check the RP is calling this\n // * mark the deal as results submitted\n // * calculate the cost of the job\n // * calculate the job collateral based on the multiple\n // * work out the difference between the timeout and results collateral\n // * pay the difference into / out of the contract to the RP\n // * emit the event\n function addResult(\n string memory dealId,\n string memory resultsId,\n // this is the CID of the actual data\n // otherwise onchain clients cannot know the actual data they want to fetch\n string memory dataId,\n uint256 instructionCount\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.resourceProvider == tx.origin, \"Only RP\");\n\n storageContract.addResult(\n dealId,\n resultsId,\n dataId,\n instructionCount\n );\n\n // how many multiple of the job cost must the RP put up as collateral\n // we need to do this after having added the result otherwise\n // we don't know the instruction count\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n paymentsContract.addResult(\n dealId,\n deal.members.resourceProvider,\n resultsCollateral,\n // this is the RP adding a results so they get their submit results timeout collateral back\n deal.timeouts.submitResults.collateral\n );\n }\n\n // * check the JC is calling this\n // * check we are in Submitted state\n // * mark the deal as results accepted\n // * calculate the cost of the job\n // * deduct the cost of the job from the JC payment collateral\n // * pay the RP the cost of the job\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the cost\n // * refund the JC the timeout collateral\n function acceptResult(\n string memory dealId\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n \n uint256 jobCost = storageContract.getJobCost(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.acceptResult(dealId);\n paymentsContract.acceptResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n jobCost,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n // this is the JC judging their result so they get their timeout collateral back\n deal.timeouts.judgeResults.collateral\n );\n }\n\n // * check the JC is calling this\n // * check we are in Submitted state\n // * check the mediator is in the list of RP trusted mediators\n // * mark the deal as results checked\n // * charge the JC the mediation fee\n // * refund the JC the timeout collateral\n // * emit the Mediation event so the mediator kicks in\n function checkResult(\n string memory dealId\n ) public override {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n\n // this function will require that the mediator is in the RP's list of trusted mediators\n storageContract.checkResult(dealId);\n paymentsContract.checkResult(\n dealId,\n deal.members.jobCreator,\n // this is the JC judging their result so they get their timeout collateral back\n deal.timeouts.judgeResults.collateral,\n deal.pricing.mediationFee\n );\n\n // trigger the mediation process by calling the contract\n mediationContract.mediationRequest(deal);\n }\n\n /**\n * Mediation\n */\n\n // the mediator calls this to say that the resource provider did the correct job\n // * check the state is ResultsChecked\n // * check the mediator is calling this\n // * mark the deal as mediation accepted\n // * refund the JC what is left from the payment collateral (if any)\n // * pay the RP the cost of the job\n // * refund the RP the results collateral\n // * pay the mediator for mediating\n function mediationAcceptResult(\n string memory dealId\n ) public override {\n require(mediationAddress == _msgSender(), \"Only mediation\");\n require(_canMediateResult(dealId), \"Cannot mediate\");\n \n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n uint256 jobCost = storageContract.getJobCost(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.mediationAcceptResult(dealId);\n paymentsContract.mediationAcceptResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n jobCost,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n\n // the mediator calls this to say that the resource provider did the bad job\n // * check the state is ResultsChecked\n // * check the mediator is calling this\n // * mark the deal as mediation rejected\n // * refund the JC their payment collateral\n // * slash the RP's results collateral\n // * pay the mediator for mediating\n function mediationRejectResult(\n string memory dealId\n ) public override {\n // only the current mediation contract can call this\n require(mediationAddress == _msgSender(), \"Only mediation\");\n require(_canMediateResult(dealId), \"Cannot mediate\");\n\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n\n storageContract.mediationRejectResult(dealId);\n paymentsContract.mediationRejectResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n\n function _canMediateResult(\n string memory dealId \n ) private returns (bool) {\n require(storageContract.isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n return true;\n }\n\n /**\n * Timeouts\n */\n\n function timeoutAgree(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.jobCreator == tx.origin || deal.members.resourceProvider == tx.origin, \"Only JC or RP\");\n require(agreement.state == SharedStructs.AgreementState.DealNegotiating, \"Not correct state\");\n require(block.timestamp > agreement.dealCreatedAt + deal.timeouts.agree.timeout, \"Not timed out\");\n storageContract.timeoutAgree(dealId);\n if (agreement.resourceProviderAgreedAt > 0) {\n // this is an RP refund\n paymentsContract.timeoutAgreeRefundResourceProvider(\n dealId,\n deal.members.resourceProvider,\n deal.timeouts.submitResults.collateral\n );\n } else if (agreement.jobCreatorAgreedAt > 0) {\n // this is an JC refund\n paymentsContract.timeoutAgreeRefundJobCreator(\n dealId,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n deal.timeouts.submitResults.collateral\n );\n }\n }\n\n // the job creator calls this after the timeout has passed and there are no results submitted\n // * check the JC is calling this\n // * mark the deal as timedout\n // * pay back the JC's job collateral\n // * slash the RP's results collateral\n // * emit the event\n function timeoutSubmitResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.jobCreator == tx.origin, \"Only JC\");\n require(agreement.state == SharedStructs.AgreementState.DealAgreed, \"Not correct state\");\n require(block.timestamp > agreement.dealAgreedAt + deal.timeouts.submitResults.timeout, \"Not timed out\");\n storageContract.timeoutSubmitResult(dealId);\n paymentsContract.timeoutSubmitResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n deal.timeouts.submitResults.collateral\n );\n }\n\n // the resource provider calls this after the timeout has passed after submitting results\n // and the job creator has not yet submitted their judgement on those results\n // * check the RP is calling this\n // * mark the deal as timedout\n // * pay back the RP's results collateral\n // * pay the RP the cost of the job\n // * slash the JC's timeout collateral\n // * slash the JC's job collateral\n // * emit the event\n function timeoutJudgeResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.resourceProvider == tx.origin, \"Only RP\");\n require(agreement.state == SharedStructs.AgreementState.ResultsSubmitted, \"Not correct state\");\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \"Not timed out\");\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n storageContract.timeoutJudgeResult(dealId); \n paymentsContract.timeoutJudgeResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n resultsCollateral,\n deal.timeouts.judgeResults.collateral\n );\n }\n\n // either the JC or RP call this after the timeout has passed after results being checked\n // this refunds both the payment and results collateral to both the JC and RP\n // * check the RP or JC is calling this\n // * mark the deal as timedout\n // * pay back the RP's results collateral\n // * pay back the JC's paymnet collateral\n // * emit the event\n function timeoutMediateResult(\n string memory dealId\n ) public override {\n SharedStructs.Deal memory deal = storageContract.getDeal(dealId);\n SharedStructs.Agreement memory agreement = storageContract.getAgreement(dealId);\n require(deal.members.resourceProvider == tx.origin || deal.members.jobCreator == tx.origin, \"Only RP or JC\");\n require(agreement.state == SharedStructs.AgreementState.ResultsChecked, \"Not correct state\");\n require(block.timestamp > agreement.resultsSubmittedAt + deal.timeouts.judgeResults.timeout, \"Not timed out\");\n uint256 resultsCollateral = storageContract.getResultsCollateral(dealId);\n storageContract.timeoutMediateResult(dealId);\n paymentsContract.timeoutMediateResult(\n dealId,\n deal.members.resourceProvider,\n deal.members.jobCreator,\n deal.pricing.paymentCollateral,\n resultsCollateral,\n deal.pricing.mediationFee\n );\n }\n}\n" + }, + "contracts/LilypadMediationRandom.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadMediation.sol\";\n\ncontract LilypadMediationRandom is ControllerOwnable, Initializable {\n\n // keep track of which mediators were choosen for which deals\n mapping(string => address) private mediators;\n\n event MediationRequested(\n string dealId,\n address mediator\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n // this is called by the controller contract\n function mediationRequest(\n SharedStructs.Deal memory deal\n ) public onlyController {\n uint randomIndex = uint(keccak256(abi.encodePacked(block.timestamp, deal.dealId))) % deal.members.mediators.length;\n address mediator = deal.members.mediators[randomIndex];\n require(mediator != address(0), \"mediator cannot be 0x0\");\n mediators[deal.dealId] = mediator;\n emit MediationRequested(deal.dealId, mediator);\n }\n\n function getMediator(\n string memory dealId\n ) public view returns(address) {\n return mediators[dealId];\n }\n\n // call the controller contract as a ILilypadMediationRequester\n function mediationAcceptResult(\n string memory dealId\n ) public {\n // check the tx.origin is the same mediator that was picked\n require(mediators[dealId] != address(0), \"mediator cannot be 0x0\");\n require(mediators[dealId] == tx.origin, \"tx.origin must be the mediator\");\n // call the controller contract\n ILilypadMediationRequester(getControllerAddress()).mediationAcceptResult(dealId);\n }\n\n // call the controller contract as a ILilypadMediationRequester\n function mediationRejectResult(\n string memory dealId\n ) public {\n // check the tx.origin is the same mediator that was picked\n require(mediators[dealId] != address(0), \"mediator cannot be 0x0\");\n require(mediators[dealId] == tx.origin, \"tx.origin must be the mediator\");\n // call the controller contract\n ILilypadMediationRequester(getControllerAddress()).mediationRejectResult(dealId);\n }\n}\n" + }, + "contracts/LilypadOnChainJobCreator.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ILilypadJobManager.sol\";\nimport \"./ILilypadJobClient.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./ILilypadToken.sol\";\n\ncontract LilypadOnChainJobCreator is ILilypadJobManager, ControllerOwnable, Initializable {\n\n // the token contract\n // we check to see what allowance has been granted to be spent on behalf\n // of the customer of a job\n address private tokenAddress;\n ILilypadToken private tokenContract;\n\n // the minimum amount that must be \"approved\" on the smart contract for the solver to spend\n // for it to consider running a job for a client\n // the solver will update this as the market pricing changes\n uint256 public requiredDeposit;\n\n // auto increment job id\n uint256 public nextJobID;\n\n // map of job id onto offer\n mapping(uint256 => SharedStructs.JobOffer) private jobOffers;\n\n event JobAdded(\n uint256 id,\n address calling_contract,\n address payee,\n string module,\n string[] inputs\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _tokenAddress\n ) public initializer {\n setTokenAddress(_tokenAddress);\n nextJobID = 0;\n }\n\n function setTokenAddress(address _tokenAddress) public onlyOwner {\n require(_tokenAddress != address(0), \"Token address\");\n tokenAddress = _tokenAddress;\n tokenContract = ILilypadToken(tokenAddress);\n }\n\n function getTokenAddress() public view returns (address) {\n return tokenAddress;\n }\n\n function setRequiredDeposit(uint256 cost) public onlyController {\n require(cost > 0, \"Min deposit\");\n requiredDeposit = cost;\n }\n\n function getRequiredDeposit() public view returns (uint256) {\n return requiredDeposit;\n }\n\n // called by on-chain clients to make an offer for a job\n // this will return a ticketID which is a unique onchain identifier for the job\n function runJob(\n // what is the module name we are making an offer for\n string memory module,\n // an array of key=value pairs that will be the inputs to the job\n string[] memory inputs,\n // the address of the client who is paying for the job\n // they must have called the increaseAllowance function\n // giving the controller (i.e. solver) permission to spend their tokens\n address payee\n ) public override returns (uint256) {\n // this makes sure that the person paying for the job has\n // already called \"approve\" on the token contract so the solver can\n // work on it's behalf\n require(tokenContract.allowance(payee, getControllerAddress()) >= requiredDeposit, \"Token allowance not enough\");\n\n nextJobID = nextJobID + 1;\n jobOffers[nextJobID] = SharedStructs.JobOffer(\n nextJobID,\n msg.sender,\n payee,\n module,\n inputs\n );\n emit JobAdded(\n nextJobID,\n msg.sender,\n payee,\n module,\n inputs\n );\n\n return nextJobID;\n }\n\n // this is called by the solver once we've got results out of the controller\n // it will call the \"resultsAdded\" function on the original client contract\n function submitResults(\n uint256 id,\n string memory dealId,\n string memory dataId\n ) public onlyController override {\n SharedStructs.JobOffer storage offer = jobOffers[id];\n require(offer.id != 0, \"Job not found\");\n ILilypadJobClient(offer.calling_contract).submitResults(\n id,\n dealId,\n dataId\n );\n }\n}\n" + }, + "contracts/LilypadPayments.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./ILilypadToken.sol\";\nimport \"./ControllerOwnable.sol\";\nimport \"./ILilypadPayments.sol\";\n\n// import \"@openzeppelin/contracts/utils/Strings.sol\";\n// import \"hardhat/console.sol\";\n// console.log(\"ensureDeal\");\n// console.log(Strings.toString(uint256(SharedStructs.AgreementState.DealNegotiating)));\n// console.log(Strings.toString(uint256(agreements[dealId].state)));\n\ncontract LilypadPayments is ControllerOwnable, Initializable {\n\n /**\n * Types\n */\n\n // the address of the LilypadToken contract\n address private tokenAddress;\n ILilypadToken private tokenContract;\n\n // used to cut off upgrades for the remote contract\n bool private canChangeTokenAddress = true;\n\n /**\n * Enums\n */\n enum PaymentReason {\n\n // the money the JC puts up to pay for the job\n PaymentCollateral,\n\n // the money the RP puts up to attest it's results are correct\n ResultsCollateral,\n\n // the money the RP, JC and Mediator all put up to prevent timeouts\n TimeoutCollateral,\n\n // the money the RP gets paid for the job for running it successfully\n JobPayment,\n\n // the money the JC pays the mediator for resolving a dispute\n MediationFee\n }\n\n enum PaymentDirection {\n\n // money flowing into the contract\n // i.e. we GET paid\n PaidIn,\n\n // money paid out to services\n // i.e. we are PAYING\n PaidOut,\n\n // collateral that is locked up being refunded\n Refunded,\n \n // collateral that is locked up being slashed\n Slashed\n }\n\n /**\n * Events\n */\n event Payment(\n string dealId,\n address payee,\n uint256 amount,\n PaymentReason reason,\n PaymentDirection direction\n );\n\n /**\n * Init\n */\n\n // used for debugging\n mapping(address => string) private accountNames;\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize(\n address _tokenAddress\n ) public initializer {\n setTokenAddress(_tokenAddress);\n\n // this is only for debugging\n // accountNames[address(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)] = \"admin\";\n // accountNames[address(0x70997970C51812dc3A010C7d01b50e0d17dc79C8)] = \"faucet\";\n // accountNames[address(0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC)] = \"solver\";\n // accountNames[address(0x90F79bf6EB2c4f870365E785982E1f101E93b906)] = \"mediator\";\n // accountNames[address(0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65)] = \"resource_provider\";\n // accountNames[address(0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc)] = \"job_creator\";\n // accountNames[address(0x976EA74026E726554dB657fA54763abd0C3a0aa9)] = \"directory\";\n }\n\n // the LilypadToken we are calling payinEscrow and payoutEscrow on\n function setTokenAddress(address _tokenAddress) public onlyOwner {\n require(_tokenAddress != address(0), \"LilepadPayments: Token address must be defined\");\n require(canChangeTokenAddress, \"LilypadToken: canChangeTokenAddress is disabled\");\n tokenAddress = _tokenAddress;\n tokenContract = ILilypadToken(_tokenAddress);\n }\n\n function getTokenAddress() public view returns(address) {\n return tokenAddress;\n }\n\n // set for canChangePaymentsAddress\n function disableChangeTokenAddress() public onlyOwner {\n canChangeTokenAddress = false;\n }\n\n /**\n * Controller handlers\n * \n * these methods are called by the controller to wrap various payment\n * scenarios - hence they are all onlyOwner\n */\n\n /**\n * Agreements\n */\n\n // * pay in the timeout collateral\n function agreeResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) public onlyController {\n // we check this here to double check who we are about to charge (the RP)\n // is who signed the TX and so we can take the money\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n _payEscrow(\n dealId,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay in the payment collateral and timeout collateral\n function agreeJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n _payEscrow(\n dealId,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n _payEscrow(\n dealId,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n /**\n * Results\n */\n\n // * pay back the timeout collateral\n // * pay in the results collateral\n function addResult(\n string memory dealId,\n address resourceProvider,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n _payEscrow(\n dealId,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n _refundEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay the RP the job cost\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the job cost\n // * refund the JC the timeout collateral\n function acceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n\n // what if the final job cost is more than the payment collateral?\n // well - we have to cap the job cost at that collateral\n // true - the RP has lost money but they agreed to the deal\n uint256 actualPayment = jobCost;\n uint256 jcRefund = 0;\n if(jobCost > paymentCollateral) {\n actualPayment = paymentCollateral;\n } else {\n jcRefund = paymentCollateral - jobCost;\n }\n\n // pay the RP the actualPayment\n _payOut(\n dealId,\n jobCreator,\n resourceProvider,\n actualPayment,\n PaymentReason.JobPayment\n );\n\n // if the job cost more than the payment collateral then we shold not go negative\n // otherwise we are paying out more than the JC has put in\n //\n // the RP is loosing out a bit here but they agreed to doing the job\n if(jcRefund > 0) {\n _refundEscrow(\n dealId,\n jobCreator,\n jcRefund,\n PaymentReason.PaymentCollateral\n );\n }\n\n // refund the JC timeout collateral\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n\n // refund the RP results collateral\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n // * charge the JC the mediation fee\n // * refund the JC the timeout collateral\n function checkResult(\n string memory dealId,\n address jobCreator,\n uint256 timeoutCollateral,\n uint256 mediationFee\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n \n // the refund of the timeout collateral\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n\n // the payment of the mediation fee\n _payEscrow(\n dealId,\n mediationFee,\n PaymentReason.MediationFee\n );\n }\n\n /**\n * Mediation\n */\n\n // * pay the RP the job cost\n // * refund the RP the results collateral\n // * refund the JC the job collateral minus the job cost\n // * pay the mediator for mediating\n function mediationAcceptResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 jobCost,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n uint256 actualPayment = jobCost;\n uint256 jcRefund = 0;\n if(jobCost > paymentCollateral) {\n actualPayment = paymentCollateral;\n } else {\n jcRefund = paymentCollateral - jobCost;\n }\n \n // pay the RP the job cost from the JC\n _payOut(\n dealId,\n jobCreator,\n resourceProvider,\n actualPayment,\n PaymentReason.JobPayment\n );\n\n // pay the mediator the fee from the JC\n _payOut(\n dealId,\n jobCreator,\n tx.origin,\n mediationFee,\n PaymentReason.MediationFee\n );\n\n // if the job cost more than the payment collateral then we shold not go negative\n // otherwise we are paying out more than the JC has put in\n //\n // the RP is loosing out a bit here but they agreed to doing the job\n if(jcRefund > 0) {\n\n // refund the JC the diff between payment collateral and job cost\n _refundEscrow(\n dealId,\n jobCreator,\n jcRefund,\n PaymentReason.PaymentCollateral\n );\n }\n\n // refund the RP the results collateral\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n // * refund the JC their payment collateral\n // * slash the RP's results collateral\n // * pay the mediator for mediating\n function mediationRejectResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n // refund the JC their payment collateral\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // pay the mediator the fee from the JC\n _payOut(\n dealId,\n jobCreator,\n tx.origin,\n mediationFee,\n PaymentReason.MediationFee\n );\n\n // slash the RP\n _slashEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n }\n\n /**\n * Timeouts\n */\n function timeoutAgreeRefundResourceProvider(\n string memory dealId,\n address resourceProvider,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n function timeoutAgreeRefundJobCreator(\n string memory dealId,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the JC's job collateral\n // * pay back the JC's timeout collateral\n // * slash the RP's results collateral\n function timeoutSubmitResults(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == jobCreator, \"LilypadPayments: Can only be called by the JC\");\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the job collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n \n // the slashing of the timeout collateral for the RP\n _slashEscrow(\n dealId,\n resourceProvider,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the RP's results collateral\n // * pay the RP the cost of the job\n // * slash the JC's timeout collateral\n // * slash the JC's job collateral\n function timeoutJudgeResults(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 resultsCollateral,\n uint256 timeoutCollateral\n ) public onlyController {\n require(tx.origin == resourceProvider, \"LilypadPayments: Can only be called by the RP\");\n // the refund of the results collateral to the RP\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n\n // the slashing of the timeout collateral for the RP\n _slashEscrow(\n dealId,\n jobCreator,\n timeoutCollateral,\n PaymentReason.TimeoutCollateral\n );\n }\n\n // * pay back the RP's results collateral\n // * pay back the JC's payment collateral\n // * pay back the JC's mediation fee\n function timeoutMediateResult(\n string memory dealId,\n address resourceProvider,\n address jobCreator,\n uint256 paymentCollateral,\n uint256 resultsCollateral,\n uint256 mediationFee\n ) public onlyController {\n require(tx.origin == resourceProvider || tx.origin == jobCreator, \"LilypadPayments: Can only be called by the RP or JC\");\n // the refund of the results collateral to the RP\n _refundEscrow(\n dealId,\n resourceProvider,\n resultsCollateral,\n PaymentReason.ResultsCollateral\n );\n\n // the refund of the payment collateral to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n paymentCollateral,\n PaymentReason.PaymentCollateral\n );\n\n // the refund of the mediation fee to the JC\n _refundEscrow(\n dealId,\n jobCreator,\n mediationFee,\n PaymentReason.MediationFee\n );\n }\n\n /**\n * Payment utils\n */\n\n\n function _payEscrow(\n string memory dealId,\n uint256 amount,\n PaymentReason reason\n ) private {\n // we check they have that much in their token balance before moving to tokens to us\n require(tokenContract.balanceOf(tx.origin) >= amount, \"LilypadPayments: Insufficient balance\");\n\n // console.log(\"_payEscrow\");\n // console.log(accountNames[tx.origin]);\n // console.log(amount);\n\n bool success = tokenContract.payEscrow(amount);\n require(success, \"LilypadPayments: Pay escrow failed\");\n\n emit Payment(\n dealId,\n tx.origin,\n amount,\n reason,\n PaymentDirection.PaidIn\n );\n }\n\n function _refundEscrow(\n string memory dealId,\n address toAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_refundEscrow\");\n // console.log(accountNames[toAddress]);\n // console.log(amount);\n\n bool success = tokenContract.refundEscrow(toAddress, amount);\n require(success, \"LilypadPayments: Refund escrow failed\");\n\n emit Payment(\n dealId,\n toAddress,\n amount,\n reason,\n PaymentDirection.Refunded\n );\n }\n\n function _payOut(\n string memory dealId,\n address fromAddress,\n address toAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_payJob\");\n // console.log(accountNames[fromAddress]);\n // console.log(accountNames[toAddress]);\n // console.log(amount);\n\n bool success = tokenContract.payJob(fromAddress, toAddress, amount);\n require(success, \"LilypadPayments: Pay job failed\");\n\n emit Payment(\n dealId,\n toAddress,\n amount,\n reason,\n PaymentDirection.PaidOut\n );\n }\n\n function _slashEscrow(\n string memory dealId,\n address slashedAddress,\n uint256 amount,\n PaymentReason reason\n ) private {\n // console.log(\"_slashEscrow\");\n // console.log(accountNames[slashedAddress]);\n // console.log(amount);\n\n bool success = tokenContract.slashEscrow(slashedAddress, amount);\n require(success, \"LilypadPayments: Slash escrow failed\");\n\n emit Payment(\n dealId,\n slashedAddress,\n amount,\n reason,\n PaymentDirection.Slashed\n );\n }\n}\n" + }, + "contracts/LilypadPaymentsTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadPayments.sol\";\n\ncontract LilypadPaymentsTestable is LilypadPayments {\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadStorage.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ControllerOwnable.sol\";\n\ncontract LilypadStorage is ControllerOwnable, Initializable {\n\n // the address that is allowed to be the msg.sender for the payment functions\n address private controllerAddress;\n\n // used to cut off upgrades for the remote contract\n bool private canChangeControllerAddress = true;\n\n // a map of deal id -> deal\n mapping(string => SharedStructs.Deal) private deals;\n\n // a map of party -> dealid[]\n mapping(address => string[]) private dealsForParty;\n\n // a map of deal id -> agreement\n mapping(string => SharedStructs.Agreement) private agreements;\n\n // a map of deal id -> result\n mapping(string => SharedStructs.Result) private results;\n\n // a map of deal id -> result\n mapping(string => SharedStructs.Result) private mediations;\n\n event DealStateChange(\n string dealId,\n SharedStructs.AgreementState state\n );\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n /**\n * Deals\n */\n\n function getDeal(\n string memory dealId\n ) public view returns (SharedStructs.Deal memory) {\n return deals[dealId];\n }\n\n function getDealsForParty(\n address party\n ) public view returns (string[] memory) {\n return dealsForParty[party];\n }\n\n function checkDealMembers(\n SharedStructs.DealMembers memory members\n ) private pure {\n require(members.resourceProvider != address(0), \"RP missing\");\n require(members.jobCreator != address(0), \"JC missing\");\n require(members.solver != address(0), \"Solver missing\");\n require(members.mediators.length > 0, \"Mediators <= 0\");\n require(members.resourceProvider != members.jobCreator, \"RP / JC same\");\n }\n\n function checkTimeouts(\n SharedStructs.DealTimeouts memory timeouts\n ) private pure {\n // the cost of the agree timeout cannot be > 0 because the whole point is\n // one party has not paid anything into the contract is what has timed out\n require(timeouts.agree.collateral == 0, \"Agree deposit must be 0\");\n // the same is true of the mediation timeout - it's cost cannot be zero\n require(timeouts.mediateResults.collateral == 0, \"Mediate deposit must be 0\");\n }\n\n function compareDealMembers(\n SharedStructs.DealMembers memory members1,\n SharedStructs.DealMembers memory members2\n ) private pure {\n require(members1.resourceProvider == members2.resourceProvider, \"RP\");\n require(members1.jobCreator == members2.jobCreator, \"JC\");\n require(members1.solver == members2.solver, \"Solver\");\n require(members1.mediators.length == members2.mediators.length, \"Mediators\");\n for (uint256 i = 0; i < members1.mediators.length; i++) {\n require(members1.mediators[i] == members2.mediators[i], \"Mediator\");\n }\n }\n\n function compareDealTimeout(\n SharedStructs.DealTimeout memory timeout1,\n SharedStructs.DealTimeout memory timeout2\n ) private pure {\n require(timeout1.timeout == timeout2.timeout, \"Timeout\");\n require(timeout1.collateral == timeout2.collateral, \"Collateral\");\n }\n \n function compareDealTimeouts(\n SharedStructs.DealTimeouts memory timeouts1,\n SharedStructs.DealTimeouts memory timeouts2\n ) private pure {\n compareDealTimeout(timeouts1.agree, timeouts2.agree);\n compareDealTimeout(timeouts1.submitResults, timeouts2.submitResults);\n compareDealTimeout(timeouts1.judgeResults, timeouts2.judgeResults);\n compareDealTimeout(timeouts1.mediateResults, timeouts2.mediateResults);\n }\n\n function compareDealPricing(\n SharedStructs.DealPricing memory pricing1,\n SharedStructs.DealPricing memory pricing2\n ) private pure {\n require(pricing1.instructionPrice == pricing2.instructionPrice, \"Price\");\n require(pricing1.paymentCollateral == pricing2.paymentCollateral, \"Payment\");\n require(pricing1.resultsCollateralMultiple == pricing2.resultsCollateralMultiple, \"Results\");\n require(pricing1.mediationFee == pricing2.mediationFee, \"Mediation\");\n }\n\n function ensureDeal(\n string memory dealId,\n SharedStructs.DealMembers memory members,\n SharedStructs.DealTimeouts memory timeouts,\n SharedStructs.DealPricing memory pricing\n ) public onlyController returns (SharedStructs.Deal memory) {\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \"DealNegotiating\");\n checkDealMembers(members);\n checkTimeouts(timeouts);\n if(hasDeal(dealId)) {\n SharedStructs.Deal memory existingDeal = getDeal(dealId);\n compareDealMembers(existingDeal.members, members);\n compareDealTimeouts(existingDeal.timeouts, timeouts);\n compareDealPricing(existingDeal.pricing, pricing);\n }\n else {\n deals[dealId] = SharedStructs.Deal(\n dealId,\n members,\n timeouts,\n pricing\n );\n dealsForParty[members.resourceProvider].push(dealId);\n dealsForParty[members.jobCreator].push(dealId);\n }\n return deals[dealId];\n }\n\n /**\n * Agreements\n */\n \n function getAgreement(\n string memory dealId\n ) public view returns (SharedStructs.Agreement memory) {\n return agreements[dealId];\n }\n\n function agreeResourceProvider(\n string memory dealId\n ) public onlyController returns (SharedStructs.Agreement memory) {\n require(hasDeal(dealId), \"Deal does not exist\");\n require(agreements[dealId].resourceProviderAgreedAt == 0, \"RP has already agreed\");\n agreements[dealId].resourceProviderAgreedAt = block.timestamp;\n _maybeAgreeDeal(dealId);\n return agreements[dealId];\n }\n\n function agreeJobCreator(\n string memory dealId\n ) public onlyController returns (SharedStructs.Agreement memory) {\n require(hasDeal(dealId), \"Deal does not exist\");\n require(agreements[dealId].jobCreatorAgreedAt == 0, \"JC has already agreed\");\n agreements[dealId].jobCreatorAgreedAt = block.timestamp;\n _maybeAgreeDeal(dealId);\n return agreements[dealId];\n }\n\n /**\n * Post Results\n */\n\n function getResult(\n string memory dealId\n ) public view returns (SharedStructs.Result memory) {\n return results[dealId];\n }\n\n function addResult(\n string memory dealId,\n string memory resultsId,\n string memory dataId,\n uint256 instructionCount\n ) public onlyController returns (SharedStructs.Result memory) {\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n agreements[dealId].resultsSubmittedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsSubmitted);\n results[dealId] = SharedStructs.Result(\n dealId,\n resultsId,\n dataId,\n instructionCount\n );\n return results[dealId];\n }\n\n /**\n * Judge Results\n */\n\n function acceptResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].resultsAcceptedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsAccepted);\n }\n\n function checkResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].resultsCheckedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.ResultsChecked);\n }\n\n /**\n * Mediati:\n */\n\n function mediationAcceptResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].mediationAcceptedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationAccepted);\n }\n\n function mediationRejectResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].mediationRejectedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.MediationRejected);\n }\n\n /**\n * Timeouts\n */\n\n // called because one party submitted a deal and the other party\n // did not agree in time\n function timeoutAgree(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.DealNegotiating), \"DealNegotiating\");\n agreements[dealId].timeoutAgreeAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutAgree);\n }\n\n // called because the JC waited too long for a result to be submitted\n // and wants it's money back\n function timeoutSubmitResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.DealAgreed), \"DealAgreed\");\n agreements[dealId].timeoutSubmitResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutSubmitResults);\n }\n\n // called because the RP waited too long for a judgement of it's results\n // and wants it's money back\n function timeoutJudgeResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsSubmitted), \"ResultsSubmitted\");\n agreements[dealId].timeoutJudgeResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutJudgeResults);\n }\n // called because the RP or JC waited too long for a mediation of it's results\n // and both want their money back\n function timeoutMediateResult(\n string memory dealId\n ) public onlyController {\n require(isState(dealId, SharedStructs.AgreementState.ResultsChecked), \"ResultsChecked\");\n agreements[dealId].timeoutMediateResultsAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.TimeoutMediateResults);\n }\n\n /**\n * Costings\n */\n\n function getJobCost(\n string memory dealId\n ) public view returns (uint256) {\n return deals[dealId].pricing.instructionPrice * results[dealId].instructionCount;\n }\n\n function getResultsCollateral(\nstring memory dealId\n ) public view returns (uint256) {\n return deals[dealId].pricing.resultsCollateralMultiple * getJobCost(dealId);\n }\n\n /**\n * Checkers\n */\n\n function hasDeal(\n string memory dealId\n ) public view returns (bool) {\n return bytes(getDeal(dealId).dealId).length > 0;\n }\n\n function isState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) public view returns (bool) {\n // if we don't have a deal, we should check against DealNegotiating\n // as this is the default state - otherwise it's impossible to check\n // for isState('DealNegotiating')\n if(!hasDeal(dealId)) {\n return state == SharedStructs.AgreementState.DealNegotiating;\n }\n return agreements[dealId].state == state;\n }\n\n /**\n * Utils\n */\n\n function _maybeAgreeDeal(\n string memory dealId\n ) private {\n if(agreements[dealId].resourceProviderAgreedAt != 0 && agreements[dealId].jobCreatorAgreedAt != 0) {\n agreements[dealId].dealAgreedAt = block.timestamp;\n _changeAgreementState(dealId, SharedStructs.AgreementState.DealAgreed);\n } else {\n // this is used so we can know if a party can call an agree timeout trigger\n agreements[dealId].dealCreatedAt = block.timestamp;\n }\n }\n\n function _changeAgreementState(\n string memory dealId,\n SharedStructs.AgreementState state\n ) private {\n agreements[dealId].state = state;\n emit DealStateChange(dealId, state);\n }\n}\n" + }, + "contracts/LilypadStorageTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadStorage.sol\";\n\ncontract LilypadStorageTestable is LilypadStorage {\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadToken.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol\";\nimport \"./ControllerOwnable.sol\";\n\n/*\n standard ERC20 token but with some additional features:\n\n * ControllerOwnable\n * for paying in, we use tx.origin so the actual payee must call the contract\n * for paying out - we use the Controller Ownable feature so only the payments contract\n can pay out from the escrow account\n * escrowBalanceOf\n * get the current escrow balance for an address\n * payEscrow\n * pay into the escrow account\n * refundEscrow\n * get refunded from the escrow account\n * payJob\n * reduce the \"from\" account by X amount\n * actually pay that amount to the \"to\" address\n * slashEscrow\n * reduce the \"slashed\" account by X amount\n\n the escrow functions are designed to be called by the payments contract\n\n * deploy this contract as admin\n * deploy the payments contract as admin and pass this address to it\n * update the ControllerOwnable address of this contract to be the payments contract\n \n now, only the payments contract can call the escrow functions that pay out\n\n */\ncontract LilypadToken is ControllerOwnable, ERC20, ERC20Pausable {\n\n // keep track of the current escrow balance for each address\n mapping(address => uint256) private escrowBalances;\n\n constructor(\n string memory name,\n string memory symbol,\n uint256 initialSupply\n ) ERC20(name, symbol) {\n _mint(msg.sender, initialSupply);\n }\n\n function escrowBalanceOf(\n address _address\n ) public view returns (uint256) {\n return escrowBalances[_address];\n }\n\n // money being paid into the escrow account\n function payEscrow(\n uint256 amount\n ) public returns (bool) {\n // it's important we use tx.origin and not msg.sender here\n // msg.sender will be the payments contract\n // tx.origin will be the user who called the controller -> payments -> token\n // i.e. the account that is actually paying into the escrow address\n _transfer(tx.origin, address(this), amount);\n escrowBalances[tx.origin] += amount;\n return true;\n }\n\n // money being paid back from the escrow account\n function refundEscrow(\n address toAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(toAddress != address(0), \"LilypadToken: toAddress cannot be zero address\");\n require(escrowBalances[toAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[toAddress] -= amount;\n _transfer(address(this), toAddress, amount);\n return true;\n }\n\n // pay the RP account from the JC escrow account\n function payJob(\n address fromAddress,\n address toAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(escrowBalances[fromAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[fromAddress] -= amount;\n _transfer(address(this), toAddress, amount);\n return true;\n }\n\n // the given party has been slashed so the money stays in the contract\n // TODO: what should happen to slashed funds?\n // at the moment we move them to the owner address so they are not locked\n function slashEscrow(\n address slashedAddress,\n uint256 amount\n ) public onlyController returns (bool) {\n require(escrowBalances[slashedAddress] >= amount, \"LilypadToken: not enough funds in escrow\");\n escrowBalances[slashedAddress] -= amount;\n _transfer(address(this), owner(), amount);\n return true;\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Pausable) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" + }, + "contracts/LilypadTokenTestable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"./LilypadToken.sol\";\n\n// a version of LilypadToken that can be called by any address\n// so we can run unit tests\ncontract LilypadTokenTestable is LilypadToken {\n constructor(\n string memory name,\n string memory symbol,\n uint256 initialSupply\n ) LilypadToken(name, symbol, initialSupply) {}\n\n function _checkControllerAccess() internal pure override returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/LilypadUsers.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"./SharedStructs.sol\";\nimport \"./ControllerOwnable.sol\";\n\ncontract LilypadUsers is Ownable, Initializable {\n\n // a map of user address -> user\n mapping(address => SharedStructs.User) private users;\n\n // a map of user type => user address[]\n mapping(SharedStructs.ServiceType => address[]) private usersByType;\n\n /**\n * Init\n */\n\n // https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable\n function initialize() public initializer {\n \n }\n\n /**\n * Users\n */\n\n function getUser(\n address userAddress\n ) public view returns (SharedStructs.User memory) {\n return users[userAddress];\n }\n\n function updateUser(\n string memory metadataCID,\n string memory url,\n SharedStructs.ServiceType[] memory roles\n ) public returns (SharedStructs.User memory) {\n SharedStructs.User memory newUser = SharedStructs.User(\n tx.origin,\n metadataCID,\n url,\n roles\n );\n users[tx.origin] = newUser;\n return newUser;\n }\n\n function addUserToList(\n SharedStructs.ServiceType serviceType\n ) public {\n require(users[tx.origin].userAddress != address(0), \"User must exist\");\n (, bool found) = _getUserListIndex(serviceType, tx.origin);\n require(!found, \"User is already part of that list\");\n require(_doesUserHaveRole(serviceType, tx.origin), \"User must have that role\");\n usersByType[serviceType].push(tx.origin);\n }\n\n function removeUserFromList(\n SharedStructs.ServiceType serviceType\n ) public {\n require(users[tx.origin].userAddress != address(0), \"User must exist\");\n (uint256 index, bool found) = _getUserListIndex(serviceType, tx.origin);\n require(found, \"User is not part of that list\");\n for (uint256 i = index; i < usersByType[serviceType].length - 1; i++) {\n usersByType[serviceType][i] = usersByType[serviceType][i + 1];\n }\n usersByType[serviceType].pop();\n }\n\n function showUsersInList(\n SharedStructs.ServiceType serviceType\n ) public view returns (address[] memory) {\n return usersByType[serviceType];\n }\n\n // returns the index of the user found in the service list\n // it returns 0 and false if the user is not found\n function _getUserListIndex(\n SharedStructs.ServiceType serviceType,\n address userAddress\n ) private view returns (uint256, bool) {\n uint256 ret = 0;\n bool found = false;\n for (uint256 i = 0; i < usersByType[serviceType].length; i++) {\n if (usersByType[serviceType][i] == userAddress) {\n ret = i;\n found = true;\n break;\n }\n }\n return (ret, found);\n }\n\n function _doesUserHaveRole(\n SharedStructs.ServiceType serviceType,\n address userAddress\n ) private view returns (bool) {\n bool found = false;\n for (uint256 i = 0; i < users[userAddress].roles.length; i++) {\n if (users[userAddress].roles[i] == serviceType) {\n found = true;\n break;\n }\n }\n return found;\n }\n}\n" + }, + "contracts/SharedStructs.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.6;\n\nlibrary SharedStructs {\n\n enum ServiceType {\n Solver,\n Mediator,\n ResourceProvider,\n JobCreator\n }\n\n enum AgreementState {\n\n // the two parties have not yet both agreed to the deal\n DealNegotiating,\n\n // both parties have agreed\n DealAgreed,\n\n // results have been submitted by the RP\n ResultsSubmitted,\n\n // the JC has accepted the results\n ResultsAccepted,\n\n // the JC has checked the results\n ResultsChecked,\n\n // a mediator has accepted the results\n MediationAccepted,\n\n // a mediator has rejected the results\n MediationRejected,\n\n // this means the counter-party did not agree to the deal in time\n TimeoutAgree,\n\n // this means the RP did not submit results in time\n TimeoutSubmitResults,\n\n // this means the JC did not accept or reject results in time\n TimeoutJudgeResults,\n\n // this means the mediator did not accept or submit judgement in time\n TimeoutMediateResults\n\n }\n\n // we map addresses onto infomation about the user\n struct User {\n address userAddress;\n // the CID of information for this user\n string metadataCID;\n string url;\n ServiceType[] roles;\n }\n\n // the various addresses involved in runnig a deal\n struct DealMembers {\n // the address of the solver service that the RP and JC have agreed to use\n address solver;\n // the addresses of the RP and JC that have agreed to this deal\n address jobCreator;\n address resourceProvider;\n // the list of mediators that the RP and JC have agreed to use\n address[] mediators;\n }\n\n // a timeout represents the agreed amount of time and the penalty\n // that is applied if the timeout is exceeded \n struct DealTimeout {\n uint256 timeout;\n uint256 collateral;\n }\n \n // the various forms of timeout a deal can have\n struct DealTimeouts { \n DealTimeout agree;\n DealTimeout submitResults;\n DealTimeout judgeResults;\n DealTimeout mediateResults;\n }\n\n // configure the cost of a deal\n struct DealPricing {\n // agreed price per instruction\n uint256 instructionPrice;\n\n // the collateral that the JC has put up to pay for the job\n // the final cost of the job will be deducted from this\n uint256 paymentCollateral;\n\n // how much collateral the RP will post to attest it's results are correct\n // this is a multiple of the cost of the job which is known at results\n // submission time\n uint256 resultsCollateralMultiple;\n\n // how much is the JC willing to pay the mediator to resolve disputes\n uint256 mediationFee;\n }\n\n // a Deal forms the information that is agreed between both parties\n // both parties must have called \"agree_deal\" with the exact\n // same parameters before the deal is considered valid\n // a Deal is immutable - nothing about it can be updated\n struct Deal {\n // the CID of the Deal document on IPFS (and directory service)\n // this contains the job spec, the job offer and the resource offer\n string dealId;\n\n // who is participating in this deal\n DealMembers members;\n \n // the timeout settings for a deal\n DealTimeouts timeouts;\n\n // the pricing settings for a deal\n DealPricing pricing; \n }\n\n // what the RP submits back once having run the job\n // this is also immutable\n struct Result {\n // the id of the deal that this result is for\n string dealId;\n\n // the CID of the results on IPFS (and directory service)\n // NOTE - this is not the CID of actual results data rather\n // of the JSON object reporting that data\n string resultsId;\n\n // this is the actual lower level data CID\n string dataId;\n\n // how many instructions were executed by the RP\n uint256 instructionCount;\n }\n\n // an agreement keeps track of the state of a deal and it's fields can be mutated\n struct Agreement {\n // the current state of the agreement\n AgreementState state;\n\n uint256 resourceProviderAgreedAt;\n uint256 jobCreatorAgreedAt;\n uint256 dealCreatedAt;\n uint256 dealAgreedAt;\n\n uint256 resultsSubmittedAt;\n uint256 resultsAcceptedAt;\n uint256 resultsCheckedAt;\n\n uint256 mediationAcceptedAt;\n uint256 mediationRejectedAt;\n\n uint256 timeoutAgreeAt;\n uint256 timeoutSubmitResultsAt;\n uint256 timeoutJudgeResultsAt;\n uint256 timeoutMediateResultsAt;\n }\n\n struct JobOffer {\n uint256 id;\n \n // this is the contract that will be triggered\n // once there are some results\n address calling_contract;\n\n // this is the address that is paying for the job\n // they must have called approve on the token contract\n // and granted the solver address the number of tokens\n // required\n address payee;\n\n // the job spec\n string module;\n string[] inputs;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat/generate_accts/Dockerfile b/hardhat/generate_accts/Dockerfile new file mode 100644 index 00000000..3b93b8a7 --- /dev/null +++ b/hardhat/generate_accts/Dockerfile @@ -0,0 +1,30 @@ +# Start with the official Golang image +FROM golang:1.21.3 + +WORKDIR /geth +ARG VERSION=v1.13.4 +RUN git clone --quiet --branch ${VERSION} --depth 1 https://github.com/ethereum/go-ethereum . +RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build go run build/ci.go install -static ./cmd/geth + +RUN /geth/build/bin/geth version +RUN mv /geth/build/bin/geth /usr/local/bin/ + +# Set the working directory +WORKDIR /app + +# Copy the Go file +COPY ./extractKeys.go . + +# Initialize a Go module and get the required packages +RUN go mod init extractkeys +RUN go get github.com/ethereum/go-ethereum/accounts/keystore@${VERSION} +RUN go get github.com/ethereum/go-ethereum/crypto@${VERSION} + +# Build the Go application +RUN go build -o extractkeys extractKeys.go + +# Create a volume to persist Ethereum keystore data +VOLUME ["/root/.ethereum/keystore"] + +# Use bash as the default entrypoint +ENTRYPOINT ["/bin/bash"] \ No newline at end of file diff --git a/hardhat/generate_accts/README.md b/hardhat/generate_accts/README.md new file mode 100644 index 00000000..74781f03 --- /dev/null +++ b/hardhat/generate_accts/README.md @@ -0,0 +1,47 @@ +# Generate Ethereum Accounts + +## Create a folder locally to store the keystore +``` +sudo mkdir -p /mnt/lilypad/keystore +``` + +## Build the docker image +``` +cd hardhat/generate_accts +docker build -t generate-accts-image . +``` + +## Run the generate-accts docker image and remove the container after exiting +``` +docker run -it --rm --name generate-accts-container -v /mnt/lilypad/keystore:/root/.ethereum/keystore generate-accts-image +``` + +## Create seven new accounts + +Use the same password for all accounts: + +``` +geth account new +geth account new +geth account new +geth account new +geth account new +geth account new +geth account new +``` + +## Get the public and private key for each account + +``` +./extractkeys +``` + +## Update `.env` file in `hardhat` directory + +Add the addresses and private keys + +## Keystore files are locally stored at /mnt/lilypad/keystore + +``` +ls /mnt/lilypad/keystore +``` \ No newline at end of file diff --git a/hardhat/generate_accts/extractKeys.go b/hardhat/generate_accts/extractKeys.go new file mode 100644 index 00000000..d5f9f204 --- /dev/null +++ b/hardhat/generate_accts/extractKeys.go @@ -0,0 +1,42 @@ +package main + +import ( + "encoding/hex" + "fmt" + "os" + + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/ethereum/go-ethereum/crypto" +) + +func main() { + // Check that the password was provided + if len(os.Args) < 2 { + fmt.Println("Usage: extractkeys ") + return + } + + keystorePath := "/root/.ethereum/keystore/" + password := os.Args[1] + + // Get the list of files in the keystore directory + files, e := os.ReadDir(keystorePath) + if e != nil { + panic(e) + } + for _, file := range files { + // Extract the private key from each file + keyjson, e := os.ReadFile(keystorePath + file.Name()) + if e != nil { + panic(e) + } + key, e := keystore.DecryptKey(keyjson, password) + if e != nil { + panic(e) + } + + // Convert the private key to its hexadecimal representation + privateKeyHex := hex.EncodeToString(crypto.FromECDSA(key.PrivateKey)) + fmt.Println(file.Name(), privateKeyHex) + } +} diff --git a/hardhat/hardhat.config.ts b/hardhat/hardhat.config.ts index 4317c858..25a59026 100644 --- a/hardhat/hardhat.config.ts +++ b/hardhat/hardhat.config.ts @@ -14,8 +14,10 @@ import { const ENV_FILE = process.env.DOTENV_CONFIG_PATH || '../.env' dotenv.config({ path: ENV_FILE }) +const INFURA_KEY = process.env.INFURA_KEY || ""; + const config: HardhatUserConfig = { - solidity: '0.8.6', + solidity: '0.8.21', defaultNetwork: 'geth', namedAccounts: ACCOUNT_ADDRESSES, networks: { @@ -25,7 +27,14 @@ const config: HardhatUserConfig = { chainId: 1337, accounts: PRIVATE_KEYS, }, + sepolia: { + url: `https://sepolia.infura.io/v3/${INFURA_KEY}`, + accounts: PRIVATE_KEYS, + }, + }, + etherscan: { + apiKey: process.env.ETHERSCAN_API_KEY, }, }; -module.exports = config +module.exports = config \ No newline at end of file diff --git a/hardhat/scripts/list-services.ts b/hardhat/scripts/list-services.ts index 890435fb..bdfa5020 100644 --- a/hardhat/scripts/list-services.ts +++ b/hardhat/scripts/list-services.ts @@ -1,6 +1,6 @@ import bluebird from 'bluebird' import { - connectStorage, + connectUsers, } from '../utils/web3' import { @@ -8,12 +8,11 @@ import { } from '../utils/enums' async function main() { - const storage = await connectStorage() + const storage = await connectUsers() const results = await bluebird.props({ Solver: storage.showUsersInList(getServiceType('Solver')), Mediator: storage.showUsersInList(getServiceType('Mediator')), - Directory: storage.showUsersInList(getServiceType('Directory')), ResourceProvider: storage.showUsersInList(getServiceType('ResourceProvider')), JobCreator: storage.showUsersInList(getServiceType('JobCreator')), }) diff --git a/hardhat/scripts/print-contract-env.ts b/hardhat/scripts/print-contract-env.ts index c82b46eb..d72f3da0 100644 --- a/hardhat/scripts/print-contract-env.ts +++ b/hardhat/scripts/print-contract-env.ts @@ -1,13 +1,29 @@ import { getControllerAddress, getTokenAddress, + getMediationAddress, + getJobManagerAddress, + getPaymentsAddress, + getStorageAddress, + getUsersAddress } from '../utils/web3' async function main() { const controllerAddress = await getControllerAddress() const tokenAddress = await getTokenAddress() + const mediationAddress = await getMediationAddress() + const jobManagerAddress = await getJobManagerAddress() + const paymentsAddress = await getPaymentsAddress() + const storageAddress = await getStorageAddress() + const usersAddress = await getUsersAddress() + console.log(`export WEB3_CONTROLLER_ADDRESS=${controllerAddress}`) console.log(`export WEB3_TOKEN_ADDRESS=${tokenAddress}`) + console.log(`export WEB3_MEDIATION_ADDRESS=${mediationAddress}`) + console.log(`export WEB3_JOBCREATOR_ADDRESS=${jobManagerAddress}`) + console.log(`export WEB3_PAYMENTS_ADDRESS=${paymentsAddress}`) + console.log(`export WEB3_STORAGE_ADDRESS=${storageAddress}`) + console.log(`export WEB3_USERS_ADDRESS=${usersAddress}`) } main().catch((error) => { diff --git a/hardhat/scripts/print-env.ts b/hardhat/scripts/print-env.ts index 4c318c7d..f2a0d916 100644 --- a/hardhat/scripts/print-env.ts +++ b/hardhat/scripts/print-env.ts @@ -8,6 +8,11 @@ async function main() { console.log(`export ${account.name.toUpperCase()}_ADDRESS=${account.address}`) console.log(`export ${account.name.toUpperCase()}_PRIVATE_KEY=${account.privateKey}`) }) + console.log('export INFURA_KEY=') + console.log('export LOG_LEVEL=info') + console.log('export NETWORK=geth') + console.log('export WEB3_RPC_URL=ws://localhost:8546') + console.log('export WEB3_CHAIN_ID=1337') } main().catch((error) => { diff --git a/hardhat/test/controller.ts b/hardhat/test/controller.ts index 5b66bf2b..74e4a9d7 100644 --- a/hardhat/test/controller.ts +++ b/hardhat/test/controller.ts @@ -24,6 +24,7 @@ import { DEFAULT_VALUES, DEAL_ID, RESULTS_ID, + DATA_ID, } from './fixtures' import { LilypadToken, @@ -73,13 +74,13 @@ describe("Controller", () => { expect(deal.pricing.mediationFee).to.equal(mediationFee) expect(deal.timeouts.agree.timeout).to.equal(timeout) - expect(deal.timeouts.agree.collateral).to.equal(ethers.getBigInt(0)) - expect(deal.timeouts.submitResults.timeout).to.equal(ethers.getBigInt(timeout)) - expect(deal.timeouts.submitResults.collateral).to.equal(ethers.getBigInt(timeoutCollateral)) - expect(deal.timeouts.judgeResults.timeout).to.equal(ethers.getBigInt(timeout)) - expect(deal.timeouts.judgeResults.collateral).to.equal(ethers.getBigInt(timeoutCollateral)) - expect(deal.timeouts.mediateResults.timeout).to.equal(ethers.getBigInt(timeout)) - expect(deal.timeouts.mediateResults.collateral).to.equal(ethers.getBigInt(0)) + expect(deal.timeouts.agree.collateral).to.equal(ethers.parseEther("0")) + expect(deal.timeouts.submitResults.timeout).to.equal(timeout) + expect(deal.timeouts.submitResults.collateral).to.equal(timeoutCollateral) + expect(deal.timeouts.judgeResults.timeout).to.equal(timeout) + expect(deal.timeouts.judgeResults.collateral).to.equal(timeoutCollateral) + expect(deal.timeouts.mediateResults.timeout).to.equal(timeout) + expect(deal.timeouts.mediateResults.collateral).to.equal(ethers.parseEther("0")) expect(await storage.hasDeal(DEAL_ID)) .to.equal(true) @@ -151,6 +152,7 @@ describe("Controller", () => { .addResult( DEAL_ID, RESULTS_ID, + DATA_ID, instructionCount ) return ret @@ -289,6 +291,7 @@ describe("Controller", () => { .addResult( DEAL_ID, RESULTS_ID, + DATA_ID, instructionCount ) ) @@ -443,6 +446,7 @@ describe("Controller", () => { .addResult( DEAL_ID, RESULTS_ID, + DATA_ID, instructionCount ) await controller @@ -488,6 +492,7 @@ describe("Controller", () => { .addResult( DEAL_ID, RESULTS_ID, + DATA_ID, instructionCount ) await controller @@ -541,6 +546,7 @@ describe("Controller", () => { .addResult( DEAL_ID, RESULTS_ID, + DATA_ID, instructionCount ) await controller diff --git a/hardhat/test/fixtures.ts b/hardhat/test/fixtures.ts index ea8ffae7..603970e9 100644 --- a/hardhat/test/fixtures.ts +++ b/hardhat/test/fixtures.ts @@ -89,11 +89,12 @@ export async function deployController( usersAddress: AddressLike, paymentsAddress: AddressLike, mediationAddress: AddressLike, + jobCreatorAddress: AddressLike ) { const controller = await deployContract('LilypadController', signer) await controller .connect(signer) - .initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress) + .initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress, jobCreatorAddress) return controller } @@ -273,13 +274,16 @@ export async function setupControllerFixture({ const storageAddress = await storage.getAddress() const usersAddress = await users.getAddress() const mediationAddress = await mediation.getAddress() - + + const jobCreator = getWallet('job_creator') + const controller = await deployController( admin, storageAddress, usersAddress, paymentsAddress, mediationAddress, + jobCreator ) const controllerAddress = await controller.getAddress() await (payments as any) @@ -303,17 +307,18 @@ export async function setupControllerFixture({ export const DEAL_ID = "10" export const RESULTS_ID = "11" +export const DATA_ID = "12" export const DEFAULT_VALUES: Record = { - instructionPrice: ethers.getBigInt(10), - instructionCount: ethers.getBigInt(1), - resultsCollateralMultiple: ethers.getBigInt(4), - resultsCollateral: ethers.getBigInt(40), - paymentCollateral: ethers.getBigInt(30), - jobCost: ethers.getBigInt(10), - mediationFee: ethers.getBigInt(5), - timeout: ethers.getBigInt(100), - timeoutCollateral: ethers.getBigInt(10), + instructionPrice: ethers.parseEther("10"), + instructionCount: ethers.getBigInt("1"), + resultsCollateralMultiple: ethers.getBigInt("4"), + resultsCollateral: ethers.parseEther("40"), + paymentCollateral: ethers.parseEther("30"), + jobCost: ethers.parseEther("10"), + mediationFee: ethers.parseEther("5"), + timeout: ethers.getBigInt("100"), + timeoutCollateral: ethers.parseEther("10"), } export function getDefaultTimeouts( @@ -326,7 +331,7 @@ export function getDefaultTimeouts( } const defaultTimeoutNoCost: SharedStructs.DealTimeoutStruct = { timeout, - collateral: ethers.getBigInt(0), + collateral: ethers.parseEther("0"), } const ret: SharedStructs.DealTimeoutsStruct = { agree: defaultTimeoutNoCost, diff --git a/hardhat/test/payments.ts b/hardhat/test/payments.ts index bd56ad2b..b7d48e47 100644 --- a/hardhat/test/payments.ts +++ b/hardhat/test/payments.ts @@ -29,11 +29,11 @@ const { expect } = chai describe("Payments", () => { const dealID = "10" - const timeoutCollateral = ethers.getBigInt(10) - const resultsCollateral = ethers.getBigInt(40) - const paymentCollateral = ethers.getBigInt(30) - const jobCost = ethers.getBigInt(20) - const mediationFee = ethers.getBigInt(5) + const timeoutCollateral = ethers.parseEther("10") + const resultsCollateral = ethers.parseEther("40") + const paymentCollateral = ethers.parseEther("30") + const jobCost = ethers.parseEther("20") + const mediationFee = ethers.parseEther("5") async function setupPayments() { const { @@ -843,7 +843,7 @@ describe("Payments", () => { .agreeResourceProvider( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -855,7 +855,7 @@ describe("Payments", () => { .agreeResourceProvider( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -867,8 +867,8 @@ describe("Payments", () => { .agreeJobCreator( dealID, getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -880,8 +880,8 @@ describe("Payments", () => { .agreeJobCreator( dealID, getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -893,8 +893,8 @@ describe("Payments", () => { .addResult( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -906,8 +906,8 @@ describe("Payments", () => { .addResult( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -920,10 +920,10 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -936,10 +936,10 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -951,8 +951,8 @@ describe("Payments", () => { .checkResult( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -964,8 +964,8 @@ describe("Payments", () => { .checkResult( dealID, getAddress('resource_provider'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -978,10 +978,10 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -994,10 +994,10 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -1010,9 +1010,9 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -1025,9 +1025,9 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -1040,8 +1040,8 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -1054,8 +1054,8 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -1068,8 +1068,8 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -1082,8 +1082,8 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -1096,9 +1096,9 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -1111,9 +1111,9 @@ describe("Payments", () => { dealID, getAddress('resource_provider'), getAddress('job_creator'), - ethers.getBigInt(1), - ethers.getBigInt(1), - ethers.getBigInt(1), + ethers.parseEther("1"), + ethers.parseEther("1"), + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) diff --git a/hardhat/test/storage.ts b/hardhat/test/storage.ts index b9fea51b..a33eae08 100644 --- a/hardhat/test/storage.ts +++ b/hardhat/test/storage.ts @@ -37,6 +37,7 @@ describe("Storage", () => { const dealID = "10" const resultsID = "11" + const DATA_ID = "12" const instructionCount = ethers.getBigInt(25) function setupStorage() { @@ -112,6 +113,7 @@ describe("Storage", () => { .addResult( dealID, resultsID, + DATA_ID, instructionCount, ) ) @@ -245,7 +247,8 @@ describe("Storage", () => { .addResult( dealID, "1", - ethers.getBigInt(1), + DATA_ID, + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Controller address must be defined') }) @@ -258,7 +261,8 @@ describe("Storage", () => { .addResult( dealID, "1", - ethers.getBigInt(1), + DATA_ID, + ethers.parseEther("1"), ) ).to.be.revertedWith('ControllerOwnable: Only the controller can call this method') }) @@ -434,14 +438,14 @@ describe("Storage", () => { expect(deal.pricing.resultsCollateralMultiple).to.equal(DEFAULT_VALUES.resultsCollateralMultiple) expect(deal.pricing.mediationFee).to.equal(DEFAULT_VALUES.mediationFee) - expect(deal.timeouts.agree.timeout).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeout)) - expect(deal.timeouts.agree.collateral).to.equal(ethers.getBigInt(0)) - expect(deal.timeouts.submitResults.timeout).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeout)) - expect(deal.timeouts.submitResults.collateral).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeoutCollateral)) - expect(deal.timeouts.judgeResults.timeout).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeout)) - expect(deal.timeouts.judgeResults.collateral).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeoutCollateral)) - expect(deal.timeouts.mediateResults.timeout).to.equal(ethers.getBigInt(DEFAULT_VALUES.timeout)) - expect(deal.timeouts.mediateResults.collateral).to.equal(ethers.getBigInt(0)) + expect(deal.timeouts.agree.timeout).to.equal(DEFAULT_VALUES.timeout) + expect(deal.timeouts.agree.collateral).to.equal(ethers.parseEther("0")) + expect(deal.timeouts.submitResults.timeout).to.equal(DEFAULT_VALUES.timeout) + expect(deal.timeouts.submitResults.collateral).to.equal(DEFAULT_VALUES.timeoutCollateral) + expect(deal.timeouts.judgeResults.timeout).to.equal(DEFAULT_VALUES.timeout) + expect(deal.timeouts.judgeResults.collateral).to.equal(DEFAULT_VALUES.timeoutCollateral) + expect(deal.timeouts.mediateResults.timeout).to.equal(DEFAULT_VALUES.timeout) + expect(deal.timeouts.mediateResults.collateral).to.equal(ethers.parseEther("0")) expect(await storage.hasDeal(dealID)) .to.equal(true) @@ -536,7 +540,7 @@ describe("Storage", () => { // 'Mediation fee does not match', // ] // const badArgs: any = { - // 0: ethers.getBigInt(100), + // 0: ethers.parseEther("100"), // 1: getAddress('mediator'), // 2: getAddress('mediator'), // } @@ -544,17 +548,17 @@ describe("Storage", () => { // dealID, // getAddress('resource_provider'), // getAddress('job_creator'), - // ethers.getBigInt(1), - // ethers.getBigInt(1), - // ethers.getBigInt(1), - // ethers.getBigInt(1), - // ethers.getBigInt(1), - // ethers.getBigInt(1) + // ethers.parseEther("1"), + // ethers.parseEther("1"), + // ethers.parseEther("1"), + // ethers.parseEther("1"), + // ethers.parseEther("1"), + // ethers.parseEther("1") // ] // compareErrors.forEach((expectedError, i) => { // if(i == 0) return // const passArgs: any[] = [].concat(...goodArgs) - // passArgs[i] = badArgs[i] || ethers.getBigInt(0) + // passArgs[i] = badArgs[i] || ethers.parseEther("0") // it(`Should compare error: ${expectedError}`, async function () { // const storage = await loadFixture(setupStorageWithUsersAndDeal) // const connectedStorage = storage.connect(getWallet('admin')) as any @@ -580,9 +584,9 @@ describe("Storage", () => { const agreement = await storage.getAgreement(dealID) expect(agreement.state).to.equal(getAgreementState('DealAgreed')) - expect(agreement.resourceProviderAgreedAt).to.not.equal(ethers.getBigInt(0)) - expect(agreement.jobCreatorAgreedAt).to.not.equal(ethers.getBigInt(0)) - expect(agreement.dealAgreedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.resourceProviderAgreedAt).to.not.equal(ethers.parseEther("0")) + expect(agreement.jobCreatorAgreedAt).to.not.equal(ethers.parseEther("0")) + expect(agreement.dealAgreedAt).to.not.equal(ethers.parseEther("0")) expect(await storage.isState(dealID, getAgreementState('DealAgreed'))) .to.equal(true) @@ -615,7 +619,7 @@ describe("Storage", () => { expect(result.instructionCount).to.equal(instructionCount) const agreement = await storage.getAgreement(dealID) - expect(agreement.resultsSubmittedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.resultsSubmittedAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('ResultsSubmitted')) }) @@ -627,6 +631,7 @@ describe("Storage", () => { .addResult( dealID, resultsID, + DATA_ID, instructionCount, ) ).to.be.revertedWith('DealAgreed') @@ -645,7 +650,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('ResultsAccepted')) const agreement = await storage.getAgreement(dealID) - expect(agreement.resultsAcceptedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.resultsAcceptedAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('ResultsAccepted')) }) @@ -662,7 +667,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('ResultsChecked')) const agreement = await storage.getAgreement(dealID) - expect(agreement.resultsCheckedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.resultsCheckedAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('ResultsChecked')) }) @@ -707,7 +712,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('MediationAccepted')) const agreement = await storage.getAgreement(dealID) - expect(agreement.mediationAcceptedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.mediationAcceptedAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('MediationAccepted')) }) @@ -724,7 +729,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('MediationRejected')) const agreement = await storage.getAgreement(dealID) - expect(agreement.mediationRejectedAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.mediationRejectedAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('MediationRejected')) }) @@ -766,7 +771,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('TimeoutSubmitResults')) const agreement = await storage.getAgreement(dealID) - expect(agreement.timeoutSubmitResultsAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.timeoutSubmitResultsAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('TimeoutSubmitResults')) }) @@ -783,7 +788,7 @@ describe("Storage", () => { .withArgs(dealID, getAgreementState('TimeoutJudgeResults')) const agreement = await storage.getAgreement(dealID) - expect(agreement.timeoutJudgeResultsAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.timeoutJudgeResultsAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('TimeoutJudgeResults')) }) @@ -801,7 +806,7 @@ describe("Storage", () => { const agreement = await storage.getAgreement(dealID) - expect(agreement.timeoutMediateResultsAt).to.not.equal(ethers.getBigInt(0)) + expect(agreement.timeoutMediateResultsAt).to.not.equal(ethers.parseEther("0")) expect(agreement.state).to.equal(getAgreementState('TimeoutMediateResults')) }) diff --git a/hardhat/test/token.ts b/hardhat/test/token.ts index 0fccd3a3..e9c15257 100644 --- a/hardhat/test/token.ts +++ b/hardhat/test/token.ts @@ -54,7 +54,7 @@ describe("Token", () => { describe("Access control", () => { it("Can only run if there is a controller address set", async function () { - const amount = ethers.getBigInt(100) + const amount = ethers.parseEther("100") const token = await setupTokenFixture({ testMode: false, withFunds: false, @@ -70,7 +70,7 @@ describe("Token", () => { }) it("Can only be run by the controller", async function () { - const amount = ethers.getBigInt(100) + const amount = ethers.parseEther("100") const token = await setupTokenFixture({ testMode: false, withFunds: false, @@ -91,7 +91,7 @@ describe("Token", () => { describe("Escrow", () => { it("Should handle payEscrow and refundEscrow", async function () { - const amount = ethers.getBigInt(100) + const amount = ethers.parseEther("100") const token = await loadFixture(setupTokenWithFunds) const tokenAddress = await token.getAddress() @@ -145,7 +145,7 @@ describe("Token", () => { }) it("Should handle payEscrow and payJob", async function () { - const amount = ethers.getBigInt(100) + const amount = ethers.parseEther("100") const token = await loadFixture(setupTokenWithFunds) const tokenAddress = await token.getAddress() @@ -204,7 +204,7 @@ describe("Token", () => { }) it("Should handle payEscrow and slashEscrow", async function () { - const amount = ethers.getBigInt(100) + const amount = ethers.parseEther("100") const token = await loadFixture(setupTokenWithFunds) const tokenAddress = await token.getAddress() diff --git a/hardhat/utils/accounts.ts b/hardhat/utils/accounts.ts index 1cbfbd3f..724f3ba9 100644 --- a/hardhat/utils/accounts.ts +++ b/hardhat/utils/accounts.ts @@ -1,6 +1,10 @@ // IMPORTANT: we cannot import hardhat directly here // because it will cause a circular dependency import { Account } from './types' +import * as dotenv from 'dotenv' + +const ENV_FILE = '.env' +dotenv.config({ path: ENV_FILE }) export const loadEnv = (name: string, defaultValue: string) => { return process.env[name] || defaultValue diff --git a/hardhat/utils/web3.ts b/hardhat/utils/web3.ts index 7e73de5d..03663b26 100644 --- a/hardhat/utils/web3.ts +++ b/hardhat/utils/web3.ts @@ -17,6 +17,7 @@ import { LilypadMediationRandom, LilypadController, LilypadOnChainJobCreator, + LilypadUsers, ExampleClient, } from '../typechain-types' @@ -27,13 +28,13 @@ import { */ // how much ether to send to each account -export const DEFAULT_ETHER_PER_ACCOUNT = ethers.parseEther('1000000') +export const DEFAULT_ETHER_PER_ACCOUNT = ethers.parseEther('.1') // a billion tokens in total -export const DEFAULT_TOKEN_SUPPLY = ethers.getBigInt('1000000000') +export const DEFAULT_TOKEN_SUPPLY = ethers.parseEther('1000000000') // each service gets 1000 tokens -export const DEFAULT_TOKENS_PER_ACCOUNT = ethers.getBigInt('1000') +export const DEFAULT_TOKENS_PER_ACCOUNT = ethers.parseEther('1000') /* @@ -207,6 +208,20 @@ export async function getJobManagerAddress() { return getContractAddress('LilypadOnChainJobCreator') } + +/* + + users + +*/ +export async function connectUsers() { + return connectContract('LilypadUsers') +} + +export async function getUsersAddress() { + return getContractAddress('LilypadUsers') +} + /* example client diff --git a/pkg/data/utils.go b/pkg/data/utils.go index 339fddf4..015bb212 100644 --- a/pkg/data/utils.go +++ b/pkg/data/utils.go @@ -187,13 +187,24 @@ func ConvertDealMembers( } } +func EtherToWei(etherAmount float64) *big.Int { + ether := new(big.Float).SetFloat64(etherAmount) + weiMultiplier := new(big.Float).SetFloat64(1e18) + wei := new(big.Float).Mul(ether, weiMultiplier) + + weiInt := new(big.Int) + wei.Int(weiInt) + + return weiInt +} + func ConvertDealTimeout( timeout DealTimeout, withCollateral bool, ) controller.SharedStructsDealTimeout { - collateral := big.NewInt(0) + collateral := EtherToWei(0) if withCollateral { - collateral = big.NewInt(int64(timeout.Collateral)) + collateral = EtherToWei(float64(timeout.Collateral)) } return controller.SharedStructsDealTimeout{ Timeout: big.NewInt(int64(timeout.Timeout)), @@ -216,9 +227,9 @@ func ConvertDealPricing( pricing DealPricing, ) controller.SharedStructsDealPricing { return controller.SharedStructsDealPricing{ - InstructionPrice: big.NewInt(int64(pricing.InstructionPrice)), - PaymentCollateral: big.NewInt(int64(pricing.PaymentCollateral)), + InstructionPrice: EtherToWei(float64(pricing.InstructionPrice)), + PaymentCollateral: EtherToWei(float64(pricing.PaymentCollateral)), ResultsCollateralMultiple: big.NewInt(int64(pricing.ResultsCollateralMultiple)), - MediationFee: big.NewInt(int64(pricing.MediationFee)), + MediationFee: EtherToWei(float64(pricing.MediationFee)), } } diff --git a/pkg/executor/bacalhau/bacalhau.go b/pkg/executor/bacalhau/bacalhau.go index 1c31a3eb..e4f0db8c 100644 --- a/pkg/executor/bacalhau/bacalhau.go +++ b/pkg/executor/bacalhau/bacalhau.go @@ -12,6 +12,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/data/bacalhau" executorlib "github.com/bacalhau-project/lilypad/pkg/executor" "github.com/bacalhau-project/lilypad/pkg/system" + "github.com/rs/zerolog/log" ) const RESULTS_DIR = "bacalhau-results" @@ -30,6 +31,7 @@ func NewBacalhauExecutor(options BacalhauExecutorOptions) (*BacalhauExecutor, er fmt.Sprintf("BACALHAU_API_HOST=%s", options.ApiHost), fmt.Sprintf("HOME=%s", os.Getenv("HOME")), } + log.Debug().Msgf("bacalhauEnv: %s", bacalhauEnv) return &BacalhauExecutor{ Options: options, bacalhauEnv: bacalhauEnv, diff --git a/pkg/jobcreator/onchain_jobcreator.go b/pkg/jobcreator/onchain_jobcreator.go index 4cfe6b3d..09ad710c 100644 --- a/pkg/jobcreator/onchain_jobcreator.go +++ b/pkg/jobcreator/onchain_jobcreator.go @@ -45,7 +45,7 @@ func (jobCreator *OnChainJobCreator) Start(ctx context.Context, cm *system.Clean errorChan := jobCreator.controller.Start(ctx, cm) // TODO: work out how to do dynamic pricing - tx, err := jobCreator.web3SDK.Contracts.JobCreator.SetRequiredDeposit(jobCreator.web3SDK.TransactOpts, big.NewInt(JOB_PRICE)) + tx, err := jobCreator.web3SDK.Contracts.JobCreator.SetRequiredDeposit(jobCreator.web3SDK.TransactOpts, web3.EtherToWei(JOB_PRICE)) if err != nil { errorChan <- err return errorChan @@ -96,7 +96,7 @@ func (jobCreator *OnChainJobCreator) Start(ctx context.Context, cm *system.Clean jobCreator.web3Events.JobCreator.SubscribeJobAdded(func(ev jobcreatorweb3.JobcreatorJobAdded) { // first we need to move the tokens into our account - tx, err := jobCreator.web3SDK.Contracts.Token.TransferFrom(jobCreator.web3SDK.TransactOpts, ev.Payee, jobCreator.web3SDK.GetAddress(), big.NewInt(JOB_PRICE)) + tx, err := jobCreator.web3SDK.Contracts.Token.TransferFrom(jobCreator.web3SDK.TransactOpts, ev.Payee, jobCreator.web3SDK.GetAddress(), web3.EtherToWei(JOB_PRICE)) if err != nil { fmt.Printf("error creating job offer: %s\n", err.Error()) return diff --git a/pkg/mediator/controller.go b/pkg/mediator/controller.go index 1586c7cc..17b2065c 100644 --- a/pkg/mediator/controller.go +++ b/pkg/mediator/controller.go @@ -14,6 +14,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/solver/store" "github.com/bacalhau-project/lilypad/pkg/system" "github.com/bacalhau-project/lilypad/pkg/web3" + "github.com/rs/zerolog/log" ) type MediatorController struct { @@ -42,10 +43,11 @@ func NewMediatorController( web3SDK *web3.Web3SDK, executor executor.Executor, ) (*MediatorController, error) { - + log.Debug().Msgf("begin NewMediatorController") // we know the address of the solver but what is it's url? solverUrl, err := web3SDK.GetSolverUrl(options.Services.Solver) if err != nil { + log.Error().Msgf("error GetSolverUrl") return nil, err } @@ -54,6 +56,7 @@ func NewMediatorController( PrivateKey: options.Web3.PrivateKey, }) if err != nil { + log.Error().Msgf("error NewSolverClient") return nil, err } diff --git a/pkg/mediator/mediator.go b/pkg/mediator/mediator.go index 3f8ddd97..5bec2086 100644 --- a/pkg/mediator/mediator.go +++ b/pkg/mediator/mediator.go @@ -8,6 +8,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/executor/bacalhau" "github.com/bacalhau-project/lilypad/pkg/system" "github.com/bacalhau-project/lilypad/pkg/web3" + "github.com/rs/zerolog/log" ) type MediatorOptions struct { @@ -26,10 +27,14 @@ func NewMediator( web3SDK *web3.Web3SDK, executor executor.Executor, ) (*Mediator, error) { + log.Debug().Msgf("begin NewMediatorController") controller, err := NewMediatorController(options, web3SDK, executor) + log.Debug().Msgf("end NewMediatorController") if err != nil { + log.Error().Msgf("error NewMediatorController") return nil, err } + log.Debug().Msgf("begin Mediator") solver := &Mediator{ controller: controller, web3SDK: web3SDK, diff --git a/pkg/options/web3.go b/pkg/options/web3.go index fdd0f4cd..847a2bb8 100644 --- a/pkg/options/web3.go +++ b/pkg/options/web3.go @@ -23,6 +23,8 @@ func GetDefaultWeb3Options() web3.Web3Options { StorageAddress: GetDefaultServeOptionString("WEB3_STORAGE_ADDRESS", ""), UsersAddress: GetDefaultServeOptionString("WEB3_USERS_ADDRESS", ""), TokenAddress: GetDefaultServeOptionString("WEB3_TOKEN_ADDRESS", ""), + MediationAddress: GetDefaultServeOptionString("WEB3_MEDIATION_ADDRESS", ""), + JobCreatorAddress: GetDefaultServeOptionString("WEB3_JOBCREATOR_ADDRESS", ""), // misc Service: system.DefaultService, diff --git a/pkg/solver/controller.go b/pkg/solver/controller.go index 33b87d00..5cfba652 100644 --- a/pkg/solver/controller.go +++ b/pkg/solver/controller.go @@ -11,6 +11,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/web3" "github.com/bacalhau-project/lilypad/pkg/web3/bindings/mediation" "github.com/bacalhau-project/lilypad/pkg/web3/bindings/storage" + "github.com/rs/zerolog/log" ) // add an enum for various types of event @@ -77,6 +78,7 @@ func (controller *SolverController) Start(ctx context.Context, cm *system.Cleanu } // activate the web3 event listeners + log.Debug().Msgf("controller.web3Events.Start") err = controller.web3Events.Start(controller.web3SDK, ctx, cm) if err != nil { errorChan <- err @@ -85,6 +87,7 @@ func (controller *SolverController) Start(ctx context.Context, cm *system.Cleanu // make sure we are registered as a solver // so that users can lookup our URL + log.Debug().Msgf("controller.registerAsSolver") err = controller.registerAsSolver() if err != nil { errorChan <- err @@ -103,7 +106,7 @@ func (controller *SolverController) Start(ctx context.Context, cm *system.Cleanu return err }, ) - + log.Debug().Msgf("controller.loop.Start") err = controller.loop.Start(true) if err != nil { errorChan <- err @@ -200,12 +203,15 @@ func (controller *SolverController) registerAsSolver() error { return err } + log.Debug().Msgf("GetUser with selfAddress: %s", selfAddress.String()) selfUser, err := controller.web3SDK.GetUser(selfAddress) if err != nil { return err } // TODO: check the other props and call update if they have changed + log.Debug().Msgf("selfUser.Url: %s", selfUser.Url) + log.Debug().Msgf("controller.options.Server.URL: %s", controller.options.Server.URL) if selfUser.Url != controller.options.Server.URL { controller.log.Info("url change", fmt.Sprintf("solver will be updated because URL has changed: %s %s != %s", selfAddress.String(), selfUser.Url, controller.options.Server.URL)) err = controller.web3SDK.UpdateUser( diff --git a/pkg/solver/server.go b/pkg/solver/server.go index 0e3ab071..3344a778 100644 --- a/pkg/solver/server.go +++ b/pkg/solver/server.go @@ -81,6 +81,7 @@ func (solverServer *solverServer) ListenAndServe(ctx context.Context, cm *system // and write them to anyone who is connected to us websocketEventChannel := make(chan []byte) + log.Debug().Msgf("begin solverServer.controller.subscribeEvents") solverServer.controller.subscribeEvents(func(ev SolverEvent) { evBytes, err := json.Marshal(ev) if err != nil { diff --git a/pkg/solver/solver.go b/pkg/solver/solver.go index 51756d0c..8e9ea3e6 100644 --- a/pkg/solver/solver.go +++ b/pkg/solver/solver.go @@ -7,6 +7,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/solver/store" "github.com/bacalhau-project/lilypad/pkg/system" "github.com/bacalhau-project/lilypad/pkg/web3" + "github.com/rs/zerolog/log" ) type SolverOptions struct { @@ -47,6 +48,7 @@ func NewSolver( func (solver *Solver) Start(ctx context.Context, cm *system.CleanupManager) chan error { errorChan := solver.controller.Start(ctx, cm) + log.Debug().Msgf("solver.server.ListenAndServe") go func() { err := solver.server.ListenAndServe(ctx, cm) if err != nil { diff --git a/pkg/web3/api.go b/pkg/web3/api.go index 9fb765ef..3213f93e 100644 --- a/pkg/web3/api.go +++ b/pkg/web3/api.go @@ -9,6 +9,7 @@ import ( "github.com/bacalhau-project/lilypad/pkg/system" "github.com/bacalhau-project/lilypad/pkg/web3/bindings/users" "github.com/ethereum/go-ethereum/common" + "github.com/rs/zerolog/log" ) func (sdk *Web3SDK) GetServiceAddresses(serviceType string) ([]common.Address, error) { @@ -82,11 +83,14 @@ func (sdk *Web3SDK) AddUserToList( } func (sdk *Web3SDK) GetSolverUrl(address string) (string, error) { + log.Debug().Msgf("begin GetSolverUrl from contract at address: %s", address) solver, err := sdk.Contracts.Users.GetUser( sdk.CallOpts, common.HexToAddress(address), ) if err != nil { + log.Error().Msgf("GetUser error") + log.Error().Msgf("error: %s", err) return "", err } diff --git a/pkg/web3/bindings/token/token.go b/pkg/web3/bindings/token/token.go index e06e094f..ba906ab7 100644 --- a/pkg/web3/bindings/token/token.go +++ b/pkg/web3/bindings/token/token.go @@ -32,7 +32,7 @@ var ( // TokenMetaData contains all meta data concerning the Token contract. var TokenMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"initialSupply\",\"type\":\"uint256\"}],\"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\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"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\":\"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\":[],\"name\":\"disableChangeControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"escrowBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getControllerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"payJob\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"refundEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controllerAddress\",\"type\":\"address\"}],\"name\":\"setControllerAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"slashedAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"slashEscrow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"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\":\"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\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405260018060146101000a81548160ff0219169083151502179055503480156200002a575f80fd5b5060405162002efd38038062002efd833981810160405281019062000050919062000559565b82826200007262000066620000cc60201b60201c565b620000d360201b60201c565b81600590816200008391906200081e565b5080600690816200009591906200081e565b5050505f60075f6101000a81548160ff021916908315150217905550620000c333826200019460201b60201c565b50505062000aa7565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000205576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001fc9062000960565b60405180910390fd5b620002185f8383620002fa60201b60201c565b8060045f8282546200022b9190620009ad565b925050819055508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002db9190620009f8565b60405180910390a3620002f65f83836200031260201b60201c565b5050565b6200030d8383836200031760201b60201c565b505050565b505050565b6200032a8383836200038260201b60201c565b6200033a6200038760201b60201c565b156200037d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003749062000a87565b60405180910390fd5b505050565b505050565b5f60075f9054906101000a900460ff16905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620003fd82620003b5565b810181811067ffffffffffffffff821117156200041f576200041e620003c5565b5b80604052505050565b5f620004336200039c565b9050620004418282620003f2565b919050565b5f67ffffffffffffffff821115620004635762000462620003c5565b5b6200046e82620003b5565b9050602081019050919050565b5f5b838110156200049a5780820151818401526020810190506200047d565b5f8484015250505050565b5f620004bb620004b58462000446565b62000428565b905082815260208101848484011115620004da57620004d9620003b1565b5b620004e78482856200047b565b509392505050565b5f82601f830112620005065762000505620003ad565b5b815162000518848260208601620004a5565b91505092915050565b5f819050919050565b620005358162000521565b811462000540575f80fd5b50565b5f8151905062000553816200052a565b92915050565b5f805f60608486031215620005735762000572620003a5565b5b5f84015167ffffffffffffffff811115620005935762000592620003a9565b5b620005a186828701620004ef565b935050602084015167ffffffffffffffff811115620005c557620005c4620003a9565b5b620005d386828701620004ef565b9250506040620005e68682870162000543565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200063f57607f821691505b602082108103620006555762000654620005fa565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620006b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200067c565b620006c586836200067c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6200070662000700620006fa8462000521565b620006dd565b62000521565b9050919050565b5f819050919050565b6200072183620006e6565b6200073962000730826200070d565b84845462000688565b825550505050565b5f90565b6200074f62000741565b6200075c81848462000716565b505050565b5b818110156200078357620007775f8262000745565b60018101905062000762565b5050565b601f821115620007d2576200079c816200065b565b620007a7846200066d565b81016020851015620007b7578190505b620007cf620007c6856200066d565b83018262000761565b50505b505050565b5f82821c905092915050565b5f620007f45f1984600802620007d7565b1980831691505092915050565b5f6200080e8383620007e3565b9150826002028217905092915050565b6200082982620005f0565b67ffffffffffffffff811115620008455762000844620003c5565b5b62000851825462000627565b6200085e82828562000787565b5f60209050601f83116001811462000894575f84156200087f578287015190505b6200088b858262000801565b865550620008fa565b601f198416620008a4866200065b565b5f5b82811015620008cd57848901518255600182019150602085019450602081019050620008a6565b86831015620008ed5784890151620008e9601f891682620007e3565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000948601f8362000902565b9150620009558262000912565b602082019050919050565b5f6020820190508181035f83015262000979816200093a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620009b98262000521565b9150620009c68362000521565b9250828201905080821115620009e157620009e062000980565b5b92915050565b620009f28162000521565b82525050565b5f60208201905062000a0d5f830184620009e7565b92915050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f62000a6f602a8362000902565b915062000a7c8262000a13565b604082019050919050565b5f6020820190508181035f83015262000aa08162000a61565b9050919050565b6124488062000ab55f395ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea264697066735822122008f065d2b2036e227dbc3e2b59d5ee295584852d6731ab7f4fb369e6a363d6a364736f6c63430008150033", + Bin: "0x608060405260018060146101000a81548160ff0219169083151502179055503480156200002a575f80fd5b5060405162002efd38038062002efd833981810160405281019062000050919062000559565b82826200007262000066620000cc60201b60201c565b620000d360201b60201c565b81600590816200008391906200081e565b5080600690816200009591906200081e565b5050505f60075f6101000a81548160ff021916908315150217905550620000c333826200019460201b60201c565b50505062000aa7565b5f33905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000205576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001fc9062000960565b60405180910390fd5b620002185f8383620002fa60201b60201c565b8060045f8282546200022b9190620009ad565b925050819055508060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002db9190620009f8565b60405180910390a3620002f65f83836200031260201b60201c565b5050565b6200030d8383836200031760201b60201c565b505050565b505050565b6200032a8383836200038260201b60201c565b6200033a6200038760201b60201c565b156200037d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003749062000a87565b60405180910390fd5b505050565b505050565b5f60075f9054906101000a900460ff16905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620003fd82620003b5565b810181811067ffffffffffffffff821117156200041f576200041e620003c5565b5b80604052505050565b5f620004336200039c565b9050620004418282620003f2565b919050565b5f67ffffffffffffffff821115620004635762000462620003c5565b5b6200046e82620003b5565b9050602081019050919050565b5f5b838110156200049a5780820151818401526020810190506200047d565b5f8484015250505050565b5f620004bb620004b58462000446565b62000428565b905082815260208101848484011115620004da57620004d9620003b1565b5b620004e78482856200047b565b509392505050565b5f82601f830112620005065762000505620003ad565b5b815162000518848260208601620004a5565b91505092915050565b5f819050919050565b620005358162000521565b811462000540575f80fd5b50565b5f8151905062000553816200052a565b92915050565b5f805f60608486031215620005735762000572620003a5565b5b5f84015167ffffffffffffffff811115620005935762000592620003a9565b5b620005a186828701620004ef565b935050602084015167ffffffffffffffff811115620005c557620005c4620003a9565b5b620005d386828701620004ef565b9250506040620005e68682870162000543565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200063f57607f821691505b602082108103620006555762000654620005fa565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620006b97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200067c565b620006c586836200067c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6200070662000700620006fa8462000521565b620006dd565b62000521565b9050919050565b5f819050919050565b6200072183620006e6565b6200073962000730826200070d565b84845462000688565b825550505050565b5f90565b6200074f62000741565b6200075c81848462000716565b505050565b5b818110156200078357620007775f8262000745565b60018101905062000762565b5050565b601f821115620007d2576200079c816200065b565b620007a7846200066d565b81016020851015620007b7578190505b620007cf620007c6856200066d565b83018262000761565b50505b505050565b5f82821c905092915050565b5f620007f45f1984600802620007d7565b1980831691505092915050565b5f6200080e8383620007e3565b9150826002028217905092915050565b6200082982620005f0565b67ffffffffffffffff811115620008455762000844620003c5565b5b62000851825462000627565b6200085e82828562000787565b5f60209050601f83116001811462000894575f84156200087f578287015190505b6200088b858262000801565b865550620008fa565b601f198416620008a4866200065b565b5f5b82811015620008cd57848901518255600182019150602085019450602081019050620008a6565b86831015620008ed5784890151620008e9601f891682620007e3565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000948601f8362000902565b9150620009558262000912565b602082019050919050565b5f6020820190508181035f83015262000979816200093a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620009b98262000521565b9150620009c68362000521565b9250828201905080821115620009e157620009e062000980565b5b92915050565b620009f28162000521565b82525050565b5f60208201905062000a0d5f830184620009e7565b92915050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f62000a6f602a8362000902565b915062000a7c8262000a13565b604082019050919050565b5f6020820190508181035f83015262000aa08162000a61565b9050919050565b6124488062000ab55f395ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063715018a6116100dc578063a457c2d711610095578063c57380a21161006f578063c57380a214610461578063dd62ed3e1461047f578063f2fde38b146104af578063f3d3d448146104cb57610171565b8063a457c2d7146103f7578063a470295814610427578063a9059cbb1461043157610171565b8063715018a6146103475780638456cb591461035157806388c2bdfe1461035b5780638da5cb5b1461038b57806395d89b41146103a9578063987bf9a7146103c757610171565b8063395093511161012e578063395093511461025f5780633f4ba83a1461028f5780635407e93c14610299578063599efa6b146102c95780635c975abb146102f957806370a082311461031757610171565b8063065e86c81461017557806306fdde03146101a5578063095ea7b3146101c357806318160ddd146101f357806323b872dd14610211578063313ce56714610241575b5f80fd5b61018f600480360381019061018a91906117c9565b6104e7565b60405161019c9190611833565b60405180910390f35b6101ad6105da565b6040516101ba91906118d6565b60405180910390f35b6101dd60048036038101906101d891906118f6565b61066a565b6040516101ea9190611833565b60405180910390f35b6101fb61068c565b6040516102089190611943565b60405180910390f35b61022b600480360381019061022691906117c9565b610695565b6040516102389190611833565b60405180910390f35b6102496106c3565b6040516102569190611977565b60405180910390f35b610279600480360381019061027491906118f6565b6106cb565b6040516102869190611833565b60405180910390f35b610297610701565b005b6102b360048036038101906102ae9190611990565b610713565b6040516102c09190611833565b60405180910390f35b6102e360048036038101906102de91906118f6565b61077b565b6040516102f09190611833565b60405180910390f35b6103016108db565b60405161030e9190611833565b60405180910390f35b610331600480360381019061032c91906119bb565b6108f0565b60405161033e9190611943565b60405180910390f35b61034f610936565b005b610359610949565b005b610375600480360381019061037091906118f6565b61095b565b6040516103829190611833565b60405180910390f35b610393610a54565b6040516103a091906119f5565b60405180910390f35b6103b1610a7b565b6040516103be91906118d6565b60405180910390f35b6103e160048036038101906103dc91906119bb565b610b0b565b6040516103ee9190611943565b60405180910390f35b610411600480360381019061040c91906118f6565b610b51565b60405161041e9190611833565b60405180910390f35b61042f610bc6565b005b61044b600480360381019061044691906118f6565b610bea565b6040516104589190611833565b60405180910390f35b610469610c0c565b60405161047691906119f5565b60405180910390f35b61049960048036038101906104949190611a0e565b610c34565b6040516104a69190611943565b60405180910390f35b6104c960048036038101906104c491906119bb565b610cb6565b005b6104e560048036038101906104e091906119bb565b610d38565b005b5f6104f0610e40565b508160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611abc565b60405180910390fd5b8160085f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105bd9190611b07565b925050819055506105cf308484610f6d565b600190509392505050565b6060600580546105e990611b67565b80601f016020809104026020016040519081016040528092919081815260200182805461061590611b67565b80156106605780601f1061063757610100808354040283529160200191610660565b820191905f5260205f20905b81548152906001019060200180831161064357829003601f168201915b5050505050905090565b5f806106746111dc565b90506106818185856111e3565b600191505092915050565b5f600454905090565b5f8061069f6111dc565b90506106ac8582856113a6565b6106b7858585610f6d565b60019150509392505050565b5f6012905090565b5f806106d56111dc565b90506106f68185856106e78589610c34565b6106f19190611b97565b6111e3565b600191505092915050565b610709611431565b6107116114af565b565b5f61071f323084610f6d565b8160085f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461076b9190611b97565b9250508190555060019050919050565b5f610784610e40565b505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea90611c3a565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108bf9190611b07565b925050819055506108d1308484610f6d565b6001905092915050565b5f60075f9054906101000a900460ff16905090565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61093e611431565b6109475f611510565b565b610951611431565b6109596115d1565b565b5f610964610e40565b508160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611abc565b60405180910390fd5b8160085f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a319190611b07565b92505081905550610a4a30610a44610a54565b84610f6d565b6001905092915050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054610a8a90611b67565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab690611b67565b8015610b015780601f10610ad857610100808354040283529160200191610b01565b820191905f5260205f20905b815481529060010190602001808311610ae457829003601f168201915b5050505050905090565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f80610b5b6111dc565b90505f610b688286610c34565b905083811015610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba490611cc8565b60405180910390fd5b610bba82868684036111e3565b60019250505092915050565b610bce611431565b5f600160146101000a81548160ff021916908315150217905550565b5f80610bf46111dc565b9050610c01818585610f6d565b600191505092915050565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610cbe611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2390611d56565b60405180910390fd5b610d3581611510565b50565b610d40611431565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590611de4565b60405180910390fd5b600160149054906101000a900460ff16610dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df490611e72565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f8073ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec790611de4565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f106111dc565b73ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5d90611f00565b60405180910390fd5b6001905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd290611f8e565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611049576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110409061201c565b60405180910390fd5b611054838383611633565b5f60025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156110d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110cf906120aa565b60405180910390fd5b81810360025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111c39190611943565b60405180910390a36111d6848484611643565b50505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611251576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124890612138565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b6906121c6565b60405180910390fd5b8060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516113999190611943565b60405180910390a3505050565b5f6113b18484610c34565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461142b578181101561141d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114149061222e565b60405180910390fd5b61142a84848484036111e3565b5b50505050565b6114396111dc565b73ffffffffffffffffffffffffffffffffffffffff16611457610a54565b73ffffffffffffffffffffffffffffffffffffffff16146114ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a490612296565b60405180910390fd5b565b6114b7611648565b5f60075f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6114f96111dc565b60405161150691906119f5565b60405180910390a1565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115d9611691565b600160075f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861161c6111dc565b60405161162991906119f5565b60405180910390a1565b61163e8383836116db565b505050565b505050565b6116506108db565b61168f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611686906122fe565b60405180910390fd5b565b6116996108db565b156116d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d090612366565b60405180910390fd5b565b6116e6838383611733565b6116ee6108db565b1561172e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611725906123f4565b60405180910390fd5b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117658261173c565b9050919050565b6117758161175b565b811461177f575f80fd5b50565b5f813590506117908161176c565b92915050565b5f819050919050565b6117a881611796565b81146117b2575f80fd5b50565b5f813590506117c38161179f565b92915050565b5f805f606084860312156117e0576117df611738565b5b5f6117ed86828701611782565b93505060206117fe86828701611782565b925050604061180f868287016117b5565b9150509250925092565b5f8115159050919050565b61182d81611819565b82525050565b5f6020820190506118465f830184611824565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611883578082015181840152602081019050611868565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6118a88261184c565b6118b28185611856565b93506118c2818560208601611866565b6118cb8161188e565b840191505092915050565b5f6020820190508181035f8301526118ee818461189e565b905092915050565b5f806040838503121561190c5761190b611738565b5b5f61191985828601611782565b925050602061192a858286016117b5565b9150509250929050565b61193d81611796565b82525050565b5f6020820190506119565f830184611934565b92915050565b5f60ff82169050919050565b6119718161195c565b82525050565b5f60208201905061198a5f830184611968565b92915050565b5f602082840312156119a5576119a4611738565b5b5f6119b2848285016117b5565b91505092915050565b5f602082840312156119d0576119cf611738565b5b5f6119dd84828501611782565b91505092915050565b6119ef8161175b565b82525050565b5f602082019050611a085f8301846119e6565b92915050565b5f8060408385031215611a2457611a23611738565b5b5f611a3185828601611782565b9250506020611a4285828601611782565b9150509250929050565b7f4c696c79706164546f6b656e3a206e6f7420656e6f7567682066756e647320695f8201527f6e20657363726f77000000000000000000000000000000000000000000000000602082015250565b5f611aa6602883611856565b9150611ab182611a4c565b604082019050919050565b5f6020820190508181035f830152611ad381611a9a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b1182611796565b9150611b1c83611796565b9250828203905081811115611b3457611b33611ada565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611b7e57607f821691505b602082108103611b9157611b90611b3a565b5b50919050565b5f611ba182611796565b9150611bac83611796565b9250828201905080821115611bc457611bc3611ada565b5b92915050565b7f4c696c79706164546f6b656e3a20746f416464726573732063616e6e6f7420625f8201527f65207a65726f2061646472657373000000000000000000000000000000000000602082015250565b5f611c24602e83611856565b9150611c2f82611bca565b604082019050919050565b5f6020820190508181035f830152611c5181611c18565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611cb2602583611856565b9150611cbd82611c58565b604082019050919050565b5f6020820190508181035f830152611cdf81611ca6565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611d40602683611856565b9150611d4b82611ce6565b604082019050919050565b5f6020820190508181035f830152611d6d81611d34565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a20436f6e74726f6c6c65722061645f8201527f6472657373206d75737420626520646566696e65640000000000000000000000602082015250565b5f611dce603583611856565b9150611dd982611d74565b604082019050919050565b5f6020820190508181035f830152611dfb81611dc2565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a2063616e4368616e6765436f6e745f8201527f726f6c6c6572416464726573732069732064697361626c656400000000000000602082015250565b5f611e5c603983611856565b9150611e6782611e02565b604082019050919050565b5f6020820190508181035f830152611e8981611e50565b9050919050565b7f436f6e74726f6c6c65724f776e61626c653a204f6e6c792074686520636f6e745f8201527f726f6c6c65722063616e2063616c6c2074686973206d6574686f640000000000602082015250565b5f611eea603b83611856565b9150611ef582611e90565b604082019050919050565b5f6020820190508181035f830152611f1781611ede565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611f78602583611856565b9150611f8382611f1e565b604082019050919050565b5f6020820190508181035f830152611fa581611f6c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612006602383611856565b915061201182611fac565b604082019050919050565b5f6020820190508181035f83015261203381611ffa565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612094602683611856565b915061209f8261203a565b604082019050919050565b5f6020820190508181035f8301526120c181612088565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f612122602483611856565b915061212d826120c8565b604082019050919050565b5f6020820190508181035f83015261214f81612116565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121b0602283611856565b91506121bb82612156565b604082019050919050565b5f6020820190508181035f8301526121dd816121a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f612218601d83611856565b9150612223826121e4565b602082019050919050565b5f6020820190508181035f8301526122458161220c565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f612280602083611856565b915061228b8261224c565b602082019050919050565b5f6020820190508181035f8301526122ad81612274565b9050919050565b7f5061757361626c653a206e6f74207061757365640000000000000000000000005f82015250565b5f6122e8601483611856565b91506122f3826122b4565b602082019050919050565b5f6020820190508181035f830152612315816122dc565b9050919050565b7f5061757361626c653a20706175736564000000000000000000000000000000005f82015250565b5f612350601083611856565b915061235b8261231c565b602082019050919050565b5f6020820190508181035f83015261237d81612344565b9050919050565b7f45524332305061757361626c653a20746f6b656e207472616e736665722077685f8201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b5f6123de602a83611856565b91506123e982612384565b604082019050919050565b5f6020820190508181035f83015261240b816123d2565b905091905056fea264697066735822122036181403405861aa8efea4183c50b07b6a3004e68a081a033ddc74abc32d8eb864736f6c63430008150033", } // TokenABI is the input ABI used to generate the binding from. diff --git a/pkg/web3/sdk.go b/pkg/web3/sdk.go index d097f47c..16cdce3b 100644 --- a/pkg/web3/sdk.go +++ b/pkg/web3/sdk.go @@ -53,7 +53,7 @@ func NewContracts( } paymentsAddress := options.PaymentsAddress - + log.Debug().Msgf("paymentsAddress: %s", paymentsAddress) if paymentsAddress == "" { loadedPaymentsAddress, err := controller.GetPaymentsAddress(callOpts) if err != nil { @@ -64,14 +64,13 @@ func NewContracts( Str("load payments address", paymentsAddress). Msgf("") } - payments, err := payments.NewPayments(common.HexToAddress(paymentsAddress), client) if err != nil { return nil, err } tokenAddress := options.TokenAddress - + log.Debug().Msgf("TokenAddress: %s", tokenAddress) if tokenAddress == "" { loadedTokenAddress, err := payments.GetTokenAddress(callOpts) if err != nil { @@ -89,7 +88,7 @@ func NewContracts( } storageAddress := options.StorageAddress - + log.Debug().Msgf("StorageAddress: %s", storageAddress) if storageAddress == "" { loadedStorageAddress, err := controller.GetStorageAddress(callOpts) if err != nil { @@ -107,7 +106,7 @@ func NewContracts( } usersAddress := options.UsersAddress - + log.Debug().Msgf("UsersAddress: %s", usersAddress) if usersAddress == "" { loadedUsersAddress, err := controller.GetUsersAddress(callOpts) if err != nil { @@ -125,7 +124,7 @@ func NewContracts( } jobcreatorAddress := options.JobCreatorAddress - + log.Debug().Msgf("JobCreatorAddress: %s", jobcreatorAddress) if jobcreatorAddress == "" { loadedJobCreatorAddress, err := controller.GetJobCreatorAddress(callOpts) if err != nil { @@ -143,7 +142,7 @@ func NewContracts( } mediationAddress := options.MediationAddress - + log.Debug().Msgf("MediationAddress: %s", mediationAddress) if mediationAddress == "" { loadedMediationAddress, err := controller.GetMediationAddress(callOpts) if err != nil { @@ -172,6 +171,8 @@ func NewContracts( } func NewContractSDK(options Web3Options) (*Web3SDK, error) { + // write to console + log.Debug().Msgf("NewContractSDK: %+v", options) client, err := ethclient.Dial(options.RpcURL) if err != nil { return nil, err diff --git a/stack b/stack index 6dbbf665..937b9eb3 100755 --- a/stack +++ b/stack @@ -243,7 +243,6 @@ function print-contract-env() { function print-local-dev-env() { print-contract-env - echo "export WEB3_RPC_URL=ws://localhost:8546" } function fund-services-ether() { @@ -277,6 +276,8 @@ function solver() { source .env eval $(./stack print-local-dev-env) export WEB3_PRIVATE_KEY=$SOLVER_PRIVATE_KEY + export JOB_CREATOR_ADDRESS=$JOB_CREATOR_ADDRESS + export SERVICE_MEDIATORS=$MEDIATOR_ADDRESS export SERVER_PORT=8080 export SERVER_URL=http://localhost:8080 go run . solver "$@"