solidity-shell

An interactive Solidity Shell

Downloads
172
Stars
545
Committers
2

Bot releases are hidden (Show)

solidity-shell - Version 0.2.4 Latest Release

Published by tintinweb about 2 years ago

v0.2.4

  • new: configure an etherscan.io apiKey .config set etherscanApiKey <newApiKey> (default: YourApiKeyToken demo key) #25 #24
solidity-shell - v0.2.3

Published by tintinweb about 2 years ago

v0.2.3

  • update: dependencies (solc to 0.8.17, abi-to-sol, ...)
solidity-shell - Version 0.2.2

Published by tintinweb about 2 years ago

v0.2.2

  • new: inspection commands: .inspect contract raw storage, show generated bytecode, opcodes, storageLayout - #23
  .inspect
      bytecode                     ... show bytecode of underlying contract
      opcodes                      ... show disassembled opcodes of underlying contract
      storageLayout                ... show variable to storage slot mapping for underlying contract
      storage <slot> <num> [<address>]  ... show raw storage at slot of underlying deployed contract
      deployed                     ... debug: show internal contract object
solidity-shell - Version 0.2.1

Published by tintinweb about 2 years ago

v0.2.1

  • fix: feed current compiler version into abi-to-sol; strip attribution and other code #20 #21
  • update: compiler list
  • update: built-in solc -> 0.8.16
solidity-shell - Version 0.2.0

Published by tintinweb about 2 years ago

v0.2.0

  • new: new command to fetch & load interface declaration from etherscan.io #19

shell-fetch-interface

solidity-shell - Version 0.1.2

Published by tintinweb over 2 years ago

v0.1.2

  • fix: support require(), type, abstract, library
  • update: compiler list
  • update: built-in solc -> 0.8.15
  • update: dependencies
solidity-shell - Version 0.1.1

Published by tintinweb over 2 years ago

v0.1.1

  • fix: return appropriate error message when trying to return an uninit storage pointer - #17
  • fix: support enums
🚀 Entering interactive Solidity ^0.8.13 shell (🧁:Ganache built-in). '.help' and '.exit' are your friends.
»  enum FreshJuiceSize{ SMALL, MEDIUM, LARGE }
»  uint8(FreshJuiceSize.LARGE)
2
  • fix: case insensitive bool match for .config set <var> True|False|true|false
  • update: dependencies
solidity-shell - Version 0.1.0

Published by tintinweb over 2 years ago

v0.1.0

⚠️ pot. breaking changes: solidity-shell now ships with ganache. use .chain set-provider to switch chain providers. the built-in ganache provider is used by default.

  • new: built in ganache provider
  • new: .chain subcommand
    • .chain restart - restarts the service (formerly known as .restartblockchain)
    • .chain set-provider [fork-url] - switch between the internal or an external ganache-cli command or url-provider. Optionally specify a ganache fork-url.
      • .chain set-provider internal https://mainnet.infura.io/v3/yourApiKey
    • .chain accounts - show ganache accounts
    • .chain eth_<X> [args...] - arbitrary eth JSONrpc method calls to blockchain provider.
      • e.g. .chain eth_accounts returns the blockchain providers response to the eth_accounts JSONrpc call.
  • new: command line switches:
    • --fork overrides fork-url option for internal ganache provider solidity-shell --fork https://mainnet.infura.io/v3/yourApiKey.
    • --reset-config resets the config file.
    • --show-config-file prints the path to the config file.
  • fix: better error handling. prevent vicious cycles where broken config trashes the app 🤦‍♂️
  • update: dependencies and solc references updated
solidity-shell - Version 0.0.11

Published by tintinweb over 2 years ago

v0.0.11

  • new: configurable call and deploy gas
  • new: .restartblockchain command to restart ganache e.g. after config changes
  • fix: fixed returnval for some keywords
  • fix: show result for functions declaring multiple return vals
  • fix: naive fix to resolve function declarations for multi returnval function invocations.
solidity-shell - Version 0.0.10

Published by tintinweb almost 3 years ago

v0.0.10

  • new: update to [email protected]
  • new: basic autocomplete for built-ins (configurable via .config) - #11
  • fix: return value of unit constants (e.g. 2 ether) - #12
  • fix: distinguish between/ autoguess const signed and unsigned int return values - #12
  • update: minor refactoring - #11
solidity-shell - Version 0.0.9

Published by tintinweb almost 3 years ago

v0.0.9

  • new: support the import directive - #8
    • new: experimental support for https imports, i.e. import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC721/IERC721.sol". This can be disabled by setting » .config set resolveHttpImports false.
  • fix: localhost alias may not be available on some systems - #9
solidity-shell - Version 0.0.8

Published by tintinweb almost 3 years ago

v0.0.8

  • new: Passthru ganache-cli settings as options to solidity-shell #7
solidity-shell -- -fork https://mainnet.infura.io/v3/yourToken

Query a live contracts ERC20.name():


 »  interface ERC20 {
multi> function name() external view returns (string memory);
multi> }
 
 »  ERC20(0xB8c77482e45F1F44dE1745F52C74426C631bDD52).name()
BNB

  • fix: .config set handling of strings and multi-word arguments
  • fix: exit exits solidity-shell completely
solidity-shell - Version 0.0.7

Published by tintinweb almost 3 years ago

v0.0.7

  • fix: rework remote compiler
    • added a remoteCompiler wrapper
  • fix: always use latest compiler shipped with this package by default
    • new: ship with solc 0.8.10
    • preference: use solc shipped with package by default, else check static solcVersions list and fetch remote compiler, else update solcVersions list and fetch remote compiler.
  • fix: better error handling when changing compiler version
  • new: support error keyword and fix memory/storage type declarations
solidity-shell - Version 0.0.6

Published by tintinweb about 3 years ago

v0.0.6

  • fix: handle interface declarations
solidity-shell - Version 0.0.5

Published by tintinweb about 3 years ago

v0.0.5

  • fix: support blocks/loops - #2
  • fix: better ganache error handling and minor refactoring
solidity-shell - Version 0.0.4

Published by tintinweb about 3 years ago

v0.0.4

  • new: dynamic compiler selection via pragma directive
    • changing the solidity version pragma attempts to load the selected compiler version remotely. e.g. type pragma solidity 0.8.4 to switch to solidity v0.8.4.

example

playing with arithmetic underflows in solidity 0.8.7 (reverts) and 0.6.0 (underflows)

node bin/main.js      
 
🚀 Entering interactive Solidity ^0.8.7 shell. '.help' and '.exit' are your friends.
 »  ganache-mgr: starting temp. ganache instance ...
 »
 »  
 »  uint(555)-uint(666)
Error: Returned error: VM Exception while processing transaction: revert
     {
  data: {
    '0xf56c7c173b51b91c89a49735fab75926b166e51a42b721a867d704612dcdd14b': {
      error: 'revert',
      program_counter: 232,
      return: '0x4e487b710000000000000000000000000000000000000000000000000000000000000011'
    },
    stack: 'c: VM Exception while processing transaction: revert\n' +
      '    at Function.c.fromResults (ganache-cli/build/ganache-core.node.cli.js:4:192416)\n' +
      '    at ganache-cli/build/ganache-core.node.cli.js:42:50402',
    name: 'c'
  }
}
 »  pragma solidity 0.6.0
 »  uint(555)-uint(666)
115792089237316195423570985008687907853269984665640564039457584007913129639825
 »  
solidity-shell - Version 0.0.3

Published by tintinweb about 3 years ago

still alpha 🥳

solidity-shell - Version 0.0.2

Published by tintinweb about 3 years ago

alpha 🥳