Skip to content

Commit

Permalink
chore: add cfx_maxPriorityFeePerGas rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
iosh committed Sep 24, 2024
1 parent fc3b38c commit 97caa2c
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/background/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@fluent-wallet/cfx_get-transaction-by-hash": "workspace:packages/rpcs/cfx_getTransactionByHash",
"@fluent-wallet/cfx_get-transaction-receipt": "workspace:packages/rpcs/cfx_getTransactionReceipt",
"@fluent-wallet/cfx_get-vote-list": "workspace:packages/rpcs/cfx_getVoteList",
"@fluent-wallet/cfx_max-priority-fee-per-gas": "workspace:*",
"@fluent-wallet/cfx_net-version": "workspace:packages/rpcs/cfx_netVersion",
"@fluent-wallet/cfx_opened-method-groups": "workspace:*",
"@fluent-wallet/cfx_request-accounts": "workspace:packages/rpcs/cfx_requestAccounts",
Expand Down
2 changes: 2 additions & 0 deletions packages/background/src/rpc-engine-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ import * as cfxSendRawTransaction from '@fluent-wallet/cfx_send-raw-transaction'
import * as cfxSendTransaction from '@fluent-wallet/cfx_send-transaction'
import * as cfxSignTransaction from '@fluent-wallet/cfx_sign-transaction'
import * as cfxTypedSignV4 from '@fluent-wallet/cfx_sign-typed-data_v4'
import * as cfx_maxPriorityFeePerGas from '@fluent-wallet/cfx_max-priority-fee-per-gas'
import * as ethAccounts from '@fluent-wallet/eth_accounts'
import * as ethBlockNumber from '@fluent-wallet/eth_block-number'
import * as ethCall from '@fluent-wallet/eth_call'
Expand Down Expand Up @@ -320,6 +321,7 @@ export const rpcEngineOpts = {
cfxSendTransaction,
cfxSignTxWithLedgerNanoS,
cfxGetMaxGasLimit,
cfx_maxPriorityFeePerGas,

// eth
ethGetCode,
Expand Down
1 change: 1 addition & 0 deletions packages/rpcs/cfx_maxPriorityFeePerGas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @fluent-wallet/cfx_max-priority-fee-per-gas
4 changes: 4 additions & 0 deletions packages/rpcs/cfx_maxPriorityFeePerGas/doc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
metadata: {standard: true},
en: 'No doc available',
}
16 changes: 16 additions & 0 deletions packages/rpcs/cfx_maxPriorityFeePerGas/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {optParam} from '@fluent-wallet/spec'

export const NAME = 'cfx_maxPriorityFeePerGas'

export const schemas = {
input: optParam,
}

export const permissions = {
locked: true,
external: ['popup', 'inpage'],
}

export const main = async ({f, params}) => {
return await f(params)
}
9 changes: 9 additions & 0 deletions packages/rpcs/cfx_maxPriorityFeePerGas/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@fluent-wallet/cfx_max-priority-fee-per-gas",
"type": "module",
"main": "index.js",
"version": "0.0.1",
"dependencies": {
"@fluent-wallet/spec": "workspace:packages/spec"
}
}
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4028,6 +4028,14 @@ __metadata:
languageName: unknown
linkType: soft

"@fluent-wallet/cfx_max-priority-fee-per-gas@workspace:*, @fluent-wallet/cfx_max-priority-fee-per-gas@workspace:packages/rpcs/cfx_maxPriorityFeePerGas":
version: 0.0.0-use.local
resolution: "@fluent-wallet/cfx_max-priority-fee-per-gas@workspace:packages/rpcs/cfx_maxPriorityFeePerGas"
dependencies:
"@fluent-wallet/spec": "workspace:packages/spec"
languageName: unknown
linkType: soft

"@fluent-wallet/cfx_net-version@workspace:packages/rpcs/cfx_netVersion":
version: 0.0.0-use.local
resolution: "@fluent-wallet/cfx_net-version@workspace:packages/rpcs/cfx_netVersion"
Expand Down Expand Up @@ -17908,6 +17916,7 @@ __metadata:
"@fluent-wallet/cfx_get-transaction-by-hash": "workspace:packages/rpcs/cfx_getTransactionByHash"
"@fluent-wallet/cfx_get-transaction-receipt": "workspace:packages/rpcs/cfx_getTransactionReceipt"
"@fluent-wallet/cfx_get-vote-list": "workspace:packages/rpcs/cfx_getVoteList"
"@fluent-wallet/cfx_max-priority-fee-per-gas": "workspace:*"
"@fluent-wallet/cfx_net-version": "workspace:packages/rpcs/cfx_netVersion"
"@fluent-wallet/cfx_opened-method-groups": "workspace:*"
"@fluent-wallet/cfx_request-accounts": "workspace:packages/rpcs/cfx_requestAccounts"
Expand Down

0 comments on commit 97caa2c

Please sign in to comment.