Skip to content

Smart Contract Interaction Improvements

Compare
Choose a tag to compare
@keefertaylor keefertaylor released this 30 Jul 17:13
97a8891

TezosKit 4.0

TezosKit 4.0.0 Improves interactions with smart contracts.

Smart Contracts

The following APIs are added to TezosNodeClient:

// Call a smart contract
public func call(...)

// Inspect smart contract storage
public func getContractStorage(...)

// Inspect big map values
public func getBigMapValue(...)

Equivalent PromiseKit APIs are also provided.

Additionally, MichelsonParameter and MichelsonComparable objects are provided to model these interactions.

For additional details about working with Michelson, see: https://github.com/keefertaylor/TezosKit/blob/master/docs/Michelson.md

Other APIs

Signing

A new SignatureProvider class now provides an abstraction for Signing. All Wallet objects now conform to this class and can continue to be used to sign operatins.

Protocol Modeling

A new enum, TezosProtocol provides details about the what protocol version the remote node is running. The value is provided to TezosNodeClient at instantiation time.

Default Fees

A new class, DefaultFeeProvider, is introduced to provide an abstraction between TezosProtocol and default fees. The class is internal to TezosNodeClient and this change should be transparent to suers.

Forging Policy

A new enum, ForgingPolicy, is introduced to express how operations should be forged. TezosKit does not yet support local forging, so the only valid value of this policy is .remote.

Networking

AbstractClient is removed as a super class of TezosNodeClient and ConseilClient and replaced with a new class NetworkClient which is wrapped by the clients.