0% found this document useful (0 votes)
9K views21 pages

Hashgraph Dev

Uploaded by

Anthony Tochukwu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9K views21 pages

Hashgraph Dev

Uploaded by

Anthony Tochukwu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

MODULE 1:

1.​ Which is the main objective of the Hedera Governing Council?


A Governance of the Hedera protocol

2.​ Is Hedera a blockchain?


No

3.​ Please choose all qualities of Hedera.


Choose ALL answers that apply.
A Fast
B Secure
C Fair
D Stable
( All options A, B, C, and D apply to Hedera. )

4.​ Are blockchains a form of distributed ledger technology?


D Public Permissioned

5.​ Please choose ALL which are NOT a feature of web2 software development.
Choose ALL answers that apply.
B Trust &
D Decentralization

6.​ Which of these is not included as an area of responsibility of the Hedera Governing
Council?
D Encouraging forking of the state

7.​ Which phase of network growth includes permissionless nodes?


C3

8.​ Which of these characteristics describes Hedera today?


D Public Permissioned

9.​ Which of these characteristics describes the future state of node operation on the
Hedera network?
DC Public Permissionless
MODULE 2:
1.​ Which type of network is where applications are run in production with real transactions
and associated costs?
Answer: Mainet

2.​ This network is described by the following: "accounts / data are likely to be lost when the
network codebase is upgraded."
Ans: Previewnet

3.​ This node enables analytical insight into an application’s state / transactions on Hedera
Answer: Mirror

4.​ Please choose all listed characteristics of Consensus Nodes.


Answer: Requires HBAR cryptocurrency payment for transactions & queries
Can submit HAPI (Hedera API) transactions to the Hedera network

5.​ Which of the following are Hedera network Services?


Answer:
a: Hedera Consensus Service
b: Hedera Smart Contract Service
c: Hedera Token Service

6.​ You can look up transaction history and filter by account, balance, transaction, topic,
token, NFT, smart contract, and more"
Answer: True for Hedera Mirror Node Rest API

7.​ This service is "used for smart contract storage only"


Answer: Hedera File Service

8.​ Please select use cases of the Hedera Consensus Service


Answer: Choose all

9.​ What does HTS stand for?


Ans: Hedera Token Service

10.​It is possible to use the Hedera Token Service without prior Solidity or smart contract
programming capabilities.
Answer: True

11.​The Hedera Smart Contract Service can be used to build auctions and bridges.
Answer: True
MODULE 3:
1. What is the utility of HBAR?
Choose only ONE best answer.
- D. All of the above

2. Three types of fees make up the Hedera Transaction fee. Please choose the one that is NOT
correct.
Choose only ONE best answer.
- B. Inclusion Fee

3. Fees on Hedera are based on the United States Dollar.


Choose only ONE best answer.
- A. True

4. This key is used to decrypt a message on the network


Choose only ONE best answer.
- B. Private Key

5. This algorithm works with the Ethereum Virtual Machine.


Choose only ONE best answer.
- A. ECDSA

6. This algorithm has higher security and is compatible with Hedera native services.
Choose only ONE best answer.
- B. ED25519

7. Please select all components which are part of a Hedera account.


Choose ALL answers that apply.
- A. Account ID
- B. Keys
- D. Account Alias
- E. Staked Node ID

8. A signature is NOT required to submit a transaction.


Choose only ONE best answer.
- B. False

9. A transaction submitted to a Hedera network must include


Choose only ONE best answer.
- E. All of the above
10. Hedera natively supports multisignature transactions.
Choose only ONE best answer.
- A. True

11. In minutes, how long is the valid duration on a transaction?


Choose only ONE best answer.
- B. 2

12. If a transaction is submitted to the network in the time window specified by the valid start
time + the valid duration then the transaction will be
Choose only ONE best answer.
- B. Accepted

13. If the schedule doesn’t receive sufficient signatures within 10 minutes, it’s deleted
Choose only ONE best answer.
- B. False

14. With this method, a prospective signer checks the contents of the inner transaction before it
is signed.
Choose only ONE best answer.
- B. scheduleGetInfo

15. Which of these are included in scheduleCreate


Choose ALL answers that apply.
- A. scheduledTransactionBody
- B. memo
- D. payerAccountID

16. Generally, queries are not subject to fees.


Choose only ONE best answer.
- B. False

17. This method of confirmation exposes information in the most detail.


Choose only ONE best answer.
- A. Receipts
- B. State proofs

18. Please choose all INCORRECT answers.


Choose ALL answers that apply.
- C. State is not able to be changed
- D. Transaction history is mutable

19. It is important to avoid targeting only one node for submitting transactions as this could be a
single point of failure.
Choose only ONE best answer.
- A. True

20. Please choose all types of Hedera Improvement Proposals (HIPs) listed.
Choose ALL answers that apply.
- A. Informational
- B. Standards Track
- E. Process
MODULE 4:

1. The testnet allows creation of only ED25519 accounts.


Choose only ONE best answer.
- B. False

2. Please select all languages that are officially supported in the Hedera SDK?
Choose ALL answers that apply.
- B. Java
- D. Go
- F. Javascript

3. A client may send the same transaction to multiple nodes via the Hedera SDK.
Choose only ONE best answer.
- A. True

4. Mainnet is the only Hedera network you can submit transactions and queries to using the
SDK.
Choose only ONE best answer.
- D. False, one can also use previewnet and testnet.

5. This class is used by the SDK to create accounts


Choose only ONE best answer.
- A. AccountCreateTransaction

6. The .env file is used to store your private key as an environment variable, offering an
improvement over hardcoding it directly into your code.
Choose only ONE best answer.
- A. True

7. Spot the error in the code:


Choose only ONE best answer.
- D. The net value of the transfer should be zero, ensuring that the total HBAR sent by the
sender matches the total received by the recipient.

8. You can check the consensus status of a transaction response by calling .getReceipt() on it.
Choose only ONE best answer.
- A. True

9. After executing the provided code block, what HBAR denomination is used to represent the
account balance in the output?
Choose only ONE best answer.
- C. TINYBAR
10. What is the purpose of the provided code block?
Choose only ONE best answer.
- D. The code sets up environment variables and creates a testnet client with your account as
the operator account.

11. Which of the following code snippets correctly generates a private-public key pair of type
ED25519.
Choose only ONE best answer.
- B. const newAccountPrivateKey = PrivateKey.generateED25519();
const newAccountPublicKey = newAccountPrivateKey.publicKey;

12. The clients operator account is the account funding the newly created account.
Choose only ONE best answer.
- A. True

13. When setting up your .env file what key is used for MY_PRIVATE_KEY.
Choose only ONE best answer.
- B. DER Encoded ED25519 Private Key

14. In order to allow another account or contract to transfer HBAR out of your account, you must
grant that account or contract an allowance.
Choose only ONE best answer.
- A. True

15. To grant an allowance for another account to transfer HBAR out of your account, select the
correct combination of class and method.
Choose only ONE best answer.
- C. AccountAllowanceApproveTransaction with `.approveHbarAllowance()`

16. In the context of granting an allowance for HBAR transfers when using the correct method,
why is the `ownerAccountId` argument necessary?
Choose only ONE best answer.
- B. It identifies the owner account ID that is authorizing the allowance
MODULE 5:
1.​ When working on your local network you create and submit transactions and queries to
your local consensus node.
Choose only ONE best answer.
A. True

2.​ Interacting with the testnet mirror nodes to pull local transaction data is a characteristic
of working with a local network.
Choose only ONE best answer.

B. False

3.​ Interacting with the testnet mirror nodes to pull local transaction data is a characteristic
of working with a local network.
Choose only ONE best answer.

A.​ True

4.​ Select the correct method to configure your local network client
Choose only ONE best answer.

A
MODULE 6:
1. Choose the correct class used to create a topic in the Hedera Consensus Service (HCS).
Choose only ONE best answer.
- D. TopicCreateTransaction

2. When submitting a message to an HCS topic, it is necessary to set the topicID.


Choose only ONE best answer.
- A. True

3. In the context of Topics in HCS, what is the purpose of the submit key?
Choose only ONE best answer.
- C. It controls access to message submission.

4. Choose the correct class used to get topic messages in the Hedera Consensus Service
(HCS).
Choose only ONE best answer.
- D. TopicMessageQuery

5. In the context of HCS, why is a topic referred to as "private" even though the data is public?
Choose only ONE best answer.
- A. The topic's access is restricted to control who can submit messages to it.

6. In the context of HCS, what determines whether the `updateTopic` and `deleteTopic`
functions can be used on a topic?
Choose only ONE best answer.
- B. The presence of an adminKey.

7. Which method is used to set the time to start subscribing to a topic's messages in Hedera
Hashgraph?
Choose only ONE best answer.
- A. setStartTime()
MODULE 7:

1. Please select all the methods required when creating a token using the Hedera Token
Service.
Choose ALL answers that apply.
- B. setTokenName(name)
- D. setTokenSymbol(symbol)
- E. setTreasuryAccountID(treasuryAccountId)

2. Select the correct class used to create a token.


Choose only ONE best answer.
- A. TokenCreateTransaction

3. If you do not specify the token type when creating a token, it will default to creating a fungible
token.
Choose only ONE best answer.
- A. True

4. What is the main characteristic of a royalty fee in relation to NFTs?


Choose only ONE best answer.
- C. It is charged each time NFT ownership is transferred and sent to the royalty collecter.

5. The supply key needs to be set in order to mint tokens and increase the supply.
Choose only ONE best answer.
- A. True

6. What is the purpose of specifying the initial supply when creating fungible tokens?
Choose only ONE best answer.
- B. To determine the amount of tokens initially put into circulation.

7. Why do we set the treasury account id?


Choose only ONE best answer.
- D. To receive the initial supply or newly minted NFTs

8. When signing a transaction you must pass in a private key of type PrivateKey. Select the
correct code necessary to convert a string into a Private Key.
Choose only ONE best answer.
- C. PrivateKey.fromString(myStringPrivateKey);

9. Select the correct code snippet to associate an account to a token.


Choose only ONE best answer.
- B. const transaction = await new TokenAssociateTranscation()
.setAccountId(accountIdToAssociate)
.setTokenIds([tokenId])
.freezeWith(client);
const signTx = await transaction.sign(accountIdToAssociatePrivateKey);
const txResponse = await signTx.execute(client);

10. What is the purpose of an Associate transaction?


Choose only ONE best answer.
- B. Allows a user to receive a new fungible or new nonfungible token

11. From the provided answers, what is a possible error message you can receive when
transferring a token to another user?
Choose only ONE best answer.
- C. TOKEN_NOT_ASSOCIATED_TO_ACCOUNT

12. Choose the correct token type for creating an NFT.


Choose only ONE best answer.
- D. TokenType.NonFungibleUnique

13. What action must be taken when creating a non-fungible token (NFT) in terms of setting the
initial supply?
Choose only ONE best answer.
- C. Set the initial supply to 0.

14. In the context of fungible tokens what does the method .setDecimals() do?
Choose only ONE best answer.
- C. It controls how divisible the token is and how fractions of the token's value are handled

15. When creating a supply key, you should save it to a file so you can later change the supply
of your tokens.
Choose only ONE best answer.
- A. True

16. When creating an NFT .setDecimals() must be set to 0.


Choose only ONE best answer.
- A. True

17. In the context of token management, why would you set a KYC key?
Choose only ONE best answer.
- B. To "Know your Customer" and gather further details about them.

18. In the context of NFTs, it is necessary to mint NFTs after generating a token ID.
Choose only ONE best answer.
- A. True
19. What role does MetaData play in NFTs?
Choose only ONE best answer.
- C. It is the data that is being tokenized onto the NFT.

20. Where are the data and Metadata usually stored for NFTs?
Choose only ONE best answer.
- C. InterPlanetary File System (IPFS)

21. What is the significance of serial numbers in the context of NFTs?


Choose only ONE best answer.
- C. They differentiate individual NFTs within the same token ID
MODULE 8:
1. Which is a defining characteristic of decentralized applications (dApps)?
Choose only ONE best answer.
- C. dApps operate on a blockchain or P2P network.

2. What benefit is there to having a distributed application?


Choose ALL answers that apply.
- A. No required trusted party to operate the network
- B. Improves trust through transparency
- C. Lowers risk of security breaches due to the absence of a central database.

3. Which line of code initializes Hashconnect with the given `appMetadata`?


Choose only ONE best answer.
- C. const initData = await hashconnect.init(appMetadata);

4. When working with Hashconnect, what is the purpose of using the `executeWithSigner`
method?
Choose only ONE best answer.
- C. To invoke the wallet and ask the user to sign the transaction.

5. What is one of the core features of a Decentralized Application (dApp)?


Choose only ONE best answer.
- B. The front end of an application can talk to a shared database.

6. What is the purpose of the Hashconnect library?


Choose only ONE best answer.
- A. To establish connections between Hedera apps and wallets.

7. How can you correctly retrieve the topic ID after executing a topic create transaction?
Choose only ONE best answer.
- B.
const createTopicTransactionResponse = await new TopicCreateTransaction().execute(client);
const createTopicReceipt = await createTopicTransactionResponse.getReceipt(client);
const newTopicId = createTopicReceipt.getTopicId();

8. Select the correct code to submit a message to a Hedera Consensus Service (HCS) topic
using hashconnect
Choose only ONE best answer.
- B.
const topicMessageTx = await new TopicMessageSubmitTransaction()
.setTopicId(newTopicId)
.setMessage("hello, HCS!")
.freezeWithSigner(signer);
const topicMessageSubmit = await topicMessageTx.executeWithSigner(signer);

9. In the Dapp after selecting 'Send Topic Message' the user must sign the transaction through
the wallet by click 'approve' which will submit the message to the network.
Choose only ONE best answer.
- A. True

10. You can check the message was submitted to the network by visiting
https://hashscan.io/testnet/dashboard and searching by topicID.
Choose only ONE best answer.
- A. True
MODULE 9:

1. The Hedera Smart Contract Services uses the Solidity Smart Contract Language. True or
False
Choose only ONE best answer.
- A. True

2. What is Solidity in the context of Smart Contracts?


Choose only ONE best answer.
- D. Solidity is an object-oriented, high-level language used for implementing smart contracts.

3. What is the purpose of Application Binary Interface (ABI) in the context of smart contracts and
web applications?
Choose only ONE best answer.
- B. ABI bridges smart contracts and web apps, facilitating communication between high-level
languages like JavaScript and the EVM bytecode.

4. What is bytecode in the context of a smart contract?


Choose only ONE best answer.
- C. Bytecode is an executable form of the smart contract stored in binary.

5. During the lab, we were able to obtain the smart contracts bytecode by doing the following:
const bytecode = helloHedera.data.bytecode.object;
Choose only ONE best answer.
- A. True

6. Select the correct code snippet that creates a file on Hedera and stores the bytecode and
gets the file id
Choose only ONE best answer.
- C.
```js
const fileCreateTx = new FileCreateTransaction()
.setContents(bytecode);
const submitTx = await fileCreateTx.execute(client);
const txReceipt = await submitTx.getReceipt(client);
const bytecodeFileId = txReceipt.fileId;
```

7. Select the correct class used to create a smart instance on the Hedera network
Choose only ONE best answer.
- C. ContractCreateTransaction()
8. Select the correct code snippet that creates a smart contract instance on Hedera and gets the
contract id
Choose only ONE best answer.
- C.
```js
const contractTx = new ContractCreateTransaction()
.setBytecodeFileId(bytecodeFileId)
.setGas(100000)
.setConstructorParameters(new ContractFunctionParameters().addString("Hello from
Hedera!"));

const transactionResponse = await contractTx.execute(client);


const txReceipt = await transactionResponse.getReceipt(client);
const newContractId = txReceipt.contractId;
```

9. True or False: FileCreateTransaction() is executed to create a smart contract on Hedera.


Choose only ONE best answer.
- B. False

10. Select the correct code snippet that calls a function of a smart contract (it does not change
state)
Choose only ONE best answer.
- B.
```js
const contractQuery = await new ContractCallQuery()
.setGas(10000)
.setContractId(newConractId)
.setFunction("get_message")
.setQueryPayment(new Hbar(2));

const response = await contractQuery.execute(client);


const message = response.getString(0);
```

11. Select the correct class used to execute a smart contract function (it will change state)
Choose only ONE best answer.
- C. ContractExecuteTransaction()

12. You can use the ContractCreateFlow() class to perform a FileCreateTranscation(),


FileAppendTransaction() and ContractCreateTransaction() in a single call resulting in deploying
a smart contract on Hedera.
Choose only ONE best answer.
- A. True
13. What class is used when wanting to create a new NFT token using a Smart Contract on
Hedera.
Choose only ONE best answer.
- D. ContractExecuteTransaction()

14. After calling .getRecord() on the executed createTokenTx, what do you call to get the result
returned by calling the createNFT smart contract function?
Choose only ONE best answer.
- C. contractFunctionResult.getAddress(0)
MODULE 10:
1. Which of the following statements about Hashio and its purpose are true? Select all that
apply.
Choose ALL answers that apply.
- C. Hashio is a hosted instance of the JSON-RPC Relay project & is hosted by Swirlds Labs.
- D. Hashio enables smart contract developers to use wallets such as Metamask and tools and
libraries such as ethers.js, web3.js, hardhat, truffle.

2. How does Hashio help developers transition from Ethereum to Hedera?


Choose only ONE best answer.
- C. It allows smart contract developers to use tools like ethers.js and MetaMask.

3. How does the JSON RPC Relay enable Ethereum-compatible wallets to create and sign
transactions to be executed on the Hedera Network?
Choose only ONE best answer.
- C. It wraps signed Ethereum transactions into Hedera API (HAPI) transactions and executes
them, facilitating cross-network communication.

4. In order to import your Hedera account into MetaMask, what key needs to be imported?
Choose only ONE best answer.
- C. DER Encoded ECDSA Private Key
- D. Hex Encoded ECDSA Private Key

5. Select the correct Hedera Testnet Chain ID


Choose only ONE best answer.
- C. 296

6. To connect to Hedera Testnet you first need to manually add the network to MetaMask.
Choose only ONE best answer.
- A. True
MODULE 11:

1. What library is used to help create/interact with EVM transactions on MetaMask?


Choose only ONE best answer.
- C. Ethers.js

2. True or False: Prepare to associate an HTS token with MetaMask by creating a contract
using the HTS token address & ethers.Contract().
Choose only ONE best answer.
- B. False

3. Select the correct code snippet that associates an HTS token with a MetaMask account
Choose only ONE best answer.
- C.
```js
const myContract = new ethers.Contract(tokenAddress, abi, signer);
const associateTx = await myContract.associate({gasLimit: 100000});
```

4. In the contractDeployFcn(), only the abi and smart contract bytecode are needed to create a
contract instance using ethers.js.
True or False
Choose only ONE best answer.
- B. False

5. Select the correct code snippet that executes a contract function & invokes MetaMask wallet
to ask for signature
Choose only ONE best answer.
- A.
```js
const myContract = new ethers.Contract(contractAddress, abi, signer);
const incrementTx = await myContract.increment({gasLimit:100000});
const incrementRx = await incrementTx.wait();
```

6. Select the correct code snippet that deploys a smart contract using ethers.js & waits for the
receipt
Choose only ONE best answer.
- D.
```js
const myContract = new ContractFactory(abi,bytecode,signer);
const contractDeployTx = await myContract.deploy({gasLimit: 40000000});
const contractDeployRx = await contractDeployTx.deployTransaction.wait();
```

7. The ABI has important information like which functions are callable in the smart contract. True
or False
Choose only ONE best answer.
- A. True

8. Ethers.js is a Javascript library for Ethereum development. True or False


Choose only ONE best answer.
- A. True
MODULE 12:

You might also like