MCPcopy Create free account

hub / github.com/ddimaria/rust-blockchain-tutorial / functions

Functions184 in github.com/ddimaria/rust-blockchain-tutorial

↓ 16 callersMethodget_account
(&self, key: &Account)
chain/src/account.rs:59
↓ 15 callersFunctionweb3
()
web3/src/helpers.rs:24
↓ 11 callersFunctionserialize
(value: &V)
chain/src/helpers.rs:15
↓ 9 callersFunctionkeypair
Generate a private/public keypair ```rust use utils::crypto::keypair; let (private_key, public_key) = keypair(); ```
utils/src/crypto.rs:84
↓ 8 callersMethodsend_rpc
Send a RPC call with the given method and parameters. # Examples ```ignore let web3 = web3::Web3::new("http://127.0.0.1:8545").unwrap(); let respon
web3/src/lib.rs:50
↓ 7 callersFunctionsetup
()
chain/src/helpers.rs:69
↓ 6 callersMethodget_current_block
(&self)
chain/src/blockchain.rs:43
↓ 6 callersFunctionhash
Create a hash ```rust use utils::crypto::hash; let message = b"The message"; let hashed = hash(message); assert_eq!(hashed, [ 174, 253, 38, 204, 75,
utils/src/crypto.rs:139
↓ 6 callersFunctionpublic_key_address
Convert a public key into an address using the last 20 bytes of the hash ```rust use utils::crypto::{keypair, public_key_address}; let (private_key,
utils/src/crypto.rs:109
↓ 5 callersFunctionadd_account
(account_storage: &mut AccountStorage)
chain/src/account.rs:140
↓ 5 callersFunctionnew_transaction
( to: Account, blockchain: Arc<Mutex<BlockChain>>, )
chain/src/blockchain.rs:297
↓ 5 callersFunctionrecover_public_key
Recover a public key using a recoverable signature and signed message ```rust use utils::crypto::{keypair, recover_public_key, sign_recovery}; let (
utils/src/crypto.rs:209
↓ 5 callersFunctionto_hex
Convert a single value into a hexadecimal number
types/src/helpers.rs:18
↓ 5 callersFunctionverify
Verify that a message was signed using a public key ```rust use utils::crypto::{keypair, sign, sign_recovery, verify}; let (private_key, public_key)
utils/src/crypto.rs:189
↓ 4 callersMethodadd_account
(&mut self, key: &Account, data: &AccountData)
chain/src/account.rs:55
↓ 4 callersFunctionadd_keys
()
chain/src/keys.rs:22
↓ 4 callersFunctiondeserialize
(value: &[u8])
chain/src/helpers.rs:20
↓ 4 callersMethodget
(&self, key: &[u8])
chain/src/storage.rs:20
↓ 4 callersFunctionhash_message
Helper function to hash bytes and convert to a Message
utils/src/crypto.rs:239
↓ 4 callersMethodinsert
(&self, key: &[u8], value: Vec<u8>)
chain/src/storage.rs:29
↓ 4 callersFunctionnew_account_storage
()
chain/src/account.rs:136
↓ 4 callersFunctionnew_transaction
()
types/src/transaction.rs:277
↓ 4 callersMethodsign
(&self, key: SecretKey)
types/src/transaction.rs:96
↓ 4 callersMethodtransaction_hash
(&self)
types/src/transaction.rs:83
↓ 4 callersMethodupsert
(&mut self, key: &Account, data: &AccountData)
chain/src/account.rs:28
↓ 3 callersFunctionassert_receipt
(blockchain: Arc<Mutex<BlockChain>>, transaction_hash: H256)
chain/src/blockchain.rs:325
↓ 3 callersFunctioncall_function
(bytes: &[u8], function: &str, params: &[&str])
runtime/src/contract.rs:9
↓ 3 callersFunctiondeploy_contract
(simple: bool)
web3/src/helpers.rs:38
↓ 3 callersFunctionincrement_account_1_nonce
()
web3/src/helpers.rs:32
↓ 3 callersMethodroot_hash
(&mut self)
chain/src/account.rs:118
↓ 3 callersMethodsend_transaction
( &mut self, transaction_request: TransactionRequest, )
chain/src/blockchain.rs:87
↓ 3 callersFunctionsign_recovery
Sign a recoverable message with a private key ```rust use utils::crypto::{keypair, sign_recovery}; let (private_key, public_key) = keypair(); let me
utils/src/crypto.rs:166
↓ 3 callersMethodtransaction_receipt
Retrieve a transaction receipt by transaction hash. See https://eth.wiki/json-rpc/API#eth_getTransactionReceipt # Examples ```ignore use types::tra
web3/src/transaction.rs:113
↓ 3 callersMethodtry_into
(self)
utils/src/crypto.rs:37
↓ 2 callersFunctionappend
(input: TokenStream2)
proc_macros/src/newtype.rs:5
↓ 2 callersFunctioneth_get_balance
(module: &mut RpcModule<Context>)
chain/src/method.rs:43
↓ 2 callersMethodget_account_balance_by_block
( &self, key: &Account, _block: &BlockNumber, )
chain/src/account.rs:109
↓ 2 callersFunctionget_balance
(blockchain: Arc<Mutex<BlockChain>>, account: &Account)
chain/src/blockchain.rs:338
↓ 2 callersMethodget_balance_by_block
Retrieve the eth balance for an accout at a given block. See https://eth.wiki/json-rpc/API#eth_getBalance # Examples ```ignore use types::block::Bl
web3/src/account.rs:52
↓ 2 callersMethodget_block_by_number
(&self, block_number: U64)
chain/src/blockchain.rs:52
↓ 2 callersMethodget_block_number
Retrieve the block number of the current block. See https://eth.wiki/json-rpc/API#eth_blockNumber # Examples ```ignore let web3 = web3::Web3::new("
web3/src/block.rs:39
↓ 2 callersMethodget_transaction_receipt
( &mut self, transaction_hash: H256, )
chain/src/blockchain.rs:267
↓ 2 callersMethodhash
(&mut self)
types/src/transaction.rs:75
↓ 2 callersFunctionload_contract
(bytes: &[u8])
runtime/src/contract.rs:24
↓ 2 callersMethodnew_block
( &mut self, transactions: Vec<Transaction>, state_trie: H256, )
chain/src/blockchain.rs:72
↓ 2 callersFunctionparams_2
(address: &'a String)
runtime/src/contract.rs:78
↓ 2 callersMethodparse_block_number
(&self, block_number: &str)
chain/src/blockchain.rs:62
↓ 2 callersFunctionparse_params
TODO(ddimaria): remove unwrap
runtime/src/contract.rs:44
↓ 2 callersMethodprocess_transactions
(&mut self)
chain/src/blockchain.rs:118
↓ 2 callersFunctionrecover_address
Recover the address of the public key using a recoverable signature and signed message ```rust use utils::crypto::{keypair, public_key_address, recov
utils/src/crypto.rs:233
↓ 2 callersMethodsend
Create a new message call transaction or deploy a contract. See https://eth.wiki/json-rpc/API#eth_sendTransaction # Examples ```ignore use types::t
web3/src/transaction.rs:44
↓ 2 callersMethodsend_raw
Send a raw transaction See https://eth.wiki/json-rpc/API#eth_sendrawtransaction # Examples ```ignore use types::transaction::TransactionRequest; l
web3/src/transaction.rs:78
↓ 2 callersMethodsend_raw_transaction
(&mut self, transaction: Bytes)
chain/src/blockchain.rs:106
↓ 2 callersFunctionsend_transaction
()
web3/src/transaction.rs:159
↓ 2 callersMethodsend_transaction
add to the transaction mempool
chain/src/transaction.rs:23
↓ 2 callersFunctionserve
jsonrpsee requires static lifetimes for state
chain/src/server.rs:26
↓ 2 callersMethodsign_transaction
( &self, transaction: Transaction, key: SecretKey, )
web3/src/account.rs:65
↓ 2 callersFunctionto_address
Convert a public key into an address using the last 20 bytes of the hash ```rust use utils::crypto::{keypair, public_key_address}; let (private_key,
utils/src/crypto.rs:96
↓ 2 callersFunctiontransaction
()
web3/src/transaction.rs:135
↓ 2 callersMethodupdate_nonce
TODO(ddimaria): remove
chain/src/account.rs:90
↓ 1 callersMethodadd_account_balance
(&mut self, key: &Account, amount: U256)
chain/src/account.rs:69
↓ 1 callersMethodadd_contract_account
(&mut self, key: &Account, data: Bytes)
chain/src/account.rs:45
↓ 1 callersMethodadd_empty_account
Add an account with default account data. Skip if the account already exists.
chain/src/account.rs:36
↓ 1 callersMethodblock_hash
(&self)
types/src/block.rs:102
↓ 1 callersMethodcode
Get the contract code for an address See https://eth.wiki/json-rpc/API#eth_getCode # Examples ```ignore let web3 = web3::Web3::new("http://127.0.0.
web3/src/contract.rs:70
↓ 1 callersFunctioncontract_functions
for debugging exportable functions
runtime/src/contract.rs:53
↓ 1 callersMethoddeploy
Deploy a contract to the chain. # Examples ```ignore let web3 = web3::Web3::new("http://127.0.0.1:8545").unwrap(); let account = web3.get_all_accoun
web3/src/contract.rs:32
↓ 1 callersFunctioneth_block_number
(module: &mut RpcModule<Context>)
chain/src/method.rs:18
↓ 1 callersFunctioneth_get_balance_by_block
(module: &mut RpcModule<Context>)
chain/src/method.rs:83
↓ 1 callersFunctioneth_get_block_by_number
(module: &mut RpcModule<Context>)
chain/src/method.rs:32
↓ 1 callersFunctioneth_get_code
(module: &mut RpcModule<Context>)
chain/src/method.rs:166
↓ 1 callersFunctioneth_get_transaction_count
(module: &mut RpcModule<Context>)
chain/src/method.rs:66
↓ 1 callersFunctioneth_get_transaction_receipt
(module: &mut RpcModule<Context>)
chain/src/method.rs:147
↓ 1 callersFunctioneth_send_raw_transaction
(module: &mut RpcModule<Context>)
chain/src/method.rs:128
↓ 1 callersFunctioneth_send_transaction
(module: &mut RpcModule<Context>)
chain/src/method.rs:110
↓ 1 callersFunctionfunction_call_transaction
(contract_account: Account, data: Bytes)
web3/src/transaction.rs:147
↓ 1 callersMethodget_balance
Retrieve the eth balance for an accout at the current block. See https://eth.wiki/json-rpc/API#eth_getBalance # Examples ```ignore let web3 = web3:
web3/src/account.rs:33
↓ 1 callersMethodget_block
Retrieve the block information using the block number. See https://eth.wiki/json-rpc/API#eth_getBlockByNumber # Examples ```ignore let web3 = web3:
web3/src/block.rs:58
↓ 1 callersFunctionget_contract
()
web3/src/helpers.rs:28
↓ 1 callersFunctionget_private_key
()
chain/src/keys.rs:35
↓ 1 callersFunctionget_public_key
()
chain/src/keys.rs:40
↓ 1 callersMethodget_transaction_count
Retrieve the eth balance for an accout at a given block. See https://eth.wiki/json-rpc/API#eth_getBalance # Examples ```ignore let account = web3.g
web3/src/account.rs:87
↓ 1 callersFunctionhex_to_u64
Convert a hexadecimal number into a U64, error on conversion failure
types/src/helpers.rs:13
↓ 1 callersMethodkind
(self)
types/src/transaction.rs:87
↓ 1 callersFunctionnew_blockchain
()
chain/src/blockchain.rs:293
↓ 1 callersFunctionprivate_key_address
Convert a private key into an address using the last 20 bytes of the hash ```rust use utils::crypto::{keypair, private_key_address}; let (private_ke
utils/src/crypto.rs:121
↓ 1 callersMethodprocess_transaction
TODO(ddimaria): handle TransactionKind::ContractExecution
chain/src/blockchain.rs:208
↓ 1 callersFunctionprocess_transactions
(blockchain: Arc<Mutex<BlockChain>>)
chain/src/blockchain.rs:316
↓ 1 callersFunctionrlp_encode
Encode items in a RlpStream The RlP crate panics if stream.out() is invoked when the stream hasn't consumed all list items (`list_size`).
utils/src/crypto.rs:248
↓ 1 callersFunctionroot_hash
()
types/src/transaction.rs:307
↓ 1 callersFunctionsign
Sign a message with a private key ```rust use utils::crypto::{keypair, sign}; let (private_key, public_key) = keypair(); let message = b"The message
utils/src/crypto.rs:152
↓ 1 callersMethodsubtract_account_balance
(&mut self, key: &Account, amount: U256)
chain/src/account.rs:75
↓ 1 callersMethodtransfer
(&mut self, from: &Account, to: &Account, amount: U256)
chain/src/account.rs:82
↓ 1 callersMethodtry_into
(self)
types/src/transaction.rs:195
↓ 1 callersMethodupdate_state_trie
(&mut self, hash: H256)
chain/src/world_state.rs:15
Method_destroy
(database_name: Option<&str>)
chain/src/storage.rs:68
Method_get_all_keys
(&self)
chain/src/storage.rs:57
Method_is_contract
(&self)
types/src/account.rs:35
Functionassert_vec_contains
(vec_1: Vec<T>, vec_2: Vec<T>)
chain/src/helpers.rs:97
Functionclient
()
chain/src/helpers.rs:64
next →1–100 of 184, ranked by callers