OperationOrigination
public class OperationOrigination : Operation
Operation
subclass for originating a contract on the Tezos network
-
The initial balance to give to the contract
Declaration
Swift
public let balance: String
-
Dictionary holding the
code
andstorage
of the contract to create.Declaration
Swift
public let script: [String : Any]
-
Create an OperationOrigination.
Declaration
Swift
public init(source: String, balance: XTZAmount, code: String, storage: String)
Parameters
source
The address originating the contract and paying the fees.
balance
How much XTZ to initiate the contract with.
code
Micheline string containing the contract code.
storage
Micheline string containing the initial storage of the contract.
-
Create a base operation.
Declaration
Swift
public required init(from decoder: Decoder) throws
Parameters
from
A decoder used to convert a data fromat (such as JSON) into the model object.
-
Convert the object into a data format, such as JSON.
Declaration
Swift
public override func encode(to encoder: Encoder) throws
Parameters
to
An encoder that will allow conversions to multipel data formats.
-
A function to check if two operations are equal.
Declaration
Swift
public func isEqual(_ op: OperationOrigination) -> Bool
Parameters
_
An
Operation
to compare againstReturn Value
A
Bool
indicating the result.