FUZD / fuzd-chain-protocol / ethereum / EthereumChainProtocol
Class: EthereumChainProtocol
Implements
Constructors
new EthereumChainProtocol()
new EthereumChainProtocol(
url
,config
,account
):EthereumChainProtocol
Parameters
url
string
| RequestRPC
<Methods
>
config
contractTimestamp
expectedFinality
number
worstCaseBlockTime
number
account
ETHAccount
Returns
Defined in
ethereum/index.ts:22
Properties
account
account:
ETHAccount
Defined in
ethereum/index.ts:29
config
readonly
config:object
contractTimestamp?
optional
contractTimestamp:String0x
expectedFinality
expectedFinality:
number
worstCaseBlockTime
worstCaseBlockTime:
number
Implementation of
ChainProtocol.config
Defined in
ethereum/index.ts:24
offset
offset:
number
=0
Defined in
ethereum/index.ts:323
url
readonly
url:string
|RequestRPC
<Methods
>
Defined in
ethereum/index.ts:23
Methods
_estimateGasNeeded()
_estimateGasNeeded(
tx
):Promise
<bigint
>
Parameters
tx
any
Returns
Promise
<bigint
>
Defined in
ethereum/index.ts:373
_validateDerivationParameters()
_validateDerivationParameters(
parameters
):Promise
<{success
:true
; } | {error
:string
;success
:false
; }>
Parameters
parameters
Returns
Promise
<{ success
: true
; } | { error
: string
; success
: false
; }>
Defined in
ethereum/index.ts:356
broadcastSignedTransaction()
broadcastSignedTransaction(
tx
):Promise
<String0x
>
Parameters
tx
any
Returns
Promise
<String0x
>
Implementation of
ChainProtocol.broadcastSignedTransaction
Defined in
ethereum/index.ts:119
checkValidity()
checkValidity(
chainId
,transactionData
,broadcaster
,transactionParameters
):Promise
<{revert
:"unknown"
; } | {notEnoughGas
:boolean
;revert
:boolean
; }>
Parameters
chainId
transactionData
broadcaster
transactionParameters
Returns
Promise
<{ revert
: "unknown"
; } | { notEnoughGas
: boolean
; revert
: boolean
; }>
Implementation of
ChainProtocol.checkValidity
Defined in
ethereum/index.ts:187
generatePaymentTransaction()
generatePaymentTransaction(
transactionData
,maxFeePerGas
,from
,diffToCover
):object
Parameters
transactionData
maxFeePerGas
bigint
from
diffToCover
bigint
Returns
object
cost
cost:
bigint
transaction
transaction:
EthereumTransactionData
Implementation of
ChainProtocol.generatePaymentTransaction
Defined in
ethereum/index.ts:304
getBalance()
getBalance(
account
):Promise
<bigint
>
Parameters
account
Returns
Promise
<bigint
>
Implementation of
ChainProtocol.getBalance
Defined in
ethereum/index.ts:111
getBroadcaster()
getBroadcaster(
parameters
,forAddress
):Promise
<BroadcasterSignerData
>
Parameters
parameters
forAddress
Returns
Promise
<BroadcasterSignerData
>
Implementation of
ChainProtocol.getBroadcaster
Defined in
ethereum/index.ts:175
getCurrentDerivationParameters()
getCurrentDerivationParameters():
Promise
<DerivationParameters
>
Returns
Promise
<DerivationParameters
>
Implementation of
ChainProtocol.getCurrentDerivationParameters
Defined in
ethereum/index.ts:169
getGasFee()
getGasFee(
executionData
):Promise
<GasEstimate
>
Parameters
executionData
maxFeePerGasAuthorized
Returns
Promise
<GasEstimate
>
Implementation of
ChainProtocol.getGasFee
Defined in
ethereum/index.ts:135
getNonce()
getNonce(
account
):Promise
<String0x
>
Parameters
account
Returns
Promise
<String0x
>
Implementation of
ChainProtocol.getNonce
Defined in
ethereum/index.ts:127
getTimestamp()
getTimestamp():
Promise
<number
>
Returns
Promise
<number
>
Implementation of
ChainProtocol.getTimestamp
Defined in
ethereum/index.ts:324
getTransactionStatus()
getTransactionStatus(
transaction
):Promise
<TransactionStatus
>
Parameters
transaction
Returns
Promise
<TransactionStatus
>
Implementation of
ChainProtocol.getTransactionStatus
Defined in
ethereum/index.ts:34
increaseTime()
increaseTime(
amount
):Promise
<void
>
Parameters
amount
number
Returns
Promise
<void
>
Implementation of
ChainProtocol.increaseTime
Defined in
ethereum/index.ts:348
isTransactionPending()
isTransactionPending(
txHash
):Promise
<boolean
>
Parameters
txHash
Returns
Promise
<boolean
>
Implementation of
ChainProtocol.isTransactionPending
Defined in
ethereum/index.ts:97
signTransaction()
signTransaction(
chainId
,transactionData
,broadcaster
,transactionParameters
):Promise
<SignedTransactionInfo
>
Parameters
chainId
transactionData
broadcaster
transactionParameters
Returns
Promise
<SignedTransactionInfo
>
Implementation of
ChainProtocol.signTransaction
Defined in
ethereum/index.ts:222
signVoidTransaction()
signVoidTransaction(
chainId
,broadcaster
,transactionParameters
):Promise
<SignedTransactionInfo
>
Parameters
chainId
broadcaster
transactionParameters
Returns
Promise
<SignedTransactionInfo
>
Implementation of
ChainProtocol.signVoidTransaction
Defined in
ethereum/index.ts:261
validateDerivationParameters()
validateDerivationParameters(
parameters
):Promise
<{success
:true
; } | {error
:string
;success
:false
; }>
Parameters
parameters
Returns
Promise
<{ success
: true
; } | { error
: string
; success
: false
; }>
Implementation of
ChainProtocol.validateDerivationParameters
Defined in
ethereum/index.ts:159