This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .\" Hey, EMACS: -*- nroff -*- | |
| .\" (C) Copyright 2020 Luiserebii <luis@serebii.io>, | |
| .\" | |
| .\" First parameter, NAME, should be all caps | |
| .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection | |
| .\" other parameters are allowed: see man(7), man(1) | |
| .TH GITID 1 "May 12 2020" "gitid 0.3.1" "User Commands" | |
| .\" Please adjust this date whenever revising the manpage. | |
| .\" | |
| .\" Some roff macros, for reference: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.0; | |
| contract A { | |
| enum Actions { WALK, RUN } | |
| Actions private currentContractAction; | |
| constructor() public { | |
| currentContractAction = Actions.WALK; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| did:muport:QmdpD6xuyfu9LBc2v87Fr9NHJoXrfaAb98ipshi9Z29U2N |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MemeGenerator { | |
| constructor(options){ | |
| this.options = options; | |
| } | |
| print() { | |
| console.log(this.options); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testDeploy(); //calling the "main function"; idea is that more than 1 testDeploy() can be called in a synchronous order, so we can wait for a contract to be deployed before moving onto the next one | |
| async function testDeploy(){ | |
| const accounts = await web3.eth.getAccounts(); | |
| const CalculatorContractInput = DeployUtil.extractContract(compiled, "Calculator"); | |
| //Here, we finally call our actual deployment function; ideally, we will wait until it is finished deploying. As a result, console.log("end of deploy") is used as a marker to show that we are running in the correct order, and waiting for 2 confirmations to have passed before moving on. | |
| let CalculatorContract = await deployContract(CalculatorContractInput, [], { from: accounts[0] }); | |
| console.log("end of deploy"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log(pp.miniheadline("Deploying " + contract.name)); | |
| let contractWeb3 = await new web3.eth.Contract(contract.abi); | |
| //contractWeb3.on('error', (err) => { console.log(err); }); | |
| let deployRes = await contractWeb3.deploy({ "data": contract.bytecode.indexOf('0x') === 0 ? contract.bytecode : '0x' + contract.bytecode, "args": args }); | |
| await (deployRes.send(sendOptions).on('receipt', (receipt) => { | |
| console.log(pp.arrow("status: " + receipt.status ? "Success!" : "Failed :(")); | |
| console.log(pp.arrow("transaction hash: " + receipt.transactionHash)); | |
| console.log(pp.arrow("contract address: " + receipt.contractAddress)); | |
| console.log(pp.arrow("from: " + receipt.from)); | |
| console.log(pp.arrow("block number: " + receipt.blockNumber)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log(pp.miniheadline("Deploying " + contract.name)); | |
| let contractWeb3 = await new web3.eth.Contract(contract.abi); | |
| //contractWeb3.on('error', (err) => { console.log(err); }); | |
| let deployRes = await contractWeb3.deploy({ "data": contract.bytecode.indexOf('0x') === 0 ? contract.bytecode : '0x' + contract.bytecode, "args": args }); | |
| let sendRes = await (deployRes.send(sendOptions).on('receipt', (receipt) => { | |
| console.log(pp.arrow("status: " + receipt.status ? "Success!" : "Failed :(")); | |
| console.log(pp.arrow("transaction hash: " + receipt.transactionHash)); | |
| console.log(pp.arrow("contract address: " + receipt.contractAddress)); | |
| console.log(pp.arrow("from: " + receipt.from)); | |
| console.log(pp.arrow("block number: " + receipt.blockNumber)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log(pp.miniheadline("Deploying " + contract.name)); | |
| let contractWeb3 = await new web3.eth.Contract(contract.abi); | |
| //contractWeb3.on('error', (err) => { console.log(err); }); | |
| let deployRes = await contractWeb3.deploy({ "data": contract.bytecode.indexOf('0x') === 0 ? contract.bytecode : '0x' + contract.bytecode, "args": args }); | |
| let sendRes = await deployRes.send(sendOptions); | |
| console.log(util.inspect(sendRes)); | |
| let receiptRes = await sendRes.on('receipt', (receipt) => { | |
| console.log(pp.arrow("status: " + receipt.status ? "Success!" : "Failed :(")); | |
| console.log(pp.arrow("transaction hash: " + receipt.transactionHash)); | |
| console.log(pp.arrow("contract address: " + receipt.contractAddress)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: contracts/ein/util/EINOwnable.sol | |
| pragma solidity ^0.5.0; | |
| /** | |
| * @title EINOwnable | |
| * @dev The EINOwnable contract has an owner EIN, and provides basic authorization control | |
| * functions, this simplifies the implementation of "user permissions". | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: contracts/zeppelin/ownership/Ownable.sol | |
| pragma solidity ^0.5.0; | |
| /** | |
| * @title Ownable | |
| * @dev The Ownable contract has an owner address, and provides basic authorization control | |
| * functions, this simplifies the implementation of "user permissions". | |
| */ |
NewerOlder