mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-15 15:05:15 +03:00
32 lines
645 B
Swift
32 lines
645 B
Swift
//
|
|
// This source file is part of the Web3Swift.io open source project
|
|
// Copyright 2018 The Web3Swift Authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// GetGasPriceProcedure.swift
|
|
//
|
|
// Created by Timofey Solonin on 10/05/2018
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftyJSON
|
|
|
|
public class GetGasPriceProcedure: RemoteProcedure {
|
|
|
|
private var network: Network
|
|
|
|
public init(network: Network) {
|
|
self.network = network
|
|
}
|
|
|
|
public func call() throws -> JSON {
|
|
return try JSON(
|
|
data: network.call(
|
|
method: "eth_gasPrice",
|
|
params: []
|
|
)
|
|
)
|
|
}
|
|
|
|
}
|