FUZD / fuzd-chain-protocol / ethereum / EthereumChainProtocol
Class: EthereumChainProtocol ​
Implements ​
Constructors ​
new EthereumChainProtocol() ​
new EthereumChainProtocol(
url
,config
):EthereumChainProtocol
Parameters ​
url ​
string
| RequestRPC
<Methods
>
config ​
contractTimestamp ​
expectedFinality ​
number
worstCaseBlockTime ​
number
Returns ​
Defined in ​
ethereum/index.ts:33
Properties ​
config ​
readonly
config:object
contractTimestamp? ​
optional
contractTimestamp:String0x
expectedFinality ​
expectedFinality:
number
worstCaseBlockTime ​
worstCaseBlockTime:
number
Implementation of ​
ChainProtocol.config
Defined in ​
ethereum/index.ts:35
offset ​
offset:
number
=0
Defined in ​
ethereum/index.ts:399
url ​
readonly
url:string
|RequestRPC
<Methods
>
Defined in ​
ethereum/index.ts:34
Methods ​
_estimateGasNeeded() ​
_estimateGasNeeded(
tx
):Promise
<bigint
>
Parameters ​
tx ​
any
Returns ​
Promise
<bigint
>
Defined in ​
ethereum/index.ts:446
_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:436
broadcastSignedTransaction() ​
broadcastSignedTransaction(
tx
):Promise
<String0x
>
Parameters ​
tx ​
any
Returns ​
Promise
<String0x
>
Implementation of ​
ChainProtocol.broadcastSignedTransaction
Defined in ​
ethereum/index.ts:164
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:236
computeMaxCostAuthorized() ​
computeMaxCostAuthorized(
chainId
,transactionData
,maxFeePerGasAuthorized
):Promise
<bigint
>
Parameters ​
chainId ​
transactionData ​
maxFeePerGasAuthorized ​
Returns ​
Promise
<bigint
>
Implementation of ​
ChainProtocol.computeMaxCostAuthorized
Defined in ​
ethereum/index.ts:285
generatePaymentTransaction() ​
generatePaymentTransaction(
transactionData
,maxFeePerGas
,from
,diffToCover
):object
Parameters ​
transactionData ​
maxFeePerGas ​
bigint
from ​
diffToCover ​
bigint
Returns ​
object
cost ​
cost:
bigint
transaction ​
transaction:
EthereumTransactionData
valueSent ​
valueSent:
bigint
Implementation of ​
ChainProtocol.generatePaymentTransaction
Defined in ​
ethereum/index.ts:380
getBalance() ​
getBalance(
account
):Promise
<bigint
>
Parameters ​
account ​
Returns ​
Promise
<bigint
>
Implementation of ​
ChainProtocol.getBalance
Defined in ​
ethereum/index.ts:156
getBroadcaster() ​
getBroadcaster(
account
,parameters
,forAddress
):Promise
<BroadcasterSignerData
>
Parameters ​
account ​
ETHAccount
parameters ​
forAddress ​
Returns ​
Promise
<BroadcasterSignerData
>
Implementation of ​
ChainProtocol.getBroadcaster
Defined in ​
ethereum/index.ts:219
getDerivationParameters() ​
getDerivationParameters(
account
):Promise
<DerivationParameters
>
Parameters ​
account ​
ETHAccount
Returns ​
Promise
<DerivationParameters
>
Implementation of ​
ChainProtocol.getDerivationParameters
Defined in ​
ethereum/index.ts:213
getGasFee() ​
getGasFee(
executionData
,importanceRatio
):Promise
<GasEstimate
>
Parameters ​
executionData ​
maxFeePerGasAuthorized ​
importanceRatio ​
number
Returns ​
Promise
<GasEstimate
>
Implementation of ​
ChainProtocol.getGasFee
Defined in ​
ethereum/index.ts:180
getNonce() ​
getNonce(
account
):Promise
<String0x
>
Parameters ​
account ​
Returns ​
Promise
<String0x
>
Implementation of ​
ChainProtocol.getNonce
Defined in ​
ethereum/index.ts:172
getTimestamp() ​
getTimestamp():
Promise
<number
>
Returns ​
Promise
<number
>
Implementation of ​
ChainProtocol.getTimestamp
Defined in ​
ethereum/index.ts:400
getTransactionStatus() ​
getTransactionStatus(
transaction
):Promise
<TransactionStatus
>
Parameters ​
transaction ​
Returns ​
Promise
<TransactionStatus
>
Implementation of ​
ChainProtocol.getTransactionStatus
Defined in ​
ethereum/index.ts:44
increaseTime() ​
increaseTime(
amount
):Promise
<void
>
Parameters ​
amount ​
number
Returns ​
Promise
<void
>
Implementation of ​
ChainProtocol.increaseTime
Defined in ​
ethereum/index.ts:428
isTransactionPending() ​
isTransactionPending(
txHash
):Promise
<boolean
>
Parameters ​
txHash ​
Returns ​
Promise
<boolean
>
Implementation of ​
ChainProtocol.isTransactionPending
Defined in ​
ethereum/index.ts:142
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:295
signVoidTransaction() ​
signVoidTransaction(
chainId
,broadcaster
,transactionParameters
):Promise
<SignedTransactionInfo
>
Parameters ​
chainId ​
broadcaster ​
transactionParameters ​
Returns ​
Promise
<SignedTransactionInfo
>
Implementation of ​
ChainProtocol.signVoidTransaction
Defined in ​
ethereum/index.ts:336
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:203