Gelato-automations/deployments/mainnet/ConnectGelatoExecutorPayment.json
2020-11-29 09:47:38 +01:00

131 lines
40 KiB
JSON

{
"address": "0x5A6bC81908Df5EC5DC4ad3Bd59AEabA1B86Fc126",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "connectorID",
"outputs": [
{
"internalType": "uint256",
"name": "_type",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_getId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_setId",
"type": "uint256"
}
],
"name": "payExecutor",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
],
"transactionHash": "0x75264929dc0c3d302391dd1d46bd1997b18877d3f5fcf017afc31f8999e003f0",
"receipt": {
"to": null,
"from": "0x5B753BF02a42bC73B5846dfd16a8F2e082b99a6a",
"contractAddress": "0x5A6bC81908Df5EC5DC4ad3Bd59AEabA1B86Fc126",
"transactionIndex": 170,
"gasUsed": "486782",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x175cbb155d9aae984bcb52f67895b6ae1472f06499e1636a2079d719b7490d3e",
"transactionHash": "0x75264929dc0c3d302391dd1d46bd1997b18877d3f5fcf017afc31f8999e003f0",
"logs": [],
"blockNumber": 11348260,
"cumulativeGasUsed": "12380152",
"status": 1,
"byzantium": true
},
"args": [58],
"solcInputHash": "bf7cd3f181208953a3fd533c358cf962",
"metadata": "{\"compiler\":{\"version\":\"0.7.4+commit.3f05b770\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"connectorID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_type\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_getId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_setId\",\"type\":\"uint256\"}],\"name\":\"payExecutor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Gelato Team\",\"kind\":\"dev\",\"methods\":{\"connectorID()\":{\"details\":\"Connector Details\"},\"payExecutor(address,uint256,uint256,uint256)\":{\"details\":\"Gelato Executor risks: - _getId does not match actual InstaMemory executor payment slot - _token balance not in DSA - worthless _token risk payable to be compatible in conjunction with DSA.cast payable target\",\"params\":{\"_amt\":\"The amount of _token to pay the Gelato Executor.\",\"_getId\":\"The InstaMemory slot at which the payment amount was stored.\",\"_setId\":\"The InstaMemory slot to save the executor payout amound in.\",\"_token\":\"The token used to pay the Executor.\"}}},\"title\":\"ConnectGelatoExecutorPayment\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"payExecutor(address,uint256,uint256,uint256)\":{\"notice\":\"Transfers automation gas fees to Gelato Executor\"}},\"notice\":\"InstaDapp Connector to compensate Gelato Executors for automation-gas.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts/connectors/ConnectGelatoExecutorPayment.sol\":\"ConnectGelatoExecutorPayment\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x3b21f2c8d626de3b9925ae33e972d8bf5c8b1bffb3f4ee94daeed7d0679036e6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\\n\\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\",\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\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 */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 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://diligence.consensys.net/posts/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.5.11/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 // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\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 functionCall(target, data, \\\"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(address target, bytes memory data, string memory errorMessage) 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(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(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(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\n // solhint-disable-next-line no-inline-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}\\n\",\"keccak256\":\"0xa6a15ddddcbf29d2922a1e0d4151b5d2d33da24b93cc9ebc12390e0d855532f8\",\"license\":\"MIT\"},\"contracts/constants/CInstaDapp.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\n// InstaDapp\\naddress constant INSTA_MEMORY = 0x8a5419CfC711B2343c17a6ABf4B2bAFaBb06957F;\\n\\n// Connectors\\naddress constant CONNECT_MAKER = 0xac02030d8a8F49eD04b2f52C394D3F901A10F8A9;\\naddress constant CONNECT_COMPOUND = 0x15FdD1e902cAC70786fe7D31013B1a806764B5a2;\\naddress constant INSTA_POOL_V2 = 0xeB4bf86589f808f90EEC8e964dBF16Bd4D284905;\\n\\n// Tokens\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\naddress constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n// Insta Pool\\naddress constant INSTA_POOL_RESOLVER = 0xa004a5afBa04b74037E9E52bA1f7eb02b5E61509;\\nuint256 constant ROUTE_1_TOLERANCE = 1005e15;\\n\\n// Insta Mapping\\naddress constant INSTA_MAPPING = 0xe81F70Cc7C0D46e12d70efc60607F16bbD617E88;\\n\",\"keccak256\":\"0x0cbe5f37f9df8be40b791e526926ff413816606b8917976693765925bd3b5f27\",\"license\":\"UNLICENSED\"},\"contracts/contracts/connectors/ConnectGelatoExecutorPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {\\n IConnectGelatoExecutorPayment\\n} from \\\"../../interfaces/InstaDapp/connectors/IConnectGelatoExecutorPayment.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\\\";\\nimport {_getUint, _setUint} from \\\"../../functions/InstaDapp/FInstaDapp.sol\\\";\\nimport {ETH} from \\\"../../constants/CInstaDapp.sol\\\";\\n\\n/// @title ConnectGelatoExecutorPayment\\n/// @notice InstaDapp Connector to compensate Gelato Executors for automation-gas.\\n/// @author Gelato Team\\ncontract ConnectGelatoExecutorPayment is IConnectGelatoExecutorPayment {\\n using Address for address payable;\\n using SafeERC20 for IERC20;\\n\\n // solhint-disable-next-line const-name-snakecase\\n string public constant override name = \\\"ConnectGelatoExecutorPayment-v1.0\\\";\\n\\n uint256 internal immutable _id;\\n\\n constructor(uint256 id) {\\n _id = id;\\n }\\n\\n /// @dev Connector Details\\n function connectorID()\\n external\\n view\\n override\\n returns (uint256 _type, uint256 id)\\n {\\n (_type, id) = (1, _id); // Should put specific value.\\n }\\n\\n /// @notice Transfers automation gas fees to Gelato Executor\\n /// @dev Gelato Executor risks:\\n /// - _getId does not match actual InstaMemory executor payment slot\\n /// - _token balance not in DSA\\n /// - worthless _token risk\\n /// payable to be compatible in conjunction with DSA.cast payable target\\n /// @param _token The token used to pay the Executor.\\n /// @param _amt The amount of _token to pay the Gelato Executor.\\n /// @param _getId The InstaMemory slot at which the payment amount was stored.\\n /// @param _setId The InstaMemory slot to save the executor payout amound in.\\n function payExecutor(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n ) external payable override {\\n uint256 amt = _getUint(_getId, _amt);\\n _setUint(_setId, amt);\\n if (_token == ETH) payable(tx.origin).sendValue(amt);\\n else IERC20(_token).safeTransfer(tx.origin, amt);\\n }\\n}\\n\",\"keccak256\":\"0x5b5853f9531c1eef4c8d720c19fc42fc53db70836d4d60f4c005bef20fe2808b\",\"license\":\"UNLICENSED\"},\"contracts/functions/InstaDapp/FInstaDapp.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {MemoryInterface} from \\\"../../interfaces/InstaDapp/IInstaDapp.sol\\\";\\nimport {INSTA_MEMORY} from \\\"../../constants/CInstaDapp.sol\\\";\\n\\nfunction _setUint(uint256 setId, uint256 val) {\\n if (setId != 0) MemoryInterface(INSTA_MEMORY).setUint(setId, val);\\n}\\n\\nfunction _getUint(uint256 getId, uint256 val) returns (uint256 returnVal) {\\n returnVal = getId == 0 ? val : MemoryInterface(INSTA_MEMORY).getUint(getId);\\n}\\n\",\"keccak256\":\"0xcee085ce34e210267ce4dc4154d7a8b9bbed1fe898ab394b50355a33fd269fd7\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/IInstaDapp.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\npragma experimental ABIEncoderV2;\\n\\n/// @notice Interface InstaDapp Index\\ninterface IndexInterface {\\n function connectors(uint256 version) external view returns (address);\\n\\n function list() external view returns (address);\\n}\\n\\n/// @notice Interface InstaDapp List\\ninterface ListInterface {\\n function accountID(address _account) external view returns (uint64);\\n}\\n\\n/// @notice Interface InstaDapp InstaMemory\\ninterface MemoryInterface {\\n function setUint(uint256 _id, uint256 _val) external;\\n\\n function getUint(uint256 _id) external returns (uint256);\\n}\\n\\n/// @notice Interface InstaDapp Defi Smart Account wallet\\ninterface AccountInterface {\\n function cast(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n address _origin\\n ) external payable returns (bytes32[] memory responses);\\n\\n function version() external view returns (uint256);\\n\\n function isAuth(address user) external view returns (bool);\\n\\n function shield() external view returns (bool);\\n}\\n\\ninterface ConnectorInterface {\\n function connectorID() external view returns (uint256 _type, uint256 _id);\\n\\n function name() external view returns (string memory);\\n}\\n\\ninterface InstaMapping {\\n function gemJoinMapping(bytes32) external view returns (address);\\n}\\n\",\"keccak256\":\"0x09243467e98503c35d8f5b972c5595ee2684f64bf080f46785e7b85aca83562d\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/InstaDapp/connectors/IConnectGelatoExecutorPayment.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.7.4;\\n\\nimport {ConnectorInterface} from \\\"../IInstaDapp.sol\\\";\\n\\ninterface IConnectGelatoExecutorPayment is ConnectorInterface {\\n function payExecutor(\\n address _token,\\n uint256 _amt,\\n uint256 _getId,\\n uint256 _setId\\n ) external payable;\\n}\\n\",\"keccak256\":\"0x91bd2005f4cb1b8b1d56a9a25414a1d4b0149696da45bad0833afc785222da7b\",\"license\":\"UNLICENSED\"}},\"version\":1}",
"bytecode": "0x60a060405234801561001057600080fd5b506040516108263803806108268339818101604052602081101561003357600080fd5b50516080526080516107d4610052600039806101b352506107d46000f3fe6080604052600436106100345760003560e01c806306fdde03146100395780631911336f146100c3578063eb15f781146100fd575b600080fd5b34801561004557600080fd5b5061004e61012b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100fb600480360360808110156100d957600080fd5b506001600160a01b038135169060208101359060408101359060600135610147565b005b34801561010957600080fd5b506101126101ae565b6040805192835260208301919091528051918290030190f35b6040518060600160405280602181526020016107546021913981565b600061015383856101d5565b905061015f8282610271565b6001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156101935761018e32826102ee565b6101a7565b6101a76001600160a01b03861632836103d8565b5050505050565b6001907f000000000000000000000000000000000000000000000000000000000000000090565b6000821561026857738a5419cfc711b2343c17a6abf4b2bafabb06957f6001600160a01b031663a9c70eaa846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561023757600080fd5b505af115801561024b573d6000803e3d6000fd5b505050506040513d602081101561026157600080fd5b505161026a565b815b9392505050565b81156102ea5760408051631878f25160e21b815260048101849052602481018390529051738a5419cfc711b2343c17a6abf4b2bafabb06957f916361e3c94491604480830192600092919082900301818387803b1580156102d157600080fd5b505af11580156102e5573d6000803e3d6000fd5b505050505b5050565b80471015610343576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d806000811461038e576040519150601f19603f3d011682016040523d82523d6000602084013e610393565b606091505b50509050806103d35760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f4603a913960400191505060405180910390fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526103d3908490606061047a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166104d69092919063ffffffff16565b8051909150156103d35780806020019051602081101561049957600080fd5b50516103d35760405162461bcd60e51b815260040180806020018281038252602a815260200180610775602a913960400191505060405180910390fd5b60606104e584846000856104ed565b949350505050565b60608247101561052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061072e6026913960400191505060405180910390fd5b61053785610649565b610588576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106105c75780518252601f1990920191602091820191016105a8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b509150915061063e82828661064f565b979650505050505050565b3b151590565b6060831561065e57508161026a565b82511561066e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c436f6e6e65637447656c61746f4578656375746f725061796d656e742d76312e305361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220205da12e5d793a53eacba7e6c59ab4af0b2d1e3c1ba2f163f7042ddb23aa92b664736f6c63430007040033",
"deployedBytecode": "0x6080604052600436106100345760003560e01c806306fdde03146100395780631911336f146100c3578063eb15f781146100fd575b600080fd5b34801561004557600080fd5b5061004e61012b565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610088578181015183820152602001610070565b50505050905090810190601f1680156100b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100fb600480360360808110156100d957600080fd5b506001600160a01b038135169060208101359060408101359060600135610147565b005b34801561010957600080fd5b506101126101ae565b6040805192835260208301919091528051918290030190f35b6040518060600160405280602181526020016107546021913981565b600061015383856101d5565b905061015f8282610271565b6001600160a01b03851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156101935761018e32826102ee565b6101a7565b6101a76001600160a01b03861632836103d8565b5050505050565b6001907f000000000000000000000000000000000000000000000000000000000000000090565b6000821561026857738a5419cfc711b2343c17a6abf4b2bafabb06957f6001600160a01b031663a9c70eaa846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561023757600080fd5b505af115801561024b573d6000803e3d6000fd5b505050506040513d602081101561026157600080fd5b505161026a565b815b9392505050565b81156102ea5760408051631878f25160e21b815260048101849052602481018390529051738a5419cfc711b2343c17a6abf4b2bafabb06957f916361e3c94491604480830192600092919082900301818387803b1580156102d157600080fd5b505af11580156102e5573d6000803e3d6000fd5b505050505b5050565b80471015610343576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d806000811461038e576040519150601f19603f3d011682016040523d82523d6000602084013e610393565b606091505b50509050806103d35760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f4603a913960400191505060405180910390fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526103d3908490606061047a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166104d69092919063ffffffff16565b8051909150156103d35780806020019051602081101561049957600080fd5b50516103d35760405162461bcd60e51b815260040180806020018281038252602a815260200180610775602a913960400191505060405180910390fd5b60606104e584846000856104ed565b949350505050565b60608247101561052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061072e6026913960400191505060405180910390fd5b61053785610649565b610588576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106105c75780518252601f1990920191602091820191016105a8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b509150915061063e82828661064f565b979650505050505050565b3b151590565b6060831561065e57508161026a565b82511561066e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c436f6e6e65637447656c61746f4578656375746f725061796d656e742d76312e305361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220205da12e5d793a53eacba7e6c59ab4af0b2d1e3c1ba2f163f7042ddb23aa92b664736f6c63430007040033",
"devdoc": {
"author": "Gelato Team",
"kind": "dev",
"methods": {
"connectorID()": {
"details": "Connector Details"
},
"payExecutor(address,uint256,uint256,uint256)": {
"details": "Gelato Executor risks: - _getId does not match actual InstaMemory executor payment slot - _token balance not in DSA - worthless _token risk payable to be compatible in conjunction with DSA.cast payable target",
"params": {
"_amt": "The amount of _token to pay the Gelato Executor.",
"_getId": "The InstaMemory slot at which the payment amount was stored.",
"_setId": "The InstaMemory slot to save the executor payout amound in.",
"_token": "The token used to pay the Executor."
}
}
},
"title": "ConnectGelatoExecutorPayment",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"payExecutor(address,uint256,uint256,uint256)": {
"notice": "Transfers automation gas fees to Gelato Executor"
}
},
"notice": "InstaDapp Connector to compensate Gelato Executors for automation-gas.",
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}