Skip to content

Commit

Permalink
Add all Starcoin jsonrpc Chain/Contract/State/Txpool API in white list
Browse files Browse the repository at this point in the history
  • Loading branch information
wk3368 committed Oct 17, 2022
1 parent 6bdc25c commit e5fd634
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions app/scripts/controllers/permissions/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,50 @@ export const LOG_LIMIT = 100;
export const SAFE_METHODS = [
'chain.id',
'chain.info',
'chain.get_block_by_hash',
'chain.get_block_by_number',
'chain.get_blocks_by_number',
'chain.get_block_info_by_number',
'chain.get_transaction',
'chain.get_transaction_info',
'chain.get_block_txn_infos',
'chain.get_txn_info_by_block_and_index',
'chain.get_events_by_txn_hash',
'chain.get_events',
'chain.get_headers',
'chain.get_transaction_infos',
'chain.get_transaction_proof',
'chain.get_transaction_proof_raw',
'contract.get_code',
'contract.get_resource',
'contract.call',
'contract.call_v2',
'contract.dry_run',
'contract.dry_run_raw',
'contract.get_code',
'contract.get_resource',
'contract.resolve_module',
'contract.resolve_function',
'contract.resolve_module_function_index',
'contract.resolve_struct',
'txpool.gas_price',
'contract.resolve_module',
'state.get',
'state.get_state_node_by_node_hash',
'state.get_with_proof',
'state.get_with_proof_raw',
'state.get_account_state',
'state.get_account_state_set',
'state.get_state_root',
'state.get_with_proof_by_root',
'state.get_with_proof_by_root_raw',
'state.get_code',
'state.get_resource',
'state.list_resource',
'state.list_code',
'txpool.submit_transaction',
'txpool.submit_hex_transaction',
'txpool.gas_price',
'txpool.pending_txns_of_sender',
'txpool.pending_txn',
'txpool.next_sequence_number',
'txpool.state',
'eth_blockNumber',
'eth_call',
'eth_chainId',
Expand Down Expand Up @@ -98,11 +129,6 @@ export const SAFE_METHODS = [
'net_version',
'personal_ecRecover',
'personal_sign',
'state.get_resource',
'state.get_code',
'state.get_account_state_set',
'state.list_resource',
'state.list_code',
'starmask_getProviderState',
'stc_decrypt',
'stc_getEncryptionPublicKey',
Expand Down

0 comments on commit e5fd634

Please sign in to comment.