Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VMContext ¶
type VMContext struct {
// invariant through the batch
// address of the smart contract
Address address.Address
// programHash
ProgramHash hashing.HashValue
// owner address
OwnerAddress address.Address
// reward address
RewardAddress address.Address
// minimum reward
MinimumReward int64
// are node rewards enabled
NodeRewardsEnabled bool
// deterministic source of entropy. Equal the the hash of the previous
Entropy hashing.HashValue
// tx builder to build the final transaction
TxBuilder *txbuilder.Builder
// timestamp of the batch
Timestamp int64
// initial state of the call
VirtualState state.VirtualState
// set for each call
RequestRef sctransaction.RequestRef
// IsEmpty state update upon call, result of the call.
StateUpdate state.StateUpdate
// log
Log *logger.Logger
}
context of one VM call (for one request)
type VMTask ¶
type VMTask struct {
// inputs (immutable)
LeaderPeerIndex uint16
ProgramHash hashing.HashValue
Address address.Address
Color balance.Color
// deterministic source of entropy (pseudorandom, unpredictable for parties)
Entropy hashing.HashValue
Balances map[valuetransaction.ID][]*balance.Balance
OwnerAddress address.Address
RewardAddress address.Address
MinimumReward int64
Requests []sctransaction.RequestRef
Timestamp int64
VirtualState state.VirtualState // input immutable
Log *logger.Logger
// call when finished
OnFinish func(error)
// outputs
ResultTransaction *sctransaction.Transaction
ResultBatch state.Batch
}
task context (for batch of requests)
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
donatewithfeedback
DonateWithFeedback is a smart contract which handles donation account and log of feedback messages sent together with the donations
|
DonateWithFeedback is a smart contract which handles donation account and log of feedback messages sent together with the donations |
|
donatewithfeedback/dwfimpl
hard coded smart contract code implements DonateWithFeedback
|
hard coded smart contract code implements DonateWithFeedback |
|
fairauction
hard coded implementation of the FairAuction smart contract The auction dApp is automatically run by committee, a distributed market for colored tokens
|
hard coded implementation of the FairAuction smart contract The auction dApp is automatically run by committee, a distributed market for colored tokens |
|
fairroulette
FairRoulette is a PoC smart contract for IOTA Smart Contracts and the Wasp node In this package smart contract is implemented as a hardcoded Go program.
|
FairRoulette is a PoC smart contract for IOTA Smart Contracts and the Wasp node In this package smart contract is implemented as a hardcoded Go program. |
|
logsc
logsc is a smart contract that takes requests to log a message and adds it to the log
|
logsc is a smart contract that takes requests to log a message and adds it to the log |
|
sc7
nil processor takes any request and dos nothing, i.e.
|
nil processor takes any request and dos nothing, i.e. |
|
sc8
nil processor takes any request and dos nothing, i.e.
|
nil processor takes any request and dos nothing, i.e. |
|
sc9
nil processor takes any request and dos nothing, i.e.
|
nil processor takes any request and dos nothing, i.e. |
|
tokenregistry
smart contract code implements Token Registry.
|
smart contract code implements Token Registry. |
|
vmnil
nil processor takes any request and dos nothing, i.e.
|
nil processor takes any request and dos nothing, i.e. |
|
package present processor interface.
|
package present processor interface. |
Click to show internal directories.
Click to hide internal directories.