sbt-ethereum
v.0.5.3
-=-=-=-=-=-
Overview
Warnings
Method to the Madness
Tutorials
Getting Started
Using a Smart Contract (I)
Working with Ether & Multiple Addresses
Using a Smart Contract (II)
Creating a Smart Contract
Testing a Smart Contract
Verifying a Smart Contract on Etherscan
Signing a Transaction with Offline Keys
Tasks and Commands
eth
ethAddress*
Alias*
Sender*
ethContract*
Abi*
Compilation*
Other
ethDebug*
ethKeystore*
ethLanguage*
Solidity*
ethNode*
ChainId*
Url*
ethShoebox*
ethTransaction*
Gas*
Nonce*
Unsigned*
ethUtil*
ens*
erc20*
etherscan*
Settings
Appendix
Prerequisites
Known Shortcomings
+ + + + +
sbt-ethereum
Table of Contents
sbt-ethereum
Table of Contents
Overview
What is sbt-ethereum?
Mutual support
Development
Acknowledgements
Warnings
Be careful
Backup your shoebox and passcodes
Keep your secrets secret
Keep your shoebox private
Method to the Madness
Tab completion is essential
sbt-ethereum
commands embed logically hierarchical menus
Defaults and session overrides
Aliases
Set / Drop / List / Print
So many commands, and some weird names!
Tutorials
Table of Contents
Getting Started
Download a repository
Initialize and set-up
sbt-ethereum
Run your first command
Run your second command
Back up your “shoebox”
Connect to a node
Setting up a URL
Check out your session status
Using a Smart Contract (I)
Assigning an alias to an Ethereum address
Acquiring an ABI for a smart contract
Manually acquiring an ABI from
Etherscan
Automatically acquiring an ABI from
Etherscan
(optional)
Accessing read-only methods of an
Ethereum
smart contract
Calling methods that change the data on the blockchain
Working with Ether & Multiple Addresses
Checking the Ether balance of addresses
Funding an Ethereum address
Let’s Ping!
Creating a Second Address
Checking the Current Sender
Checking Account Balances
Sending Ether
Changing the Sender Address
Using a Smart Contract (II)
Calling methods that change the data on the blockchain
Creating a Smart Contract
Create a development repository
Define your smart contract source code
Compile the source code
Deploying the contract
Trying out the contract
Testing a Smart Contract
Basic approach
Setting up testing in
build.sbt
Defining
Test / ethcfgAutoDeployContracts
Generating Scala stubs
Other test settings
Putting it all together
Defining tests in Scala
Running the tests
Verifying a Smart Contract on Etherscan
TL; DR
Step by step, in absurd detail
Signing a Transaction with Offline Keys
Setting up an offline device
Prepare your online computer
Fund an offline address
Transact from an offline address
Create and save an unsigned transaction
Sign the unsigned transaction from the offline computer
Forward the signed transaction to the blockchain
Tasks and Commands
Table of Contents
eth
eth
ethAddress*
ethAddressAlias*
ethAddressBalance
ethAddressOverride
ethAddressOverrideDrop
ethAddressOverridePrint
ethAddressOverrideSet
ethAddressOverridePrintet
ethAddressSender*
Alias*
ethAddressAliasCheck
ethAddressAliasDrop
ethAddressAliasList
ethAddressAliasSet
Sender*
ethAddressSender
ethAddressSenderDefaultDrop
ethAddressSenderDefaultPrint
ethAddressSenderDefaultSet
ethAddressSenderOverride
ethAddressSenderOverrideDrop
ethAddressSenderOverridePrint
ethAddressSenderOverrideSet
ethAddressSenderPrint
ethContract*
ethContractAbi*
ethContractCompilation*
Other
Abi*
ethContractAbiAliasDrop
ethContractAbiAliasList
ethContractAbiAliasSet
ethContractAbiCallDecode
ethContractAbiCallEncode
ethContractAbiDefaultDrop
ethContractAbiDefaultList
ethContractAbiDefaultImport
ethContractAbiDefaultSet
ethContractAbiImport
ethContractAbiOverride
ethContractAbiOverrideDrop
ethContractAbiOverrideDropAll
ethContractAbiOverrideList
ethContractAbiOverridePrint
ethContractAbiOverrideSet
ethContractAbiPrint
ethContractAbiPrintCompact
ethContractAbiPrintPretty
Compilation*
ethContractCompilationCull
ethContractCompilationInspect
ethContractCompilationList
Other
ethContractStorageLookup
ethDebug*
ethDebugGanacheHalt
ethDebugGanacheRestart
ethDebugGanacheStart
ethDebugGanacheTest
ethKeystore*
ethKeystoreFromJsonImport
ethKeystoreFromPrivateKeyImport
ethKeystoreList
ethKeystorePrivateKeyReveal
ethKeystoreWalletV3Create
ethKeystoreWalletV3FromJsonImport
ethKeystoreWalletV3FromPrivateKeyImport
ethKeystoreWalletV3Print
ethKeystoreWalletV3Validate
ethLanguage*
ethLanguageSolidity*
Solidity*
ethLanguageSolidityCompilerInstall
ethLanguageSolidityCompilerList
ethLanguageSolidityCompilerPrint
ethLanguageSolidityCompilerSelect
ethNode*
ethNodeBlockNumberPrint
ethNodeChainId*
ethNodeUrl*
ChainId*
ethNodeChainIdDefaultDrop
ethNodeChainIdDefaultSet
ethNodeChainIdDefaultPrint
ethNodeChainIdOverrideDrop
ethNodeChainIdOverrideSet
ethNodeChainIdOverridePrint
ethNodeChainIdOverride
ethNodeChainIdPrint
ethNodeChainId
Url*
ethNodeUrlDefaultDrop
ethNodeUrlDefaultPrint
ethNodeUrlDefaultSet
ethNodeUrlOverrideDrop
ethNodeUrlOverrideSet
ethNodeUrlOverridePrint
ethNodeUrlOverride
ethNodeUrlPrint
ethNodeUrl
ethShoebox*
Platform default shoebox directory
ethShoeboxBackup
ethShoeboxDatabaseDumpCreate
ethShoeboxDatabaseDumpRestore
ethShoeboxDatabaseDumpRestore
ethShoeboxDirectoryPrint
ethShoeboxDirectorySwitch
ethShoeboxRestore
ethTransaction*
ethTransactionDeploy
ethTransactionEtherSend
ethTransactionForward
ethTransactionGas*
ethTransactionInvoke
ethTransactionInvokeAny
ethTransactionLookup
ethTransactionMock
ethTransactionNonce*
ethTransactionPing
ethTransactionRaw
ethTransactionSign
ethTransactionUnsigned*
ethTransactionView
Gas*
ethTransactionGasLimitOverride
ethTransactionGasLimitOverrideDrop
ethTransactionGasLimitOverridePrint
ethTransactionGasLimitOverrideSet
ethTransactionGasPriceOverride
ethTransactionGasPriceOverrideDrop
ethTransactionGasPriceOverridePrint
ethTransactionGasPriceOverrideSet
Nonce*
ethTransactionNonceOverride
ethTransactionNonceOverrideDrop
ethTransactionNonceOverridePrint
ethTransactionNonceOverrideSet
ethTransactionNonceOverrideValue
Unsigned*
ethTransactionUnsignedEtherSend
ethTransactionUnsignedInvoke
ethTransactionUnsignedInvokeAny
ethTransactionUnsignedRaw
ethUtil*
ethUtilFunctionIdentifier
ethUtilHashKeccak256
ethUtilTimeIsoNow
ethUtilTimeUnix
ens*
ensAddressLookup
ensAddressSet
ensAddressMultichainLookup
ensAddressMultichainSet
ensMigrateRegistrar
ensNameExtend
ensNameHashes
ensNamePrice
ensNameRegister
ensNameStatus
ensOwnerLookup
ensOwnerSet
ensResolverLookup
ensResolverSet
ensSubnodeCreate
ensSubnodeOwnerSet
erc20*
erc20AllowancePrint
erc20AllowanceSet
erc20Balance
erc20ConvertAtomsToTokens
erc20ConvertTokensToAtoms
erc20Summary
erc20Transfer
etherscan*
etherscanApiKeyDrop
etherscanApiKeyPrint
etherscanApiKeySet
Settings
ethcfgAddressSender
ethcfgAutoDeployContracts
ethcfgBaseCurrencyCode
ethcfgEntropySource
ethcfgGasLimitCap
ethcfgGasLimitFloor
ethcfgGasLimitMarkup
ethcfgGasPriceCap
ethcfgGasPriceFloor
ethcfgGasPriceMarkup
ethcfgIncludeLocations
ethcfgKeystoreAutoImportLocationsV3
ethcfgKeystoreAutoRelockSeconds
ethcfgNetcompileUrl
ethcfgNodeChainId
ethcfgNodeUrl
ethcfgPublicInsecureTestAccounts
ethcfgScalaStubsPackage
ethcfgShoeboxDirectory
ethcfgSolidityCompilerOptimize
ethcfgSolidityCompilerOptimizerRuns
ethcfgSolidityCompilerVersion
ethcfgSoliditySource
ethcfgSolidityDestination
ethcfgSuppressInteractiveStartup
ethcfgTargetDir
ethcfgTransactionReceiptPollPeriod
ethcfgTransactionReceiptTimeout
ethcfgUseReplayAttackProtection
Appendix
Overview
Prerequisites
command line
java 8 or 11 runtime
git
sbt
etherscan API key (optional)
Known Shortcomings
Array inputs cannot include spaces
Addresses in arrays must be specified as hex
Line numbers in Solidity compiler error messages don’t match those in your source code
Things change quickly, we are always a step behind
Linking predeployed Solidity libraries is not yet supported
Java 11 support is untested
© 2021 Machinery For Change LLC
—
This software provided
without warranty to the extent permitted by applicable law
under your choice of the
Lesser GNU Public License, v.2.1 (LGPL)
or the
Eclipse Public License, v.1.0 (EPL)]