Type: String
Default: Unset
A hex ethereum address that will become the default sender for sessions started within this repository, overriding any default sender in the database.
This setting hardcodes the default sender address for sessions in the repository that sets it. Defining it results in the default sender address appearing in version control. It’s usually better not to commit to or expose a sender in the repository, and use ethAddressSender*
tasks to manage the identity of your senders.
Type: Seq[String]
Default: Unset
Contracts compiled from this repository that should be autodeployed if no arguments are provided to ethTransactionDeploy
, or (in the Test
configuration), within ethDebugGanacheTest. Contracts will be deployed in the order specified. The same contract can be deployed multiple times (with or without different constructor arguments and/or payments).
Each element of the Seq
should be the name of the Contract to deploy, optionally with space separated constructor arguments for that contract. If the constructor is payable, you may optionally also include an amount following the last constructor argument, in the form of a numeric value and a unit, which should be one of wei
, gwei
, szabo
, finney
, or ether
.
This setting is primarily used for smart-contract testing. See e.g. swaldman/quick-and-dirty-token-overview for a project that uses it.
Example
Test / ethcfgAutoDeployContracts := Seq( "MintableBurnableERC20", "ProxyableMintableBurnableERC20", "UpgradeabilityProxyFactory", "PausableMintableBurnableERC20" )
Type: String
Default: "USD"
ISO 4217 Currency Code for the currency ETH values should be translated to in transaction approval messages.
Note: Values other than “USD” have not been tested, and probably won’t work yet.
Type: java.security.SecureRandom
Default: An instance of java.security.SecureRandom
constructed and seeded via that class’ default constructor
The source of entropy used where randomness is required, especially generating new keys. You can customize this with custom initialization or via subclasses of java.security.SecureRandom
Type: BigInt
Default: Unset
If set, this defines the maximum gas limit sbt-ethereum will allow in a transaction, regardless of its estimated gas cost.
Usually this should not be set! To control the gas limit precisely, you can use ethTransactionGasLimitOverrideSet
in your session.
Type: BigInt
Default: Unset
If set, this defines the minimum gas limit sbt-ethereum will provide in a transaction, regardless of its estimated gas cost.
Usually this should not be set! To control the gas limit precisely, you can use ethTransactionGasLimitOverrideSet
in your session.
Type: Double
Default: 0.20
To set the transaction gas limit, sbt-ethereum estimates the transaction’s cost using its node’s eth_estimateGas
function, and then adds a markup, 0.2 or 20% by default. Then any cap or floor is applied.
If you’d like a higher markup (to reduce the possibility of running out of gas) or a lower one (to more tightly limit transaction cost), you can define your own value for this setting.
This value can be negative, in which case it reflects a discount rather than a markup. However, it’s a bad idea — you’ll almost certainly just exhaust your gas and have to pay for failed transactions.
Type: BigInt
Default: Unset
If set, this defines the maximum gas price in wei sbt-ethereum will allow in a transaction, regardless of its estimated prevailing gas price.
Usually this should not be set! To control the gas price precisely, you can use ethTransactionGasPriceOverrideSet
in your session.
Type: BigInt
Default: Unset
If set, this defines the minimum gas price in wei sbt-ethereum will provide in a transaction, regardless of its estimated prevailing gas price.
Usually this should not be set! To control the gas price precisely, you can use ethTransactionGasPriceOverrideSet
in your session.
Type: Double
Default: 0.00
To set the transaction gas price, sbt-ethereum estimates the prevailing gas price using its node’s eth_gasPrice
function, and then adds a markup, of 0.00 or 0% by default. Then any cap or floor is applied.
If you’d like a higher markup (to reduce the possibility of running out of gas) or a lower one (to require a discount to the prevailing cost), you can define your own value for this setting.
This value can be negative, in which case it reflects a discount rather than a markup.
Type: Seq[String]
Default: Nil
(an empty Seq
)
A sequence of directories or URLs that should be searched to resolve Solidity import directives, besides the source directory itself.
Type: Seq[File]
Default: _a list containing the default geth
keystore directory for your platform
A sequence of File objects representing directories containing ethereum V3 Wallet JSON files that should automatically be imported into the sbt-ethereum keystore.
Type: Int
Default: 300
A number of seconds during which, after a wallet has been unlocked, its private key may remain available without retyping the wallet passcode.
Type: String
Default: Unset
The URL of a (nonstandard) network-hosted Solidity compiler.
Networked Solidity compilation using the eth-netcompile
project is unlikely to be supported going forward. Please consider this setting deprecated.
Type: Int
Default: Unset (except in configuration Test
, for which the default value is -1
)
A “hardcoded” EIP-155 Chain ID that will override any default Chain ID set for the project.
Often you will rely upon the shoebox default (set with ethNodeChainIdDefaultSet) or the session override (set with ethNodeChainIdOverrideSet). However, if you want a project to be explicitly associated with a particular chain, you can set this. It will override any value set with ethNodeChainIdDefaultSet.
If a negative value is set, the chain will be treated as ephemeral. Deployments won’t be saved in the shoebox database, and no EIP-155 Chain ID will be embedded in signatures.
Type: String
Default: Unset (except in configuration Test
, for which the default value is http://localhost:58545/
)
A “hardcoded” EIP-155 ethereum node URL that will override any default Node URL set for the project.
Often you will rely upon the shoebox default for your session’s Chain ID (set with ethNodeUrlDefaultSet) or the session override (set with ethNodeUrlOverrideSet). However, if you want a project to be explicitly associated with a particular URL, you can set this. It will override any value set with ethNodeUrlDefaultSet.
Type: Set[EthPrivateKey]]
Default: an empty set
Private keys provided in this setting will be treated as test accounts, accessible directly without any unlocking within sbt-ethereum.
Example:
import com.mchange.sc.v1.consuela.ethereum.EthPrivateKey
ethcfgPublicInsecureTestAccounts := Set(
EthPrivateKey("0x7d3a2ee6be553c58e72e2adf38a96ae8e26eb7678f8c55772034720e96cab250") // 0xD72299b527f9a4bd075D2304C627d7CE21D32Cec
)
Type: String
Default: Unset
The dot-separated fully qualified package name into which Scala stubs for compiled smart contracts should be generated, if you’d like scala stubs for compiled smart contracts! If not set, no Scala stubs will be generated.
Type: String
Default: Unset
Path (absolute or relative to project root) to the directory of the shoebox this project should use.
If unset, the platform default shoebox location is used.
Type: Boolean
Default: true
Defines whether compiler optimization should be enabled during compilations of Solidity files.
Type: Boolean
Default: 200
Defines for how many runs (how exhaustively) the Solidity compiler should try to optimize, if Solidity compiler optimizations are enabled. (See ethcfgSolidityCompilerOptimize)
Type: String
Default: Unset
A full or prefix solidity compiler version that should be used to compile the Solidity files in thie project. For example, 0.5
will choose the latest installed 0.5.x
Solidity compiler, 0.5.16
chooses precisely that compiler. If unset, the installation’s default compiler is used. This setting can be interactively overridden with ethLanguageSolidityCompilerSelect
.
Type: File
(a directory)
Default: src/main/solidity
(or, for the Test
configuration, src/test/solidity
)
Defines where sbt-ethereum looks for Solidity files to compile. Defined in terms of the standard sourceDirectory
key: Unless overridden, this will be a solidity
subdirectory of sourceDirectory.value
.
Type: File
(a directory)
Default: target/ethereum/solidity
Defines where Solidity compilation artifacts get stored. Defined in terms of the ethcfgTargetDir
key: Unless overridden, this will be a solidity
subdirectory of ethcfgTargetDir.value
.
Type: Boolean
Default: false
Ordinarily sbt-ethereum asks to create a wallet if none are present and to install the current default Solidity compiler if it is not available on startup. Sometimes this is annoying. You can turn it off.
Type: File
(a directory)
Default: target/ethereum
Defines where sbt-ethereum-related artifacts and compilations get stored. Defined in terms of the standard target
key: Unless overridden, this will be an ethereum
subdirectory of target
.
Type: Duration
Default: 3 seconds
After a transaction is submitted, sbt-ethereum will “poll” its node for that transaction until it has been mined or times out.
This setting determines how frequently it will poll.
Type: Duration
Default: 5 minutes
After a transaction is submitted, sbt-ethereum will “poll” its node for that transaction until it has been mined or times out.
This setting determines how long sbt-ethereum will wait to see that a transaction has been mined onto a chain before giving up.
Type: Boolean
Default: true
If there is a non-negative Chain ID associated with an sbt-ethereum session, sbt-ethereum can incorporate that in transaction signatures to prevent “replay” attacks, which occur when a valid transaction is submitted to an unintended chain.
If replay attack protection is enabled, transactions are only valid for the (hopefully unique) chain that matches the embedded Chain ID.
If replay attack prevention is not enabled, no Chain ID is encoded into the signature and a transaction might be valid for many chains.