go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Step 4. Save the contract
 
Subject: Step 4. Save the contract
Author: WebSpider
In response to: Step 3. Compile the contract
Posted on: 06/07/2021 06:55:04 AM


As the Remix is an online IDE, it's important to save an off-line copy of your contact. The easy way is to backup the entire workspace into a zipped file which can be ported and restored to anywhere.

  • Click on home icon
  • Click the link Download all Files as backup zip


     

    > On 06/07/2021 06:52:49 AM WebSpider wrote:


  • Click on the compiler icon on the very left panel
  • Click the button Compile Account.sol
  • Make sure the compiler icon is green checked

    After successful compilation, a file named Account.json is generated under folder artifacts

    Account.json
    {
    	"deploy": {
    	},
    	"data": {
    		"bytecode": {
    			"generatedSources": [],
    			"linkReferences": {},
    			"object": "6080604...",
    			"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE ... ",
    			"sourceMap": "141:574:0:-:0;;;;;;;;;;;;;;;;;;;"
    		},
    		"deployedBytecode": {
    			"generatedSources": [
    				{ ... }
    			],
    			"immutableReferences": {},
    			"linkReferences": {},
    			"object": "60806040... ",
    			"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE ... ",
    			"sourceMap": "141:574:0:-:0; ... "
    		},
    		"gasEstimates": {
    			"creation": {
    				"codeDepositCost": "108600",
    				"executionCost": "153",
    				"totalCost": "108753"
    			},
    			"external": {
    				"deposite(uint256)": "infinite",
    				"getBalance()": "1115",
    				"withdraw(uint256)": "infinite"
    			}
    		},
    		"methodIdentifiers": {
    			"deposite(uint256)": "3104562b",
    			"getBalance()": "12065fe0",
    			"withdraw(uint256)": "2e1a7d4d"
    		}
    	},
    	"abi": [
    		{
    			"inputs": [
    				{
    					"internalType": "uint256",
    					"name": "amount",
    					"type": "uint256"
    				}
    			],
    			"name": "deposite",
    			"outputs": [],
    			"stateMutability": "nonpayable",
    			"type": "function"
    		},
    		{
    			"inputs": [],
    			"name": "getBalance",
    			"outputs": [
    				{
    					"internalType": "uint256",
    					"name": "",
    					"type": "uint256"
    				}
    			],
    			"stateMutability": "view",
    			"type": "function"
    		},
    		{
    			"inputs": [
    				{
    					"internalType": "uint256",
    					"name": "amount",
    					"type": "uint256"
    				}
    			],
    			"name": "withdraw",
    			"outputs": [],
    			"stateMutability": "nonpayable",
    			"type": "function"
    		}
    	]
    }
    


    It should be noted that two critical items abi and bytecode are listed, also present is gasEstimates.




    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.