Skip to content

Instantly share code, notes, and snippets.

View alonecandies's full-sized avatar
❄️

Long Hoang alonecandies

❄️
View GitHub Profile
@jatinshah
jatinshah / interview_questions.md
Last active August 26, 2023 11:15
Blockchain Engineer - Interview Questions
  • Write a smart contract with semantics defined below, deploy it to Ethereum Ropsten testnet. Please share contract address and include verified code on Etherscan
contract SimpleToken {
    // Create a new token, with default price of 0.01 ETH
    // Token ids can start with zero and auto increment
    // Current owner is 0x0
    // Returns token id
    function mint() public returns (uint256);

Answers to Deep Questions about Solidity

The following list of questions was taken from https://www.reddit.com/r/ethereum/comments/72reba/do_you_have_deep_questions_about_solidity_or_the/

An updated summary on the different ways one could have two contracts interact (DELEGATECALL, STATICCALL, libraries, all that stuff) with clear pros/cons for each (gas cost, whether it requires EVM assembly directives, etc)

Question by /u/drcode

I won't talk about low-level opcodes here because of the brevity of the answer. In general, there are four ways functions can be called in Solidity: