├── scripts ├── test.js ├── deploy_with_web3.ts ├── deploy_with_ethers.ts ├── ethers-lib.ts └── web3-lib.ts ├── contracts ├── 1_Storage.sol ├── 2_Owner.sol ├── SharedWalletProject.sol ├── 3_Ballot.sol └── artifacts │ └── SharedWallet_metadata.json ├── .prettierrc.json ├── .deps └── github │ └── OpenZeppelin │ └── openzeppelin-contracts │ └── contracts │ ├── utils │ └── Context.sol │ └── access │ ├── artifacts │ ├── Ownable.json │ ├── Ownable_metadata.json │ └── build-info │ │ └── 2c0b4af7b67464778b8890565e02017b.json │ └── Ownable.sol ├── tests ├── storage.test.js └── Ballot_test.sol └── README.txt /scripts/test.js: -------------------------------------------------------------------------------- 1 | console.log("hello world"); -------------------------------------------------------------------------------- /scripts/deploy_with_web3.ts: -------------------------------------------------------------------------------- 1 | // This script can be used to deploy the "Storage" contract using Web3 library. 2 | // Please make sure to compile "./contracts/1_Storage.sol" file before running this script. 3 | // And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S 4 | 5 | import { deploy } from './web3-lib' 6 | 7 | (async () => { 8 | try { 9 | const result = await deploy('Storage', []) 10 | console.log(`address: ${result.address}`) 11 | } catch (e) { 12 | console.log(e.message) 13 | } 14 | })() -------------------------------------------------------------------------------- /scripts/deploy_with_ethers.ts: -------------------------------------------------------------------------------- 1 | // This script can be used to deploy the "Storage" contract using ethers.js library. 2 | // Please make sure to compile "./contracts/1_Storage.sol" file before running this script. 3 | // And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S 4 | 5 | import { deploy } from './ethers-lib' 6 | 7 | (async () => { 8 | try { 9 | const result = await deploy('Storage', []) 10 | console.log(`address: ${result.address}`) 11 | } catch (e) { 12 | console.log(e.message) 13 | } 14 | })() -------------------------------------------------------------------------------- /contracts/1_Storage.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.8.2 <0.9.0; 4 | 5 | /** 6 | * @title Storage 7 | * @dev Store & retrieve value in a variable 8 | * @custom:dev-run-script ./scripts/deploy_with_ethers.ts 9 | */ 10 | contract Storage { 11 | 12 | uint256 number; 13 | 14 | /** 15 | * @dev Store value in variable 16 | * @param num value to store 17 | */ 18 | function store(uint256 num) public { 19 | number = num; 20 | } 21 | 22 | /** 23 | * @dev Return value 24 | * @return value of 'number' 25 | */ 26 | function retrieve() public view returns (uint256){ 27 | return number; 28 | } 29 | } -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "overrides": [ 3 | { 4 | "files": "*.sol", 5 | "options": { 6 | "printWidth": 80, 7 | "tabWidth": 4, 8 | "useTabs": false, 9 | "singleQuote": false, 10 | "bracketSpacing": false 11 | } 12 | }, 13 | { 14 | "files": "*.yml", 15 | "options": {} 16 | }, 17 | { 18 | "files": "*.yaml", 19 | "options": {} 20 | }, 21 | { 22 | "files": "*.toml", 23 | "options": {} 24 | }, 25 | { 26 | "files": "*.json", 27 | "options": {} 28 | }, 29 | { 30 | "files": "*.js", 31 | "options": {} 32 | }, 33 | { 34 | "files": "*.ts", 35 | "options": {} 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 3 | 4 | pragma solidity ^0.8.0; 5 | 6 | /** 7 | * @dev Provides information about the current execution context, including the 8 | * sender of the transaction and its data. While these are generally available 9 | * via msg.sender and msg.data, they should not be accessed in such a direct 10 | * manner, since when dealing with meta-transactions the account sending and 11 | * paying for execution may not be the actual sender (as far as an application 12 | * is concerned). 13 | * 14 | * This contract is only required for intermediate, library-like contracts. 15 | */ 16 | abstract contract Context { 17 | function _msgSender() internal view virtual returns (address) { 18 | return msg.sender; 19 | } 20 | 21 | function _msgData() internal view virtual returns (bytes calldata) { 22 | return msg.data; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/storage.test.js: -------------------------------------------------------------------------------- 1 | // Right click on the script name and hit "Run" to execute 2 | const { expect } = require("chai"); 3 | const { ethers } = require("hardhat"); 4 | 5 | describe("Storage", function () { 6 | it("test initial value", async function () { 7 | const Storage = await ethers.getContractFactory("Storage"); 8 | const storage = await Storage.deploy(); 9 | await storage.deployed(); 10 | console.log('storage deployed at:'+ storage.address) 11 | expect((await storage.retrieve()).toNumber()).to.equal(0); 12 | }); 13 | it("test updating and retrieving updated value", async function () { 14 | const Storage = await ethers.getContractFactory("Storage"); 15 | const storage = await Storage.deploy(); 16 | await storage.deployed(); 17 | const storage2 = await ethers.getContractAt("Storage", storage.address); 18 | const setValue = await storage2.store(56); 19 | await setValue.wait(); 20 | expect((await storage2.retrieve()).toNumber()).to.equal(56); 21 | }); 22 | }); -------------------------------------------------------------------------------- /tests/Ballot_test.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.7.0 <0.9.0; 4 | import "remix_tests.sol"; // this import is automatically injected by Remix. 5 | import "hardhat/console.sol"; 6 | import "../contracts/3_Ballot.sol"; 7 | 8 | contract BallotTest { 9 | 10 | bytes32[] proposalNames; 11 | 12 | Ballot ballotToTest; 13 | function beforeAll () public { 14 | proposalNames.push(bytes32("candidate1")); 15 | ballotToTest = new Ballot(proposalNames); 16 | } 17 | 18 | function checkWinningProposal () public { 19 | console.log("Running checkWinningProposal"); 20 | ballotToTest.vote(0); 21 | Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal"); 22 | Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); 23 | } 24 | 25 | function checkWinninProposalWithReturnValue () public view returns (bool) { 26 | return ballotToTest.winningProposal() == 0; 27 | } 28 | } -------------------------------------------------------------------------------- /scripts/ethers-lib.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from 'ethers' 2 | 3 | /** 4 | * Deploy the given contract 5 | * @param {string} contractName name of the contract to deploy 6 | * @param {Array} args list of constructor' parameters 7 | * @param {Number} accountIndex account index from the exposed account 8 | * @return {Contract} deployed contract 9 | */ 10 | export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { 11 | 12 | console.log(`deploying ${contractName}`) 13 | // Note that the script needs the ABI which is generated from the compilation artifact. 14 | // Make sure contract is compiled and artifacts are generated 15 | const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path 16 | 17 | const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) 18 | // 'web3Provider' is a remix global variable object 19 | 20 | const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) 21 | 22 | const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) 23 | 24 | const contract = await factory.deploy(...args) 25 | 26 | // The contract is NOT deployed yet; we must wait until it is mined 27 | await contract.deployed() 28 | return contract 29 | } -------------------------------------------------------------------------------- /scripts/web3-lib.ts: -------------------------------------------------------------------------------- 1 | import Web3 from 'web3' 2 | import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' 3 | 4 | /** 5 | * Deploy the given contract 6 | * @param {string} contractName name of the contract to deploy 7 | * @param {Array} args list of constructor' parameters 8 | * @param {string} from account used to send the transaction 9 | * @param {number} gas gas limit 10 | * @return {Options} deployed contract 11 | */ 12 | export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { 13 | 14 | const web3 = new Web3(web3Provider) 15 | console.log(`deploying ${contractName}`) 16 | // Note that the script needs the ABI which is generated from the compilation artifact. 17 | // Make sure contract is compiled and artifacts are generated 18 | const artifactsPath = `browser/contracts/artifacts/${contractName}.json` 19 | 20 | const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) 21 | 22 | const accounts = await web3.eth.getAccounts() 23 | 24 | const contract: Contract = new web3.eth.Contract(metadata.abi) 25 | 26 | const contractSend: ContractSendMethod = contract.deploy({ 27 | data: metadata.data.bytecode.object, 28 | arguments: args 29 | }) 30 | 31 | const newContractInstance = await contractSend.send({ 32 | from: from || accounts[0], 33 | gas: gas || 1500000 34 | }) 35 | return newContractInstance.options 36 | } -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | REMIX DEFAULT WORKSPACE 2 | 3 | Remix default workspace is present when: 4 | i. Remix loads for the very first time 5 | ii. A new workspace is created with 'Default' template 6 | iii. There are no files existing in the File Explorer 7 | 8 | This workspace contains 3 directories: 9 | 10 | 1. 'contracts': Holds three contracts with increasing levels of complexity. 11 | 2. 'scripts': Contains four typescript files to deploy a contract. It is explained below. 12 | 3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract. 13 | 14 | SCRIPTS 15 | 16 | The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries. 17 | 18 | For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly 19 | in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts` 20 | 21 | In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract. 22 | 23 | To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled. 24 | Output from script will appear in remix terminal. 25 | 26 | Please note, require/import is supported in a limited manner for Remix supported modules. 27 | For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin. 28 | For unsupported modules, an error like this will be thrown: ' module require is not supported by Remix IDE' will be shown. 29 | -------------------------------------------------------------------------------- /contracts/2_Owner.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.7.0 <0.9.0; 4 | 5 | import "hardhat/console.sol"; 6 | 7 | /** 8 | * @title Owner 9 | * @dev Set & change owner 10 | */ 11 | contract Owner { 12 | 13 | address private owner; 14 | 15 | // event for EVM logging 16 | event OwnerSet(address indexed oldOwner, address indexed newOwner); 17 | 18 | // modifier to check if caller is owner 19 | modifier isOwner() { 20 | // If the first argument of 'require' evaluates to 'false', execution terminates and all 21 | // changes to the state and to Ether balances are reverted. 22 | // This used to consume all gas in old EVM versions, but not anymore. 23 | // It is often a good idea to use 'require' to check if functions are called correctly. 24 | // As a second argument, you can also provide an explanation about what went wrong. 25 | require(msg.sender == owner, "Caller is not owner"); 26 | _; 27 | } 28 | 29 | /** 30 | * @dev Set contract deployer as owner 31 | */ 32 | constructor() { 33 | console.log("Owner contract deployed by:", msg.sender); 34 | owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor 35 | emit OwnerSet(address(0), owner); 36 | } 37 | 38 | /** 39 | * @dev Change owner 40 | * @param newOwner address of new owner 41 | */ 42 | function changeOwner(address newOwner) public isOwner { 43 | emit OwnerSet(owner, newOwner); 44 | owner = newOwner; 45 | } 46 | 47 | /** 48 | * @dev Return owner address 49 | * @return address of owner 50 | */ 51 | function getOwner() external view returns (address) { 52 | return owner; 53 | } 54 | } -------------------------------------------------------------------------------- /contracts/SharedWalletProject.sol: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: MIT 2 | pragma solidity 0.8.17; 3 | import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol"; 4 | 5 | 6 | contract SharedWallet is Ownable{ 7 | event AllowanceChanged(address indexed _forWho, address indexed _fromWhom, uint _oldAmount, uint _newAmount); 8 | mapping(address => uint) public allowance; 9 | 10 | address public isowner; 11 | 12 | constructor() { 13 | isowner = msg.sender; 14 | } 15 | function isOwner() public view returns(bool){ 16 | if(isowner == msg.sender){ 17 | return true; 18 | } 19 | } 20 | 21 | function addAllowance(address _who, uint _amount) public onlyOwner{ 22 | emit AllowanceChanged(_who, msg.sender, allowance[_who], _amount); 23 | allowance[_who] = _amount; 24 | } 25 | 26 | 27 | modifier ownerOrAllowed(uint _amount) { 28 | require(isOwner() || allowance[msg.sender] >= _amount, "You are not owner"); 29 | _; 30 | } 31 | 32 | // address public owner; 33 | 34 | // constructor() { 35 | // owner = msg.sender; 36 | // } 37 | 38 | // modifier onlyOwner() { 39 | // require(owner == msg.sender, "You are not owner"); 40 | // _; 41 | 42 | // } 43 | 44 | function reduceAllowance(address _who, uint _amount) internal { 45 | emit AllowanceChanged(_who, msg.sender, allowance[_who], allowance[_who] - _amount); 46 | allowance[_who] -= _amount; 47 | } 48 | 49 | event MoneySent(address indexed _beneficiary, uint _amount); 50 | event MoneyReceived(address indexed _from, uint _amount); 51 | function withdrawMoney(address payable _to, uint _amount) public ownerOrAllowed(_amount){ 52 | require(_amount <= address(this).balance, "There is no enough balance into the smart contract"); 53 | if(!isOwner()){ 54 | reduceAllowance(msg.sender, _amount); 55 | } 56 | emit MoneySent(_to, _amount); 57 | _to.transfer(_amount); 58 | } 59 | 60 | function SendMoneyToContract() payable public { 61 | emit MoneyReceived(msg.sender, msg.value); 62 | } 63 | } -------------------------------------------------------------------------------- /.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/artifacts/Ownable.json: -------------------------------------------------------------------------------- 1 | { 2 | "deploy": { 3 | "VM:-": { 4 | "linkReferences": {}, 5 | "autoDeployLib": true 6 | }, 7 | "main:1": { 8 | "linkReferences": {}, 9 | "autoDeployLib": true 10 | }, 11 | "ropsten:3": { 12 | "linkReferences": {}, 13 | "autoDeployLib": true 14 | }, 15 | "rinkeby:4": { 16 | "linkReferences": {}, 17 | "autoDeployLib": true 18 | }, 19 | "kovan:42": { 20 | "linkReferences": {}, 21 | "autoDeployLib": true 22 | }, 23 | "goerli:5": { 24 | "linkReferences": {}, 25 | "autoDeployLib": true 26 | }, 27 | "Custom": { 28 | "linkReferences": {}, 29 | "autoDeployLib": true 30 | } 31 | }, 32 | "data": { 33 | "bytecode": { 34 | "functionDebugData": {}, 35 | "generatedSources": [], 36 | "linkReferences": {}, 37 | "object": "", 38 | "opcodes": "", 39 | "sourceMap": "" 40 | }, 41 | "deployedBytecode": { 42 | "functionDebugData": {}, 43 | "generatedSources": [], 44 | "immutableReferences": {}, 45 | "linkReferences": {}, 46 | "object": "", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "gasEstimates": null, 51 | "methodIdentifiers": { 52 | "owner()": "8da5cb5b", 53 | "renounceOwnership()": "715018a6", 54 | "transferOwnership(address)": "f2fde38b" 55 | } 56 | }, 57 | "abi": [ 58 | { 59 | "anonymous": false, 60 | "inputs": [ 61 | { 62 | "indexed": true, 63 | "internalType": "address", 64 | "name": "previousOwner", 65 | "type": "address" 66 | }, 67 | { 68 | "indexed": true, 69 | "internalType": "address", 70 | "name": "newOwner", 71 | "type": "address" 72 | } 73 | ], 74 | "name": "OwnershipTransferred", 75 | "type": "event" 76 | }, 77 | { 78 | "inputs": [], 79 | "name": "owner", 80 | "outputs": [ 81 | { 82 | "internalType": "address", 83 | "name": "", 84 | "type": "address" 85 | } 86 | ], 87 | "stateMutability": "view", 88 | "type": "function" 89 | }, 90 | { 91 | "inputs": [], 92 | "name": "renounceOwnership", 93 | "outputs": [], 94 | "stateMutability": "nonpayable", 95 | "type": "function" 96 | }, 97 | { 98 | "inputs": [ 99 | { 100 | "internalType": "address", 101 | "name": "newOwner", 102 | "type": "address" 103 | } 104 | ], 105 | "name": "transferOwnership", 106 | "outputs": [], 107 | "stateMutability": "nonpayable", 108 | "type": "function" 109 | } 110 | ] 111 | } -------------------------------------------------------------------------------- /.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) 3 | 4 | pragma solidity ^0.8.0; 5 | 6 | import "../utils/Context.sol"; 7 | 8 | /** 9 | * @dev Contract module which provides a basic access control mechanism, where 10 | * there is an account (an owner) that can be granted exclusive access to 11 | * specific functions. 12 | * 13 | * By default, the owner account will be the one that deploys the contract. This 14 | * can later be changed with {transferOwnership}. 15 | * 16 | * This module is used through inheritance. It will make available the modifier 17 | * `onlyOwner`, which can be applied to your functions to restrict their use to 18 | * the owner. 19 | */ 20 | abstract contract Ownable is Context { 21 | address private _owner; 22 | 23 | event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); 24 | 25 | /** 26 | * @dev Initializes the contract setting the deployer as the initial owner. 27 | */ 28 | constructor() { 29 | _transferOwnership(_msgSender()); 30 | } 31 | 32 | /** 33 | * @dev Throws if called by any account other than the owner. 34 | */ 35 | modifier onlyOwner() { 36 | _checkOwner(); 37 | _; 38 | } 39 | 40 | /** 41 | * @dev Returns the address of the current owner. 42 | */ 43 | function owner() public view virtual returns (address) { 44 | return _owner; 45 | } 46 | 47 | /** 48 | * @dev Throws if the sender is not the owner. 49 | */ 50 | function _checkOwner() internal view virtual { 51 | require(owner() == _msgSender(), "Ownable: caller is not the owner"); 52 | } 53 | 54 | /** 55 | * @dev Leaves the contract without owner. It will not be possible to call 56 | * `onlyOwner` functions. Can only be called by the current owner. 57 | * 58 | * NOTE: Renouncing ownership will leave the contract without an owner, 59 | * thereby disabling any functionality that is only available to the owner. 60 | */ 61 | function renounceOwnership() public virtual onlyOwner { 62 | _transferOwnership(address(0)); 63 | } 64 | 65 | /** 66 | * @dev Transfers ownership of the contract to a new account (`newOwner`). 67 | * Can only be called by the current owner. 68 | */ 69 | function transferOwnership(address newOwner) public virtual onlyOwner { 70 | require(newOwner != address(0), "Ownable: new owner is the zero address"); 71 | _transferOwnership(newOwner); 72 | } 73 | 74 | /** 75 | * @dev Transfers ownership of the contract to a new account (`newOwner`). 76 | * Internal function without access restriction. 77 | */ 78 | function _transferOwnership(address newOwner) internal virtual { 79 | address oldOwner = _owner; 80 | _owner = newOwner; 81 | emit OwnershipTransferred(oldOwner, newOwner); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/artifacts/Ownable_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.17+commit.8df45f5f" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "anonymous": false, 10 | "inputs": [ 11 | { 12 | "indexed": true, 13 | "internalType": "address", 14 | "name": "previousOwner", 15 | "type": "address" 16 | }, 17 | { 18 | "indexed": true, 19 | "internalType": "address", 20 | "name": "newOwner", 21 | "type": "address" 22 | } 23 | ], 24 | "name": "OwnershipTransferred", 25 | "type": "event" 26 | }, 27 | { 28 | "inputs": [], 29 | "name": "owner", 30 | "outputs": [ 31 | { 32 | "internalType": "address", 33 | "name": "", 34 | "type": "address" 35 | } 36 | ], 37 | "stateMutability": "view", 38 | "type": "function" 39 | }, 40 | { 41 | "inputs": [], 42 | "name": "renounceOwnership", 43 | "outputs": [], 44 | "stateMutability": "nonpayable", 45 | "type": "function" 46 | }, 47 | { 48 | "inputs": [ 49 | { 50 | "internalType": "address", 51 | "name": "newOwner", 52 | "type": "address" 53 | } 54 | ], 55 | "name": "transferOwnership", 56 | "outputs": [], 57 | "stateMutability": "nonpayable", 58 | "type": "function" 59 | } 60 | ], 61 | "devdoc": { 62 | "details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.", 63 | "kind": "dev", 64 | "methods": { 65 | "constructor": { 66 | "details": "Initializes the contract setting the deployer as the initial owner." 67 | }, 68 | "owner()": { 69 | "details": "Returns the address of the current owner." 70 | }, 71 | "renounceOwnership()": { 72 | "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." 73 | }, 74 | "transferOwnership(address)": { 75 | "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." 76 | } 77 | }, 78 | "version": 1 79 | }, 80 | "userdoc": { 81 | "kind": "user", 82 | "methods": {}, 83 | "version": 1 84 | } 85 | }, 86 | "settings": { 87 | "compilationTarget": { 88 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol": "Ownable" 89 | }, 90 | "evmVersion": "london", 91 | "libraries": {}, 92 | "metadata": { 93 | "bytecodeHash": "ipfs" 94 | }, 95 | "optimizer": { 96 | "enabled": false, 97 | "runs": 200 98 | }, 99 | "remappings": [] 100 | }, 101 | "sources": { 102 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol": { 103 | "keccak256": "0x923b9774b81c1abfb992262ae7763b6e6de77b077a7180d53c6ebb7b1c8bd648", 104 | "license": "MIT", 105 | "urls": [ 106 | "bzz-raw://53445dc0431f9b45c06f567c6091da961d4087bec0010cca5bd62100fa624a38", 107 | "dweb:/ipfs/QmNvBYpBv183czrAqNXr76E8M3LF93ouAJFeAcHfb59Rcx" 108 | ] 109 | }, 110 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol": { 111 | "keccak256": "0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7", 112 | "license": "MIT", 113 | "urls": [ 114 | "bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92", 115 | "dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3" 116 | ] 117 | } 118 | }, 119 | "version": 1 120 | } -------------------------------------------------------------------------------- /contracts/3_Ballot.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | 3 | pragma solidity >=0.7.0 <0.9.0; 4 | 5 | /** 6 | * @title Ballot 7 | * @dev Implements voting process along with vote delegation 8 | */ 9 | contract Ballot { 10 | 11 | struct Voter { 12 | uint weight; // weight is accumulated by delegation 13 | bool voted; // if true, that person already voted 14 | address delegate; // person delegated to 15 | uint vote; // index of the voted proposal 16 | } 17 | 18 | struct Proposal { 19 | // If you can limit the length to a certain number of bytes, 20 | // always use one of bytes1 to bytes32 because they are much cheaper 21 | bytes32 name; // short name (up to 32 bytes) 22 | uint voteCount; // number of accumulated votes 23 | } 24 | 25 | address public chairperson; 26 | 27 | mapping(address => Voter) public voters; 28 | 29 | Proposal[] public proposals; 30 | 31 | /** 32 | * @dev Create a new ballot to choose one of 'proposalNames'. 33 | * @param proposalNames names of proposals 34 | */ 35 | constructor(bytes32[] memory proposalNames) { 36 | chairperson = msg.sender; 37 | voters[chairperson].weight = 1; 38 | 39 | for (uint i = 0; i < proposalNames.length; i++) { 40 | // 'Proposal({...})' creates a temporary 41 | // Proposal object and 'proposals.push(...)' 42 | // appends it to the end of 'proposals'. 43 | proposals.push(Proposal({ 44 | name: proposalNames[i], 45 | voteCount: 0 46 | })); 47 | } 48 | } 49 | 50 | /** 51 | * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. 52 | * @param voter address of voter 53 | */ 54 | function giveRightToVote(address voter) public { 55 | require( 56 | msg.sender == chairperson, 57 | "Only chairperson can give right to vote." 58 | ); 59 | require( 60 | !voters[voter].voted, 61 | "The voter already voted." 62 | ); 63 | require(voters[voter].weight == 0); 64 | voters[voter].weight = 1; 65 | } 66 | 67 | /** 68 | * @dev Delegate your vote to the voter 'to'. 69 | * @param to address to which vote is delegated 70 | */ 71 | function delegate(address to) public { 72 | Voter storage sender = voters[msg.sender]; 73 | require(!sender.voted, "You already voted."); 74 | require(to != msg.sender, "Self-delegation is disallowed."); 75 | 76 | while (voters[to].delegate != address(0)) { 77 | to = voters[to].delegate; 78 | 79 | // We found a loop in the delegation, not allowed. 80 | require(to != msg.sender, "Found loop in delegation."); 81 | } 82 | sender.voted = true; 83 | sender.delegate = to; 84 | Voter storage delegate_ = voters[to]; 85 | if (delegate_.voted) { 86 | // If the delegate already voted, 87 | // directly add to the number of votes 88 | proposals[delegate_.vote].voteCount += sender.weight; 89 | } else { 90 | // If the delegate did not vote yet, 91 | // add to her weight. 92 | delegate_.weight += sender.weight; 93 | } 94 | } 95 | 96 | /** 97 | * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. 98 | * @param proposal index of proposal in the proposals array 99 | */ 100 | function vote(uint proposal) public { 101 | Voter storage sender = voters[msg.sender]; 102 | require(sender.weight != 0, "Has no right to vote"); 103 | require(!sender.voted, "Already voted."); 104 | sender.voted = true; 105 | sender.vote = proposal; 106 | 107 | // If 'proposal' is out of the range of the array, 108 | // this will throw automatically and revert all 109 | // changes. 110 | proposals[proposal].voteCount += sender.weight; 111 | } 112 | 113 | /** 114 | * @dev Computes the winning proposal taking all previous votes into account. 115 | * @return winningProposal_ index of winning proposal in the proposals array 116 | */ 117 | function winningProposal() public view 118 | returns (uint winningProposal_) 119 | { 120 | uint winningVoteCount = 0; 121 | for (uint p = 0; p < proposals.length; p++) { 122 | if (proposals[p].voteCount > winningVoteCount) { 123 | winningVoteCount = proposals[p].voteCount; 124 | winningProposal_ = p; 125 | } 126 | } 127 | } 128 | 129 | /** 130 | * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then 131 | * @return winnerName_ the name of the winner 132 | */ 133 | function winnerName() public view 134 | returns (bytes32 winnerName_) 135 | { 136 | winnerName_ = proposals[winningProposal()].name; 137 | } 138 | } -------------------------------------------------------------------------------- /contracts/artifacts/SharedWallet_metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "version": "0.8.17+commit.8df45f5f" 4 | }, 5 | "language": "Solidity", 6 | "output": { 7 | "abi": [ 8 | { 9 | "inputs": [], 10 | "stateMutability": "nonpayable", 11 | "type": "constructor" 12 | }, 13 | { 14 | "anonymous": false, 15 | "inputs": [ 16 | { 17 | "indexed": true, 18 | "internalType": "address", 19 | "name": "_forWho", 20 | "type": "address" 21 | }, 22 | { 23 | "indexed": true, 24 | "internalType": "address", 25 | "name": "_fromWhom", 26 | "type": "address" 27 | }, 28 | { 29 | "indexed": false, 30 | "internalType": "uint256", 31 | "name": "_oldAmount", 32 | "type": "uint256" 33 | }, 34 | { 35 | "indexed": false, 36 | "internalType": "uint256", 37 | "name": "_newAmount", 38 | "type": "uint256" 39 | } 40 | ], 41 | "name": "AllowanceChanged", 42 | "type": "event" 43 | }, 44 | { 45 | "anonymous": false, 46 | "inputs": [ 47 | { 48 | "indexed": true, 49 | "internalType": "address", 50 | "name": "_from", 51 | "type": "address" 52 | }, 53 | { 54 | "indexed": false, 55 | "internalType": "uint256", 56 | "name": "_amount", 57 | "type": "uint256" 58 | } 59 | ], 60 | "name": "MoneyReceived", 61 | "type": "event" 62 | }, 63 | { 64 | "anonymous": false, 65 | "inputs": [ 66 | { 67 | "indexed": true, 68 | "internalType": "address", 69 | "name": "_beneficiary", 70 | "type": "address" 71 | }, 72 | { 73 | "indexed": false, 74 | "internalType": "uint256", 75 | "name": "_amount", 76 | "type": "uint256" 77 | } 78 | ], 79 | "name": "MoneySent", 80 | "type": "event" 81 | }, 82 | { 83 | "anonymous": false, 84 | "inputs": [ 85 | { 86 | "indexed": true, 87 | "internalType": "address", 88 | "name": "previousOwner", 89 | "type": "address" 90 | }, 91 | { 92 | "indexed": true, 93 | "internalType": "address", 94 | "name": "newOwner", 95 | "type": "address" 96 | } 97 | ], 98 | "name": "OwnershipTransferred", 99 | "type": "event" 100 | }, 101 | { 102 | "inputs": [], 103 | "name": "SendMoneyToContract", 104 | "outputs": [], 105 | "stateMutability": "payable", 106 | "type": "function" 107 | }, 108 | { 109 | "inputs": [ 110 | { 111 | "internalType": "address", 112 | "name": "_who", 113 | "type": "address" 114 | }, 115 | { 116 | "internalType": "uint256", 117 | "name": "_amount", 118 | "type": "uint256" 119 | } 120 | ], 121 | "name": "addAllowance", 122 | "outputs": [], 123 | "stateMutability": "nonpayable", 124 | "type": "function" 125 | }, 126 | { 127 | "inputs": [ 128 | { 129 | "internalType": "address", 130 | "name": "", 131 | "type": "address" 132 | } 133 | ], 134 | "name": "allowance", 135 | "outputs": [ 136 | { 137 | "internalType": "uint256", 138 | "name": "", 139 | "type": "uint256" 140 | } 141 | ], 142 | "stateMutability": "view", 143 | "type": "function" 144 | }, 145 | { 146 | "inputs": [], 147 | "name": "isOwner", 148 | "outputs": [ 149 | { 150 | "internalType": "bool", 151 | "name": "", 152 | "type": "bool" 153 | } 154 | ], 155 | "stateMutability": "view", 156 | "type": "function" 157 | }, 158 | { 159 | "inputs": [], 160 | "name": "isowner", 161 | "outputs": [ 162 | { 163 | "internalType": "address", 164 | "name": "", 165 | "type": "address" 166 | } 167 | ], 168 | "stateMutability": "view", 169 | "type": "function" 170 | }, 171 | { 172 | "inputs": [], 173 | "name": "owner", 174 | "outputs": [ 175 | { 176 | "internalType": "address", 177 | "name": "", 178 | "type": "address" 179 | } 180 | ], 181 | "stateMutability": "view", 182 | "type": "function" 183 | }, 184 | { 185 | "inputs": [], 186 | "name": "renounceOwnership", 187 | "outputs": [], 188 | "stateMutability": "nonpayable", 189 | "type": "function" 190 | }, 191 | { 192 | "inputs": [ 193 | { 194 | "internalType": "address", 195 | "name": "newOwner", 196 | "type": "address" 197 | } 198 | ], 199 | "name": "transferOwnership", 200 | "outputs": [], 201 | "stateMutability": "nonpayable", 202 | "type": "function" 203 | }, 204 | { 205 | "inputs": [ 206 | { 207 | "internalType": "address payable", 208 | "name": "_to", 209 | "type": "address" 210 | }, 211 | { 212 | "internalType": "uint256", 213 | "name": "_amount", 214 | "type": "uint256" 215 | } 216 | ], 217 | "name": "withdrawMoney", 218 | "outputs": [], 219 | "stateMutability": "nonpayable", 220 | "type": "function" 221 | } 222 | ], 223 | "devdoc": { 224 | "kind": "dev", 225 | "methods": { 226 | "owner()": { 227 | "details": "Returns the address of the current owner." 228 | }, 229 | "renounceOwnership()": { 230 | "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." 231 | }, 232 | "transferOwnership(address)": { 233 | "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." 234 | } 235 | }, 236 | "version": 1 237 | }, 238 | "userdoc": { 239 | "kind": "user", 240 | "methods": {}, 241 | "version": 1 242 | } 243 | }, 244 | "settings": { 245 | "compilationTarget": { 246 | "contracts/SharedWalletProject.sol": "SharedWallet" 247 | }, 248 | "evmVersion": "london", 249 | "libraries": {}, 250 | "metadata": { 251 | "bytecodeHash": "ipfs" 252 | }, 253 | "optimizer": { 254 | "enabled": false, 255 | "runs": 200 256 | }, 257 | "remappings": [] 258 | }, 259 | "sources": { 260 | "contracts/SharedWalletProject.sol": { 261 | "keccak256": "0x58f6e3aed6dba72b9e5bb3c8081a46a597cd9a1d60c9ba3a417449358fe705a7", 262 | "license": "MIT", 263 | "urls": [ 264 | "bzz-raw://85e1a6371127f4f9c328a28daebddfc0115117b48feb6a6a5b03beca7c65c8c5", 265 | "dweb:/ipfs/QmNhzQmnHvopTV6Rmu73QftY1qvZmTdMY2YasyedSc6iKb" 266 | ] 267 | }, 268 | "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol": { 269 | "keccak256": "0x923b9774b81c1abfb992262ae7763b6e6de77b077a7180d53c6ebb7b1c8bd648", 270 | "license": "MIT", 271 | "urls": [ 272 | "bzz-raw://53445dc0431f9b45c06f567c6091da961d4087bec0010cca5bd62100fa624a38", 273 | "dweb:/ipfs/QmNvBYpBv183czrAqNXr76E8M3LF93ouAJFeAcHfb59Rcx" 274 | ] 275 | }, 276 | "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol": { 277 | "keccak256": "0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7", 278 | "license": "MIT", 279 | "urls": [ 280 | "bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92", 281 | "dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3" 282 | ] 283 | } 284 | }, 285 | "version": 1 286 | } -------------------------------------------------------------------------------- /.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/artifacts/build-info/2c0b4af7b67464778b8890565e02017b.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "2c0b4af7b67464778b8890565e02017b", 3 | "_format": "hh-sol-build-info-1", 4 | "solcVersion": "0.8.17", 5 | "solcLongVersion": "0.8.17+commit.8df45f5f", 6 | "input": { 7 | "language": "Solidity", 8 | "sources": { 9 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol": { 10 | "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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" 11 | }, 12 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol": { 13 | "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" 14 | } 15 | }, 16 | "settings": { 17 | "optimizer": { 18 | "enabled": false, 19 | "runs": 200 20 | }, 21 | "outputSelection": { 22 | "*": { 23 | "": [ 24 | "ast" 25 | ], 26 | "*": [ 27 | "abi", 28 | "metadata", 29 | "devdoc", 30 | "userdoc", 31 | "storageLayout", 32 | "evm.legacyAssembly", 33 | "evm.bytecode", 34 | "evm.deployedBytecode", 35 | "evm.methodIdentifiers", 36 | "evm.gasEstimates", 37 | "evm.assembly" 38 | ] 39 | } 40 | } 41 | } 42 | }, 43 | "output": { 44 | "contracts": { 45 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol": { 46 | "Ownable": { 47 | "abi": [ 48 | { 49 | "anonymous": false, 50 | "inputs": [ 51 | { 52 | "indexed": true, 53 | "internalType": "address", 54 | "name": "previousOwner", 55 | "type": "address" 56 | }, 57 | { 58 | "indexed": true, 59 | "internalType": "address", 60 | "name": "newOwner", 61 | "type": "address" 62 | } 63 | ], 64 | "name": "OwnershipTransferred", 65 | "type": "event" 66 | }, 67 | { 68 | "inputs": [], 69 | "name": "owner", 70 | "outputs": [ 71 | { 72 | "internalType": "address", 73 | "name": "", 74 | "type": "address" 75 | } 76 | ], 77 | "stateMutability": "view", 78 | "type": "function" 79 | }, 80 | { 81 | "inputs": [], 82 | "name": "renounceOwnership", 83 | "outputs": [], 84 | "stateMutability": "nonpayable", 85 | "type": "function" 86 | }, 87 | { 88 | "inputs": [ 89 | { 90 | "internalType": "address", 91 | "name": "newOwner", 92 | "type": "address" 93 | } 94 | ], 95 | "name": "transferOwnership", 96 | "outputs": [], 97 | "stateMutability": "nonpayable", 98 | "type": "function" 99 | } 100 | ], 101 | "devdoc": { 102 | "details": "Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.", 103 | "kind": "dev", 104 | "methods": { 105 | "constructor": { 106 | "details": "Initializes the contract setting the deployer as the initial owner." 107 | }, 108 | "owner()": { 109 | "details": "Returns the address of the current owner." 110 | }, 111 | "renounceOwnership()": { 112 | "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." 113 | }, 114 | "transferOwnership(address)": { 115 | "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." 116 | } 117 | }, 118 | "version": 1 119 | }, 120 | "evm": { 121 | "assembly": "", 122 | "bytecode": { 123 | "functionDebugData": {}, 124 | "generatedSources": [], 125 | "linkReferences": {}, 126 | "object": "", 127 | "opcodes": "", 128 | "sourceMap": "" 129 | }, 130 | "deployedBytecode": { 131 | "functionDebugData": {}, 132 | "generatedSources": [], 133 | "immutableReferences": {}, 134 | "linkReferences": {}, 135 | "object": "", 136 | "opcodes": "", 137 | "sourceMap": "" 138 | }, 139 | "gasEstimates": null, 140 | "legacyAssembly": null, 141 | "methodIdentifiers": { 142 | "owner()": "8da5cb5b", 143 | "renounceOwnership()": "715018a6", 144 | "transferOwnership(address)": "f2fde38b" 145 | } 146 | }, 147 | "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions. By default, the owner account will be the one that deploys the contract. This can later be changed with {transferOwnership}. This module is used through inheritance. It will make available the modifier `onlyOwner`, which can be applied to your functions to restrict their use to the owner.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the contract setting the deployer as the initial owner.\"},\"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\":{\".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol\":\"Ownable\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol\":{\"keccak256\":\"0x923b9774b81c1abfb992262ae7763b6e6de77b077a7180d53c6ebb7b1c8bd648\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://53445dc0431f9b45c06f567c6091da961d4087bec0010cca5bd62100fa624a38\",\"dweb:/ipfs/QmNvBYpBv183czrAqNXr76E8M3LF93ouAJFeAcHfb59Rcx\"]},\".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", 148 | "storageLayout": { 149 | "storage": [ 150 | { 151 | "astId": 7, 152 | "contract": ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol:Ownable", 153 | "label": "_owner", 154 | "offset": 0, 155 | "slot": "0", 156 | "type": "t_address" 157 | } 158 | ], 159 | "types": { 160 | "t_address": { 161 | "encoding": "inplace", 162 | "label": "address", 163 | "numberOfBytes": "20" 164 | } 165 | } 166 | }, 167 | "userdoc": { 168 | "kind": "user", 169 | "methods": {}, 170 | "version": 1 171 | } 172 | } 173 | }, 174 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol": { 175 | "Context": { 176 | "abi": [], 177 | "devdoc": { 178 | "details": "Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.", 179 | "kind": "dev", 180 | "methods": {}, 181 | "version": 1 182 | }, 183 | "evm": { 184 | "assembly": "", 185 | "bytecode": { 186 | "functionDebugData": {}, 187 | "generatedSources": [], 188 | "linkReferences": {}, 189 | "object": "", 190 | "opcodes": "", 191 | "sourceMap": "" 192 | }, 193 | "deployedBytecode": { 194 | "functionDebugData": {}, 195 | "generatedSources": [], 196 | "immutableReferences": {}, 197 | "linkReferences": {}, 198 | "object": "", 199 | "opcodes": "", 200 | "sourceMap": "" 201 | }, 202 | "gasEstimates": null, 203 | "legacyAssembly": null, 204 | "methodIdentifiers": {} 205 | }, 206 | "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}", 207 | "storageLayout": { 208 | "storage": [], 209 | "types": null 210 | }, 211 | "userdoc": { 212 | "kind": "user", 213 | "methods": {}, 214 | "version": 1 215 | } 216 | } 217 | } 218 | }, 219 | "sources": { 220 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol": { 221 | "ast": { 222 | "absolutePath": ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/access/Ownable.sol", 223 | "exportedSymbols": { 224 | "Context": [ 225 | 134 226 | ], 227 | "Ownable": [ 228 | 112 229 | ] 230 | }, 231 | "id": 113, 232 | "license": "MIT", 233 | "nodeType": "SourceUnit", 234 | "nodes": [ 235 | { 236 | "id": 1, 237 | "literals": [ 238 | "solidity", 239 | "^", 240 | "0.8", 241 | ".0" 242 | ], 243 | "nodeType": "PragmaDirective", 244 | "src": "102:23:0" 245 | }, 246 | { 247 | "absolutePath": ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol", 248 | "file": "../utils/Context.sol", 249 | "id": 2, 250 | "nameLocation": "-1:-1:-1", 251 | "nodeType": "ImportDirective", 252 | "scope": 113, 253 | "sourceUnit": 135, 254 | "src": "127:30:0", 255 | "symbolAliases": [], 256 | "unitAlias": "" 257 | }, 258 | { 259 | "abstract": true, 260 | "baseContracts": [ 261 | { 262 | "baseName": { 263 | "id": 4, 264 | "name": "Context", 265 | "nameLocations": [ 266 | "683:7:0" 267 | ], 268 | "nodeType": "IdentifierPath", 269 | "referencedDeclaration": 134, 270 | "src": "683:7:0" 271 | }, 272 | "id": 5, 273 | "nodeType": "InheritanceSpecifier", 274 | "src": "683:7:0" 275 | } 276 | ], 277 | "canonicalName": "Ownable", 278 | "contractDependencies": [], 279 | "contractKind": "contract", 280 | "documentation": { 281 | "id": 3, 282 | "nodeType": "StructuredDocumentation", 283 | "src": "159:494:0", 284 | "text": " @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 By default, the owner account will be the one that deploys the contract. This\n can later be changed with {transferOwnership}.\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." 285 | }, 286 | "fullyImplemented": true, 287 | "id": 112, 288 | "linearizedBaseContracts": [ 289 | 112, 290 | 134 291 | ], 292 | "name": "Ownable", 293 | "nameLocation": "672:7:0", 294 | "nodeType": "ContractDefinition", 295 | "nodes": [ 296 | { 297 | "constant": false, 298 | "id": 7, 299 | "mutability": "mutable", 300 | "name": "_owner", 301 | "nameLocation": "713:6:0", 302 | "nodeType": "VariableDeclaration", 303 | "scope": 112, 304 | "src": "697:22:0", 305 | "stateVariable": true, 306 | "storageLocation": "default", 307 | "typeDescriptions": { 308 | "typeIdentifier": "t_address", 309 | "typeString": "address" 310 | }, 311 | "typeName": { 312 | "id": 6, 313 | "name": "address", 314 | "nodeType": "ElementaryTypeName", 315 | "src": "697:7:0", 316 | "stateMutability": "nonpayable", 317 | "typeDescriptions": { 318 | "typeIdentifier": "t_address", 319 | "typeString": "address" 320 | } 321 | }, 322 | "visibility": "private" 323 | }, 324 | { 325 | "anonymous": false, 326 | "eventSelector": "8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", 327 | "id": 13, 328 | "name": "OwnershipTransferred", 329 | "nameLocation": "732:20:0", 330 | "nodeType": "EventDefinition", 331 | "parameters": { 332 | "id": 12, 333 | "nodeType": "ParameterList", 334 | "parameters": [ 335 | { 336 | "constant": false, 337 | "id": 9, 338 | "indexed": true, 339 | "mutability": "mutable", 340 | "name": "previousOwner", 341 | "nameLocation": "769:13:0", 342 | "nodeType": "VariableDeclaration", 343 | "scope": 13, 344 | "src": "753:29:0", 345 | "stateVariable": false, 346 | "storageLocation": "default", 347 | "typeDescriptions": { 348 | "typeIdentifier": "t_address", 349 | "typeString": "address" 350 | }, 351 | "typeName": { 352 | "id": 8, 353 | "name": "address", 354 | "nodeType": "ElementaryTypeName", 355 | "src": "753:7:0", 356 | "stateMutability": "nonpayable", 357 | "typeDescriptions": { 358 | "typeIdentifier": "t_address", 359 | "typeString": "address" 360 | } 361 | }, 362 | "visibility": "internal" 363 | }, 364 | { 365 | "constant": false, 366 | "id": 11, 367 | "indexed": true, 368 | "mutability": "mutable", 369 | "name": "newOwner", 370 | "nameLocation": "800:8:0", 371 | "nodeType": "VariableDeclaration", 372 | "scope": 13, 373 | "src": "784:24:0", 374 | "stateVariable": false, 375 | "storageLocation": "default", 376 | "typeDescriptions": { 377 | "typeIdentifier": "t_address", 378 | "typeString": "address" 379 | }, 380 | "typeName": { 381 | "id": 10, 382 | "name": "address", 383 | "nodeType": "ElementaryTypeName", 384 | "src": "784:7:0", 385 | "stateMutability": "nonpayable", 386 | "typeDescriptions": { 387 | "typeIdentifier": "t_address", 388 | "typeString": "address" 389 | } 390 | }, 391 | "visibility": "internal" 392 | } 393 | ], 394 | "src": "752:57:0" 395 | }, 396 | "src": "726:84:0" 397 | }, 398 | { 399 | "body": { 400 | "id": 22, 401 | "nodeType": "Block", 402 | "src": "926:49:0", 403 | "statements": [ 404 | { 405 | "expression": { 406 | "arguments": [ 407 | { 408 | "arguments": [], 409 | "expression": { 410 | "argumentTypes": [], 411 | "id": 18, 412 | "name": "_msgSender", 413 | "nodeType": "Identifier", 414 | "overloadedDeclarations": [], 415 | "referencedDeclaration": 124, 416 | "src": "955:10:0", 417 | "typeDescriptions": { 418 | "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", 419 | "typeString": "function () view returns (address)" 420 | } 421 | }, 422 | "id": 19, 423 | "isConstant": false, 424 | "isLValue": false, 425 | "isPure": false, 426 | "kind": "functionCall", 427 | "lValueRequested": false, 428 | "nameLocations": [], 429 | "names": [], 430 | "nodeType": "FunctionCall", 431 | "src": "955:12:0", 432 | "tryCall": false, 433 | "typeDescriptions": { 434 | "typeIdentifier": "t_address", 435 | "typeString": "address" 436 | } 437 | } 438 | ], 439 | "expression": { 440 | "argumentTypes": [ 441 | { 442 | "typeIdentifier": "t_address", 443 | "typeString": "address" 444 | } 445 | ], 446 | "id": 17, 447 | "name": "_transferOwnership", 448 | "nodeType": "Identifier", 449 | "overloadedDeclarations": [], 450 | "referencedDeclaration": 111, 451 | "src": "936:18:0", 452 | "typeDescriptions": { 453 | "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", 454 | "typeString": "function (address)" 455 | } 456 | }, 457 | "id": 20, 458 | "isConstant": false, 459 | "isLValue": false, 460 | "isPure": false, 461 | "kind": "functionCall", 462 | "lValueRequested": false, 463 | "nameLocations": [], 464 | "names": [], 465 | "nodeType": "FunctionCall", 466 | "src": "936:32:0", 467 | "tryCall": false, 468 | "typeDescriptions": { 469 | "typeIdentifier": "t_tuple$__$", 470 | "typeString": "tuple()" 471 | } 472 | }, 473 | "id": 21, 474 | "nodeType": "ExpressionStatement", 475 | "src": "936:32:0" 476 | } 477 | ] 478 | }, 479 | "documentation": { 480 | "id": 14, 481 | "nodeType": "StructuredDocumentation", 482 | "src": "816:91:0", 483 | "text": " @dev Initializes the contract setting the deployer as the initial owner." 484 | }, 485 | "id": 23, 486 | "implemented": true, 487 | "kind": "constructor", 488 | "modifiers": [], 489 | "name": "", 490 | "nameLocation": "-1:-1:-1", 491 | "nodeType": "FunctionDefinition", 492 | "parameters": { 493 | "id": 15, 494 | "nodeType": "ParameterList", 495 | "parameters": [], 496 | "src": "923:2:0" 497 | }, 498 | "returnParameters": { 499 | "id": 16, 500 | "nodeType": "ParameterList", 501 | "parameters": [], 502 | "src": "926:0:0" 503 | }, 504 | "scope": 112, 505 | "src": "912:63:0", 506 | "stateMutability": "nonpayable", 507 | "virtual": false, 508 | "visibility": "internal" 509 | }, 510 | { 511 | "body": { 512 | "id": 30, 513 | "nodeType": "Block", 514 | "src": "1084:41:0", 515 | "statements": [ 516 | { 517 | "expression": { 518 | "arguments": [], 519 | "expression": { 520 | "argumentTypes": [], 521 | "id": 26, 522 | "name": "_checkOwner", 523 | "nodeType": "Identifier", 524 | "overloadedDeclarations": [], 525 | "referencedDeclaration": 54, 526 | "src": "1094:11:0", 527 | "typeDescriptions": { 528 | "typeIdentifier": "t_function_internal_view$__$returns$__$", 529 | "typeString": "function () view" 530 | } 531 | }, 532 | "id": 27, 533 | "isConstant": false, 534 | "isLValue": false, 535 | "isPure": false, 536 | "kind": "functionCall", 537 | "lValueRequested": false, 538 | "nameLocations": [], 539 | "names": [], 540 | "nodeType": "FunctionCall", 541 | "src": "1094:13:0", 542 | "tryCall": false, 543 | "typeDescriptions": { 544 | "typeIdentifier": "t_tuple$__$", 545 | "typeString": "tuple()" 546 | } 547 | }, 548 | "id": 28, 549 | "nodeType": "ExpressionStatement", 550 | "src": "1094:13:0" 551 | }, 552 | { 553 | "id": 29, 554 | "nodeType": "PlaceholderStatement", 555 | "src": "1117:1:0" 556 | } 557 | ] 558 | }, 559 | "documentation": { 560 | "id": 24, 561 | "nodeType": "StructuredDocumentation", 562 | "src": "981:77:0", 563 | "text": " @dev Throws if called by any account other than the owner." 564 | }, 565 | "id": 31, 566 | "name": "onlyOwner", 567 | "nameLocation": "1072:9:0", 568 | "nodeType": "ModifierDefinition", 569 | "parameters": { 570 | "id": 25, 571 | "nodeType": "ParameterList", 572 | "parameters": [], 573 | "src": "1081:2:0" 574 | }, 575 | "src": "1063:62:0", 576 | "virtual": false, 577 | "visibility": "internal" 578 | }, 579 | { 580 | "body": { 581 | "id": 39, 582 | "nodeType": "Block", 583 | "src": "1256:30:0", 584 | "statements": [ 585 | { 586 | "expression": { 587 | "id": 37, 588 | "name": "_owner", 589 | "nodeType": "Identifier", 590 | "overloadedDeclarations": [], 591 | "referencedDeclaration": 7, 592 | "src": "1273:6:0", 593 | "typeDescriptions": { 594 | "typeIdentifier": "t_address", 595 | "typeString": "address" 596 | } 597 | }, 598 | "functionReturnParameters": 36, 599 | "id": 38, 600 | "nodeType": "Return", 601 | "src": "1266:13:0" 602 | } 603 | ] 604 | }, 605 | "documentation": { 606 | "id": 32, 607 | "nodeType": "StructuredDocumentation", 608 | "src": "1131:65:0", 609 | "text": " @dev Returns the address of the current owner." 610 | }, 611 | "functionSelector": "8da5cb5b", 612 | "id": 40, 613 | "implemented": true, 614 | "kind": "function", 615 | "modifiers": [], 616 | "name": "owner", 617 | "nameLocation": "1210:5:0", 618 | "nodeType": "FunctionDefinition", 619 | "parameters": { 620 | "id": 33, 621 | "nodeType": "ParameterList", 622 | "parameters": [], 623 | "src": "1215:2:0" 624 | }, 625 | "returnParameters": { 626 | "id": 36, 627 | "nodeType": "ParameterList", 628 | "parameters": [ 629 | { 630 | "constant": false, 631 | "id": 35, 632 | "mutability": "mutable", 633 | "name": "", 634 | "nameLocation": "-1:-1:-1", 635 | "nodeType": "VariableDeclaration", 636 | "scope": 40, 637 | "src": "1247:7:0", 638 | "stateVariable": false, 639 | "storageLocation": "default", 640 | "typeDescriptions": { 641 | "typeIdentifier": "t_address", 642 | "typeString": "address" 643 | }, 644 | "typeName": { 645 | "id": 34, 646 | "name": "address", 647 | "nodeType": "ElementaryTypeName", 648 | "src": "1247:7:0", 649 | "stateMutability": "nonpayable", 650 | "typeDescriptions": { 651 | "typeIdentifier": "t_address", 652 | "typeString": "address" 653 | } 654 | }, 655 | "visibility": "internal" 656 | } 657 | ], 658 | "src": "1246:9:0" 659 | }, 660 | "scope": 112, 661 | "src": "1201:85:0", 662 | "stateMutability": "view", 663 | "virtual": true, 664 | "visibility": "public" 665 | }, 666 | { 667 | "body": { 668 | "id": 53, 669 | "nodeType": "Block", 670 | "src": "1404:85:0", 671 | "statements": [ 672 | { 673 | "expression": { 674 | "arguments": [ 675 | { 676 | "commonType": { 677 | "typeIdentifier": "t_address", 678 | "typeString": "address" 679 | }, 680 | "id": 49, 681 | "isConstant": false, 682 | "isLValue": false, 683 | "isPure": false, 684 | "lValueRequested": false, 685 | "leftExpression": { 686 | "arguments": [], 687 | "expression": { 688 | "argumentTypes": [], 689 | "id": 45, 690 | "name": "owner", 691 | "nodeType": "Identifier", 692 | "overloadedDeclarations": [], 693 | "referencedDeclaration": 40, 694 | "src": "1422:5:0", 695 | "typeDescriptions": { 696 | "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", 697 | "typeString": "function () view returns (address)" 698 | } 699 | }, 700 | "id": 46, 701 | "isConstant": false, 702 | "isLValue": false, 703 | "isPure": false, 704 | "kind": "functionCall", 705 | "lValueRequested": false, 706 | "nameLocations": [], 707 | "names": [], 708 | "nodeType": "FunctionCall", 709 | "src": "1422:7:0", 710 | "tryCall": false, 711 | "typeDescriptions": { 712 | "typeIdentifier": "t_address", 713 | "typeString": "address" 714 | } 715 | }, 716 | "nodeType": "BinaryOperation", 717 | "operator": "==", 718 | "rightExpression": { 719 | "arguments": [], 720 | "expression": { 721 | "argumentTypes": [], 722 | "id": 47, 723 | "name": "_msgSender", 724 | "nodeType": "Identifier", 725 | "overloadedDeclarations": [], 726 | "referencedDeclaration": 124, 727 | "src": "1433:10:0", 728 | "typeDescriptions": { 729 | "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", 730 | "typeString": "function () view returns (address)" 731 | } 732 | }, 733 | "id": 48, 734 | "isConstant": false, 735 | "isLValue": false, 736 | "isPure": false, 737 | "kind": "functionCall", 738 | "lValueRequested": false, 739 | "nameLocations": [], 740 | "names": [], 741 | "nodeType": "FunctionCall", 742 | "src": "1433:12:0", 743 | "tryCall": false, 744 | "typeDescriptions": { 745 | "typeIdentifier": "t_address", 746 | "typeString": "address" 747 | } 748 | }, 749 | "src": "1422:23:0", 750 | "typeDescriptions": { 751 | "typeIdentifier": "t_bool", 752 | "typeString": "bool" 753 | } 754 | }, 755 | { 756 | "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", 757 | "id": 50, 758 | "isConstant": false, 759 | "isLValue": false, 760 | "isPure": true, 761 | "kind": "string", 762 | "lValueRequested": false, 763 | "nodeType": "Literal", 764 | "src": "1447:34:0", 765 | "typeDescriptions": { 766 | "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", 767 | "typeString": "literal_string \"Ownable: caller is not the owner\"" 768 | }, 769 | "value": "Ownable: caller is not the owner" 770 | } 771 | ], 772 | "expression": { 773 | "argumentTypes": [ 774 | { 775 | "typeIdentifier": "t_bool", 776 | "typeString": "bool" 777 | }, 778 | { 779 | "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", 780 | "typeString": "literal_string \"Ownable: caller is not the owner\"" 781 | } 782 | ], 783 | "id": 44, 784 | "name": "require", 785 | "nodeType": "Identifier", 786 | "overloadedDeclarations": [ 787 | 4294967278, 788 | 4294967278 789 | ], 790 | "referencedDeclaration": 4294967278, 791 | "src": "1414:7:0", 792 | "typeDescriptions": { 793 | "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", 794 | "typeString": "function (bool,string memory) pure" 795 | } 796 | }, 797 | "id": 51, 798 | "isConstant": false, 799 | "isLValue": false, 800 | "isPure": false, 801 | "kind": "functionCall", 802 | "lValueRequested": false, 803 | "nameLocations": [], 804 | "names": [], 805 | "nodeType": "FunctionCall", 806 | "src": "1414:68:0", 807 | "tryCall": false, 808 | "typeDescriptions": { 809 | "typeIdentifier": "t_tuple$__$", 810 | "typeString": "tuple()" 811 | } 812 | }, 813 | "id": 52, 814 | "nodeType": "ExpressionStatement", 815 | "src": "1414:68:0" 816 | } 817 | ] 818 | }, 819 | "documentation": { 820 | "id": 41, 821 | "nodeType": "StructuredDocumentation", 822 | "src": "1292:62:0", 823 | "text": " @dev Throws if the sender is not the owner." 824 | }, 825 | "id": 54, 826 | "implemented": true, 827 | "kind": "function", 828 | "modifiers": [], 829 | "name": "_checkOwner", 830 | "nameLocation": "1368:11:0", 831 | "nodeType": "FunctionDefinition", 832 | "parameters": { 833 | "id": 42, 834 | "nodeType": "ParameterList", 835 | "parameters": [], 836 | "src": "1379:2:0" 837 | }, 838 | "returnParameters": { 839 | "id": 43, 840 | "nodeType": "ParameterList", 841 | "parameters": [], 842 | "src": "1404:0:0" 843 | }, 844 | "scope": 112, 845 | "src": "1359:130:0", 846 | "stateMutability": "view", 847 | "virtual": true, 848 | "visibility": "internal" 849 | }, 850 | { 851 | "body": { 852 | "id": 67, 853 | "nodeType": "Block", 854 | "src": "1878:47:0", 855 | "statements": [ 856 | { 857 | "expression": { 858 | "arguments": [ 859 | { 860 | "arguments": [ 861 | { 862 | "hexValue": "30", 863 | "id": 63, 864 | "isConstant": false, 865 | "isLValue": false, 866 | "isPure": true, 867 | "kind": "number", 868 | "lValueRequested": false, 869 | "nodeType": "Literal", 870 | "src": "1915:1:0", 871 | "typeDescriptions": { 872 | "typeIdentifier": "t_rational_0_by_1", 873 | "typeString": "int_const 0" 874 | }, 875 | "value": "0" 876 | } 877 | ], 878 | "expression": { 879 | "argumentTypes": [ 880 | { 881 | "typeIdentifier": "t_rational_0_by_1", 882 | "typeString": "int_const 0" 883 | } 884 | ], 885 | "id": 62, 886 | "isConstant": false, 887 | "isLValue": false, 888 | "isPure": true, 889 | "lValueRequested": false, 890 | "nodeType": "ElementaryTypeNameExpression", 891 | "src": "1907:7:0", 892 | "typeDescriptions": { 893 | "typeIdentifier": "t_type$_t_address_$", 894 | "typeString": "type(address)" 895 | }, 896 | "typeName": { 897 | "id": 61, 898 | "name": "address", 899 | "nodeType": "ElementaryTypeName", 900 | "src": "1907:7:0", 901 | "typeDescriptions": {} 902 | } 903 | }, 904 | "id": 64, 905 | "isConstant": false, 906 | "isLValue": false, 907 | "isPure": true, 908 | "kind": "typeConversion", 909 | "lValueRequested": false, 910 | "nameLocations": [], 911 | "names": [], 912 | "nodeType": "FunctionCall", 913 | "src": "1907:10:0", 914 | "tryCall": false, 915 | "typeDescriptions": { 916 | "typeIdentifier": "t_address", 917 | "typeString": "address" 918 | } 919 | } 920 | ], 921 | "expression": { 922 | "argumentTypes": [ 923 | { 924 | "typeIdentifier": "t_address", 925 | "typeString": "address" 926 | } 927 | ], 928 | "id": 60, 929 | "name": "_transferOwnership", 930 | "nodeType": "Identifier", 931 | "overloadedDeclarations": [], 932 | "referencedDeclaration": 111, 933 | "src": "1888:18:0", 934 | "typeDescriptions": { 935 | "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", 936 | "typeString": "function (address)" 937 | } 938 | }, 939 | "id": 65, 940 | "isConstant": false, 941 | "isLValue": false, 942 | "isPure": false, 943 | "kind": "functionCall", 944 | "lValueRequested": false, 945 | "nameLocations": [], 946 | "names": [], 947 | "nodeType": "FunctionCall", 948 | "src": "1888:30:0", 949 | "tryCall": false, 950 | "typeDescriptions": { 951 | "typeIdentifier": "t_tuple$__$", 952 | "typeString": "tuple()" 953 | } 954 | }, 955 | "id": 66, 956 | "nodeType": "ExpressionStatement", 957 | "src": "1888:30:0" 958 | } 959 | ] 960 | }, 961 | "documentation": { 962 | "id": 55, 963 | "nodeType": "StructuredDocumentation", 964 | "src": "1495:324:0", 965 | "text": " @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 NOTE: Renouncing ownership will leave the contract without an owner,\n thereby disabling any functionality that is only available to the owner." 966 | }, 967 | "functionSelector": "715018a6", 968 | "id": 68, 969 | "implemented": true, 970 | "kind": "function", 971 | "modifiers": [ 972 | { 973 | "id": 58, 974 | "kind": "modifierInvocation", 975 | "modifierName": { 976 | "id": 57, 977 | "name": "onlyOwner", 978 | "nameLocations": [ 979 | "1868:9:0" 980 | ], 981 | "nodeType": "IdentifierPath", 982 | "referencedDeclaration": 31, 983 | "src": "1868:9:0" 984 | }, 985 | "nodeType": "ModifierInvocation", 986 | "src": "1868:9:0" 987 | } 988 | ], 989 | "name": "renounceOwnership", 990 | "nameLocation": "1833:17:0", 991 | "nodeType": "FunctionDefinition", 992 | "parameters": { 993 | "id": 56, 994 | "nodeType": "ParameterList", 995 | "parameters": [], 996 | "src": "1850:2:0" 997 | }, 998 | "returnParameters": { 999 | "id": 59, 1000 | "nodeType": "ParameterList", 1001 | "parameters": [], 1002 | "src": "1878:0:0" 1003 | }, 1004 | "scope": 112, 1005 | "src": "1824:101:0", 1006 | "stateMutability": "nonpayable", 1007 | "virtual": true, 1008 | "visibility": "public" 1009 | }, 1010 | { 1011 | "body": { 1012 | "id": 90, 1013 | "nodeType": "Block", 1014 | "src": "2144:128:0", 1015 | "statements": [ 1016 | { 1017 | "expression": { 1018 | "arguments": [ 1019 | { 1020 | "commonType": { 1021 | "typeIdentifier": "t_address", 1022 | "typeString": "address" 1023 | }, 1024 | "id": 82, 1025 | "isConstant": false, 1026 | "isLValue": false, 1027 | "isPure": false, 1028 | "lValueRequested": false, 1029 | "leftExpression": { 1030 | "id": 77, 1031 | "name": "newOwner", 1032 | "nodeType": "Identifier", 1033 | "overloadedDeclarations": [], 1034 | "referencedDeclaration": 71, 1035 | "src": "2162:8:0", 1036 | "typeDescriptions": { 1037 | "typeIdentifier": "t_address", 1038 | "typeString": "address" 1039 | } 1040 | }, 1041 | "nodeType": "BinaryOperation", 1042 | "operator": "!=", 1043 | "rightExpression": { 1044 | "arguments": [ 1045 | { 1046 | "hexValue": "30", 1047 | "id": 80, 1048 | "isConstant": false, 1049 | "isLValue": false, 1050 | "isPure": true, 1051 | "kind": "number", 1052 | "lValueRequested": false, 1053 | "nodeType": "Literal", 1054 | "src": "2182:1:0", 1055 | "typeDescriptions": { 1056 | "typeIdentifier": "t_rational_0_by_1", 1057 | "typeString": "int_const 0" 1058 | }, 1059 | "value": "0" 1060 | } 1061 | ], 1062 | "expression": { 1063 | "argumentTypes": [ 1064 | { 1065 | "typeIdentifier": "t_rational_0_by_1", 1066 | "typeString": "int_const 0" 1067 | } 1068 | ], 1069 | "id": 79, 1070 | "isConstant": false, 1071 | "isLValue": false, 1072 | "isPure": true, 1073 | "lValueRequested": false, 1074 | "nodeType": "ElementaryTypeNameExpression", 1075 | "src": "2174:7:0", 1076 | "typeDescriptions": { 1077 | "typeIdentifier": "t_type$_t_address_$", 1078 | "typeString": "type(address)" 1079 | }, 1080 | "typeName": { 1081 | "id": 78, 1082 | "name": "address", 1083 | "nodeType": "ElementaryTypeName", 1084 | "src": "2174:7:0", 1085 | "typeDescriptions": {} 1086 | } 1087 | }, 1088 | "id": 81, 1089 | "isConstant": false, 1090 | "isLValue": false, 1091 | "isPure": true, 1092 | "kind": "typeConversion", 1093 | "lValueRequested": false, 1094 | "nameLocations": [], 1095 | "names": [], 1096 | "nodeType": "FunctionCall", 1097 | "src": "2174:10:0", 1098 | "tryCall": false, 1099 | "typeDescriptions": { 1100 | "typeIdentifier": "t_address", 1101 | "typeString": "address" 1102 | } 1103 | }, 1104 | "src": "2162:22:0", 1105 | "typeDescriptions": { 1106 | "typeIdentifier": "t_bool", 1107 | "typeString": "bool" 1108 | } 1109 | }, 1110 | { 1111 | "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", 1112 | "id": 83, 1113 | "isConstant": false, 1114 | "isLValue": false, 1115 | "isPure": true, 1116 | "kind": "string", 1117 | "lValueRequested": false, 1118 | "nodeType": "Literal", 1119 | "src": "2186:40:0", 1120 | "typeDescriptions": { 1121 | "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", 1122 | "typeString": "literal_string \"Ownable: new owner is the zero address\"" 1123 | }, 1124 | "value": "Ownable: new owner is the zero address" 1125 | } 1126 | ], 1127 | "expression": { 1128 | "argumentTypes": [ 1129 | { 1130 | "typeIdentifier": "t_bool", 1131 | "typeString": "bool" 1132 | }, 1133 | { 1134 | "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", 1135 | "typeString": "literal_string \"Ownable: new owner is the zero address\"" 1136 | } 1137 | ], 1138 | "id": 76, 1139 | "name": "require", 1140 | "nodeType": "Identifier", 1141 | "overloadedDeclarations": [ 1142 | 4294967278, 1143 | 4294967278 1144 | ], 1145 | "referencedDeclaration": 4294967278, 1146 | "src": "2154:7:0", 1147 | "typeDescriptions": { 1148 | "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", 1149 | "typeString": "function (bool,string memory) pure" 1150 | } 1151 | }, 1152 | "id": 84, 1153 | "isConstant": false, 1154 | "isLValue": false, 1155 | "isPure": false, 1156 | "kind": "functionCall", 1157 | "lValueRequested": false, 1158 | "nameLocations": [], 1159 | "names": [], 1160 | "nodeType": "FunctionCall", 1161 | "src": "2154:73:0", 1162 | "tryCall": false, 1163 | "typeDescriptions": { 1164 | "typeIdentifier": "t_tuple$__$", 1165 | "typeString": "tuple()" 1166 | } 1167 | }, 1168 | "id": 85, 1169 | "nodeType": "ExpressionStatement", 1170 | "src": "2154:73:0" 1171 | }, 1172 | { 1173 | "expression": { 1174 | "arguments": [ 1175 | { 1176 | "id": 87, 1177 | "name": "newOwner", 1178 | "nodeType": "Identifier", 1179 | "overloadedDeclarations": [], 1180 | "referencedDeclaration": 71, 1181 | "src": "2256:8:0", 1182 | "typeDescriptions": { 1183 | "typeIdentifier": "t_address", 1184 | "typeString": "address" 1185 | } 1186 | } 1187 | ], 1188 | "expression": { 1189 | "argumentTypes": [ 1190 | { 1191 | "typeIdentifier": "t_address", 1192 | "typeString": "address" 1193 | } 1194 | ], 1195 | "id": 86, 1196 | "name": "_transferOwnership", 1197 | "nodeType": "Identifier", 1198 | "overloadedDeclarations": [], 1199 | "referencedDeclaration": 111, 1200 | "src": "2237:18:0", 1201 | "typeDescriptions": { 1202 | "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", 1203 | "typeString": "function (address)" 1204 | } 1205 | }, 1206 | "id": 88, 1207 | "isConstant": false, 1208 | "isLValue": false, 1209 | "isPure": false, 1210 | "kind": "functionCall", 1211 | "lValueRequested": false, 1212 | "nameLocations": [], 1213 | "names": [], 1214 | "nodeType": "FunctionCall", 1215 | "src": "2237:28:0", 1216 | "tryCall": false, 1217 | "typeDescriptions": { 1218 | "typeIdentifier": "t_tuple$__$", 1219 | "typeString": "tuple()" 1220 | } 1221 | }, 1222 | "id": 89, 1223 | "nodeType": "ExpressionStatement", 1224 | "src": "2237:28:0" 1225 | } 1226 | ] 1227 | }, 1228 | "documentation": { 1229 | "id": 69, 1230 | "nodeType": "StructuredDocumentation", 1231 | "src": "1931:138:0", 1232 | "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner." 1233 | }, 1234 | "functionSelector": "f2fde38b", 1235 | "id": 91, 1236 | "implemented": true, 1237 | "kind": "function", 1238 | "modifiers": [ 1239 | { 1240 | "id": 74, 1241 | "kind": "modifierInvocation", 1242 | "modifierName": { 1243 | "id": 73, 1244 | "name": "onlyOwner", 1245 | "nameLocations": [ 1246 | "2134:9:0" 1247 | ], 1248 | "nodeType": "IdentifierPath", 1249 | "referencedDeclaration": 31, 1250 | "src": "2134:9:0" 1251 | }, 1252 | "nodeType": "ModifierInvocation", 1253 | "src": "2134:9:0" 1254 | } 1255 | ], 1256 | "name": "transferOwnership", 1257 | "nameLocation": "2083:17:0", 1258 | "nodeType": "FunctionDefinition", 1259 | "parameters": { 1260 | "id": 72, 1261 | "nodeType": "ParameterList", 1262 | "parameters": [ 1263 | { 1264 | "constant": false, 1265 | "id": 71, 1266 | "mutability": "mutable", 1267 | "name": "newOwner", 1268 | "nameLocation": "2109:8:0", 1269 | "nodeType": "VariableDeclaration", 1270 | "scope": 91, 1271 | "src": "2101:16:0", 1272 | "stateVariable": false, 1273 | "storageLocation": "default", 1274 | "typeDescriptions": { 1275 | "typeIdentifier": "t_address", 1276 | "typeString": "address" 1277 | }, 1278 | "typeName": { 1279 | "id": 70, 1280 | "name": "address", 1281 | "nodeType": "ElementaryTypeName", 1282 | "src": "2101:7:0", 1283 | "stateMutability": "nonpayable", 1284 | "typeDescriptions": { 1285 | "typeIdentifier": "t_address", 1286 | "typeString": "address" 1287 | } 1288 | }, 1289 | "visibility": "internal" 1290 | } 1291 | ], 1292 | "src": "2100:18:0" 1293 | }, 1294 | "returnParameters": { 1295 | "id": 75, 1296 | "nodeType": "ParameterList", 1297 | "parameters": [], 1298 | "src": "2144:0:0" 1299 | }, 1300 | "scope": 112, 1301 | "src": "2074:198:0", 1302 | "stateMutability": "nonpayable", 1303 | "virtual": true, 1304 | "visibility": "public" 1305 | }, 1306 | { 1307 | "body": { 1308 | "id": 110, 1309 | "nodeType": "Block", 1310 | "src": "2489:124:0", 1311 | "statements": [ 1312 | { 1313 | "assignments": [ 1314 | 98 1315 | ], 1316 | "declarations": [ 1317 | { 1318 | "constant": false, 1319 | "id": 98, 1320 | "mutability": "mutable", 1321 | "name": "oldOwner", 1322 | "nameLocation": "2507:8:0", 1323 | "nodeType": "VariableDeclaration", 1324 | "scope": 110, 1325 | "src": "2499:16:0", 1326 | "stateVariable": false, 1327 | "storageLocation": "default", 1328 | "typeDescriptions": { 1329 | "typeIdentifier": "t_address", 1330 | "typeString": "address" 1331 | }, 1332 | "typeName": { 1333 | "id": 97, 1334 | "name": "address", 1335 | "nodeType": "ElementaryTypeName", 1336 | "src": "2499:7:0", 1337 | "stateMutability": "nonpayable", 1338 | "typeDescriptions": { 1339 | "typeIdentifier": "t_address", 1340 | "typeString": "address" 1341 | } 1342 | }, 1343 | "visibility": "internal" 1344 | } 1345 | ], 1346 | "id": 100, 1347 | "initialValue": { 1348 | "id": 99, 1349 | "name": "_owner", 1350 | "nodeType": "Identifier", 1351 | "overloadedDeclarations": [], 1352 | "referencedDeclaration": 7, 1353 | "src": "2518:6:0", 1354 | "typeDescriptions": { 1355 | "typeIdentifier": "t_address", 1356 | "typeString": "address" 1357 | } 1358 | }, 1359 | "nodeType": "VariableDeclarationStatement", 1360 | "src": "2499:25:0" 1361 | }, 1362 | { 1363 | "expression": { 1364 | "id": 103, 1365 | "isConstant": false, 1366 | "isLValue": false, 1367 | "isPure": false, 1368 | "lValueRequested": false, 1369 | "leftHandSide": { 1370 | "id": 101, 1371 | "name": "_owner", 1372 | "nodeType": "Identifier", 1373 | "overloadedDeclarations": [], 1374 | "referencedDeclaration": 7, 1375 | "src": "2534:6:0", 1376 | "typeDescriptions": { 1377 | "typeIdentifier": "t_address", 1378 | "typeString": "address" 1379 | } 1380 | }, 1381 | "nodeType": "Assignment", 1382 | "operator": "=", 1383 | "rightHandSide": { 1384 | "id": 102, 1385 | "name": "newOwner", 1386 | "nodeType": "Identifier", 1387 | "overloadedDeclarations": [], 1388 | "referencedDeclaration": 94, 1389 | "src": "2543:8:0", 1390 | "typeDescriptions": { 1391 | "typeIdentifier": "t_address", 1392 | "typeString": "address" 1393 | } 1394 | }, 1395 | "src": "2534:17:0", 1396 | "typeDescriptions": { 1397 | "typeIdentifier": "t_address", 1398 | "typeString": "address" 1399 | } 1400 | }, 1401 | "id": 104, 1402 | "nodeType": "ExpressionStatement", 1403 | "src": "2534:17:0" 1404 | }, 1405 | { 1406 | "eventCall": { 1407 | "arguments": [ 1408 | { 1409 | "id": 106, 1410 | "name": "oldOwner", 1411 | "nodeType": "Identifier", 1412 | "overloadedDeclarations": [], 1413 | "referencedDeclaration": 98, 1414 | "src": "2587:8:0", 1415 | "typeDescriptions": { 1416 | "typeIdentifier": "t_address", 1417 | "typeString": "address" 1418 | } 1419 | }, 1420 | { 1421 | "id": 107, 1422 | "name": "newOwner", 1423 | "nodeType": "Identifier", 1424 | "overloadedDeclarations": [], 1425 | "referencedDeclaration": 94, 1426 | "src": "2597:8:0", 1427 | "typeDescriptions": { 1428 | "typeIdentifier": "t_address", 1429 | "typeString": "address" 1430 | } 1431 | } 1432 | ], 1433 | "expression": { 1434 | "argumentTypes": [ 1435 | { 1436 | "typeIdentifier": "t_address", 1437 | "typeString": "address" 1438 | }, 1439 | { 1440 | "typeIdentifier": "t_address", 1441 | "typeString": "address" 1442 | } 1443 | ], 1444 | "id": 105, 1445 | "name": "OwnershipTransferred", 1446 | "nodeType": "Identifier", 1447 | "overloadedDeclarations": [], 1448 | "referencedDeclaration": 13, 1449 | "src": "2566:20:0", 1450 | "typeDescriptions": { 1451 | "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", 1452 | "typeString": "function (address,address)" 1453 | } 1454 | }, 1455 | "id": 108, 1456 | "isConstant": false, 1457 | "isLValue": false, 1458 | "isPure": false, 1459 | "kind": "functionCall", 1460 | "lValueRequested": false, 1461 | "nameLocations": [], 1462 | "names": [], 1463 | "nodeType": "FunctionCall", 1464 | "src": "2566:40:0", 1465 | "tryCall": false, 1466 | "typeDescriptions": { 1467 | "typeIdentifier": "t_tuple$__$", 1468 | "typeString": "tuple()" 1469 | } 1470 | }, 1471 | "id": 109, 1472 | "nodeType": "EmitStatement", 1473 | "src": "2561:45:0" 1474 | } 1475 | ] 1476 | }, 1477 | "documentation": { 1478 | "id": 92, 1479 | "nodeType": "StructuredDocumentation", 1480 | "src": "2278:143:0", 1481 | "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Internal function without access restriction." 1482 | }, 1483 | "id": 111, 1484 | "implemented": true, 1485 | "kind": "function", 1486 | "modifiers": [], 1487 | "name": "_transferOwnership", 1488 | "nameLocation": "2435:18:0", 1489 | "nodeType": "FunctionDefinition", 1490 | "parameters": { 1491 | "id": 95, 1492 | "nodeType": "ParameterList", 1493 | "parameters": [ 1494 | { 1495 | "constant": false, 1496 | "id": 94, 1497 | "mutability": "mutable", 1498 | "name": "newOwner", 1499 | "nameLocation": "2462:8:0", 1500 | "nodeType": "VariableDeclaration", 1501 | "scope": 111, 1502 | "src": "2454:16:0", 1503 | "stateVariable": false, 1504 | "storageLocation": "default", 1505 | "typeDescriptions": { 1506 | "typeIdentifier": "t_address", 1507 | "typeString": "address" 1508 | }, 1509 | "typeName": { 1510 | "id": 93, 1511 | "name": "address", 1512 | "nodeType": "ElementaryTypeName", 1513 | "src": "2454:7:0", 1514 | "stateMutability": "nonpayable", 1515 | "typeDescriptions": { 1516 | "typeIdentifier": "t_address", 1517 | "typeString": "address" 1518 | } 1519 | }, 1520 | "visibility": "internal" 1521 | } 1522 | ], 1523 | "src": "2453:18:0" 1524 | }, 1525 | "returnParameters": { 1526 | "id": 96, 1527 | "nodeType": "ParameterList", 1528 | "parameters": [], 1529 | "src": "2489:0:0" 1530 | }, 1531 | "scope": 112, 1532 | "src": "2426:187:0", 1533 | "stateMutability": "nonpayable", 1534 | "virtual": true, 1535 | "visibility": "internal" 1536 | } 1537 | ], 1538 | "scope": 113, 1539 | "src": "654:1961:0", 1540 | "usedErrors": [] 1541 | } 1542 | ], 1543 | "src": "102:2514:0" 1544 | }, 1545 | "id": 0 1546 | }, 1547 | ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol": { 1548 | "ast": { 1549 | "absolutePath": ".deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol", 1550 | "exportedSymbols": { 1551 | "Context": [ 1552 | 134 1553 | ] 1554 | }, 1555 | "id": 135, 1556 | "license": "MIT", 1557 | "nodeType": "SourceUnit", 1558 | "nodes": [ 1559 | { 1560 | "id": 114, 1561 | "literals": [ 1562 | "solidity", 1563 | "^", 1564 | "0.8", 1565 | ".0" 1566 | ], 1567 | "nodeType": "PragmaDirective", 1568 | "src": "86:23:1" 1569 | }, 1570 | { 1571 | "abstract": true, 1572 | "baseContracts": [], 1573 | "canonicalName": "Context", 1574 | "contractDependencies": [], 1575 | "contractKind": "contract", 1576 | "documentation": { 1577 | "id": 115, 1578 | "nodeType": "StructuredDocumentation", 1579 | "src": "111:496:1", 1580 | "text": " @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 This contract is only required for intermediate, library-like contracts." 1581 | }, 1582 | "fullyImplemented": true, 1583 | "id": 134, 1584 | "linearizedBaseContracts": [ 1585 | 134 1586 | ], 1587 | "name": "Context", 1588 | "nameLocation": "626:7:1", 1589 | "nodeType": "ContractDefinition", 1590 | "nodes": [ 1591 | { 1592 | "body": { 1593 | "id": 123, 1594 | "nodeType": "Block", 1595 | "src": "702:34:1", 1596 | "statements": [ 1597 | { 1598 | "expression": { 1599 | "expression": { 1600 | "id": 120, 1601 | "name": "msg", 1602 | "nodeType": "Identifier", 1603 | "overloadedDeclarations": [], 1604 | "referencedDeclaration": 4294967281, 1605 | "src": "719:3:1", 1606 | "typeDescriptions": { 1607 | "typeIdentifier": "t_magic_message", 1608 | "typeString": "msg" 1609 | } 1610 | }, 1611 | "id": 121, 1612 | "isConstant": false, 1613 | "isLValue": false, 1614 | "isPure": false, 1615 | "lValueRequested": false, 1616 | "memberLocation": "723:6:1", 1617 | "memberName": "sender", 1618 | "nodeType": "MemberAccess", 1619 | "src": "719:10:1", 1620 | "typeDescriptions": { 1621 | "typeIdentifier": "t_address", 1622 | "typeString": "address" 1623 | } 1624 | }, 1625 | "functionReturnParameters": 119, 1626 | "id": 122, 1627 | "nodeType": "Return", 1628 | "src": "712:17:1" 1629 | } 1630 | ] 1631 | }, 1632 | "id": 124, 1633 | "implemented": true, 1634 | "kind": "function", 1635 | "modifiers": [], 1636 | "name": "_msgSender", 1637 | "nameLocation": "649:10:1", 1638 | "nodeType": "FunctionDefinition", 1639 | "parameters": { 1640 | "id": 116, 1641 | "nodeType": "ParameterList", 1642 | "parameters": [], 1643 | "src": "659:2:1" 1644 | }, 1645 | "returnParameters": { 1646 | "id": 119, 1647 | "nodeType": "ParameterList", 1648 | "parameters": [ 1649 | { 1650 | "constant": false, 1651 | "id": 118, 1652 | "mutability": "mutable", 1653 | "name": "", 1654 | "nameLocation": "-1:-1:-1", 1655 | "nodeType": "VariableDeclaration", 1656 | "scope": 124, 1657 | "src": "693:7:1", 1658 | "stateVariable": false, 1659 | "storageLocation": "default", 1660 | "typeDescriptions": { 1661 | "typeIdentifier": "t_address", 1662 | "typeString": "address" 1663 | }, 1664 | "typeName": { 1665 | "id": 117, 1666 | "name": "address", 1667 | "nodeType": "ElementaryTypeName", 1668 | "src": "693:7:1", 1669 | "stateMutability": "nonpayable", 1670 | "typeDescriptions": { 1671 | "typeIdentifier": "t_address", 1672 | "typeString": "address" 1673 | } 1674 | }, 1675 | "visibility": "internal" 1676 | } 1677 | ], 1678 | "src": "692:9:1" 1679 | }, 1680 | "scope": 134, 1681 | "src": "640:96:1", 1682 | "stateMutability": "view", 1683 | "virtual": true, 1684 | "visibility": "internal" 1685 | }, 1686 | { 1687 | "body": { 1688 | "id": 132, 1689 | "nodeType": "Block", 1690 | "src": "809:32:1", 1691 | "statements": [ 1692 | { 1693 | "expression": { 1694 | "expression": { 1695 | "id": 129, 1696 | "name": "msg", 1697 | "nodeType": "Identifier", 1698 | "overloadedDeclarations": [], 1699 | "referencedDeclaration": 4294967281, 1700 | "src": "826:3:1", 1701 | "typeDescriptions": { 1702 | "typeIdentifier": "t_magic_message", 1703 | "typeString": "msg" 1704 | } 1705 | }, 1706 | "id": 130, 1707 | "isConstant": false, 1708 | "isLValue": false, 1709 | "isPure": false, 1710 | "lValueRequested": false, 1711 | "memberLocation": "830:4:1", 1712 | "memberName": "data", 1713 | "nodeType": "MemberAccess", 1714 | "src": "826:8:1", 1715 | "typeDescriptions": { 1716 | "typeIdentifier": "t_bytes_calldata_ptr", 1717 | "typeString": "bytes calldata" 1718 | } 1719 | }, 1720 | "functionReturnParameters": 128, 1721 | "id": 131, 1722 | "nodeType": "Return", 1723 | "src": "819:15:1" 1724 | } 1725 | ] 1726 | }, 1727 | "id": 133, 1728 | "implemented": true, 1729 | "kind": "function", 1730 | "modifiers": [], 1731 | "name": "_msgData", 1732 | "nameLocation": "751:8:1", 1733 | "nodeType": "FunctionDefinition", 1734 | "parameters": { 1735 | "id": 125, 1736 | "nodeType": "ParameterList", 1737 | "parameters": [], 1738 | "src": "759:2:1" 1739 | }, 1740 | "returnParameters": { 1741 | "id": 128, 1742 | "nodeType": "ParameterList", 1743 | "parameters": [ 1744 | { 1745 | "constant": false, 1746 | "id": 127, 1747 | "mutability": "mutable", 1748 | "name": "", 1749 | "nameLocation": "-1:-1:-1", 1750 | "nodeType": "VariableDeclaration", 1751 | "scope": 133, 1752 | "src": "793:14:1", 1753 | "stateVariable": false, 1754 | "storageLocation": "calldata", 1755 | "typeDescriptions": { 1756 | "typeIdentifier": "t_bytes_calldata_ptr", 1757 | "typeString": "bytes" 1758 | }, 1759 | "typeName": { 1760 | "id": 126, 1761 | "name": "bytes", 1762 | "nodeType": "ElementaryTypeName", 1763 | "src": "793:5:1", 1764 | "typeDescriptions": { 1765 | "typeIdentifier": "t_bytes_storage_ptr", 1766 | "typeString": "bytes" 1767 | } 1768 | }, 1769 | "visibility": "internal" 1770 | } 1771 | ], 1772 | "src": "792:16:1" 1773 | }, 1774 | "scope": 134, 1775 | "src": "742:99:1", 1776 | "stateMutability": "view", 1777 | "virtual": true, 1778 | "visibility": "internal" 1779 | } 1780 | ], 1781 | "scope": 135, 1782 | "src": "608:235:1", 1783 | "usedErrors": [] 1784 | } 1785 | ], 1786 | "src": "86:758:1" 1787 | }, 1788 | "id": 1 1789 | } 1790 | } 1791 | } 1792 | } --------------------------------------------------------------------------------