Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Concordium/concordium-rust-smart-contracts
/ functions
Functions
1,394 in github.com/Concordium/concordium-rust-smart-contracts
⨍
Functions
1,394
◇
Types & classes
566
↓ 6 callers
Function
f
()
concordium-std/tests/dbg/success.rs:4
↓ 6 callers
Method
get
Get a reference to the value corresponding to the key.
concordium-std/src/state_btree.rs:171
↓ 6 callers
Method
get_key
(&self)
concordium-std/src/impls.rs:262
↓ 6 callers
Method
init_origin
(&self)
concordium-std/src/impls.rs:2893
↓ 6 callers
Function
initialize_contract_with_alice_tokens
Helper function that sets up the contract with two types of tokens minted to Alice. She has 400 of `TOKEN_0` and 1 of `TOKEN_1`.
examples/cis2-multi-royalties/tests/tests.rs:605
↓ 6 callers
Method
invoke_contract_read_only
( &self, host: &impl HasHost<State>, method: EntrypointName, parameter: &P,
concordium-cis2/src/cis2_client.rs:223
↓ 6 callers
Method
print_emitted_events
Print (to stderr) all the events generated by `concordium_dbg!` statements.
contract-testing/src/types.rs:729
↓ 6 callers
Function
receive_context
()
concordium-std/src/test_env.rs:135
↓ 6 callers
Function
tokenize_slice
Tokenizes a slice of bytes.
concordium-std-derive/src/lib.rs:16
↓ 6 callers
Method
upgrade
(&mut self, module: ModuleReference)
concordium-std/src/impls.rs:2624
↓ 6 callers
Function
view_item_state
Get the `ItemState` at index 0.
examples/sponsored-tx-enabled-auction/tests/tests.rs:729
↓ 5 callers
Function
calculate_message_hash_from_bytes
Calculates the message hash from the message bytes. It prepends the message bytes with a context string consisting of the `genesis_hash` and this cont
examples/cis5-smart-contract-wallet/src/lib.rs:630
↓ 5 callers
Function
create_product
Helper to create an instance of the product smart contract.
examples/factory/tests/tests.rs:183
↓ 5 callers
Method
delete_prefix
(&mut self, prefix: &[u8])
concordium-std/src/impls.rs:853
↓ 5 callers
Function
deserialize_update_events
Deserialize the events from an update.
examples/cis2-wccd/tests/tests.rs:830
↓ 5 callers
Function
from_interpreter_energy
Convert [`InterpreterEnergy`] to [`Energy`] by dividing by `1000`.
contract-testing/src/impls.rs:2187
↓ 5 callers
Function
get_ccd_balance_from_alice_and_bob_and_service_fee_recipient
Get the CCD balances for Alice, Bob, and the service_fee_recipient.
examples/cis5-smart-contract-wallet/tests/tests.rs:868
↓ 5 callers
Function
get_parameter_section
( _i: u32, _param_bytes: *mut u8, _length: u32, _offset: u32, )
concordium-std/src/prims.rs:383
↓ 5 callers
Function
get_parameter_size
(_i: u32)
concordium-std/src/prims.rs:379
↓ 5 callers
Function
initialize_chain
Helper function to set up the chain with initial accounts, the module deployed.
examples/factory/tests/tests.rs:148
↓ 5 callers
Function
initialize_chain_and_contract
A helper method for initializing the chain and contract.
examples/bump-alloc-tests/tests/tests.rs:141
↓ 5 callers
Function
initialize_contract_with_alice_tokens
Helper function that sets up the contract with two tokens minted to Alice, `TOKEN_0` and `TOKEN_1`.
templates/cis2-nft/tests/tests.rs:290
↓ 5 callers
Function
initialize_contract_with_alice_tokens
Helper function that sets up the contract with two tokens minted to Alice, `TOKEN_0` and `TOKEN_1`.
examples/cis2-nft/tests/tests.rs:382
↓ 5 callers
Method
is_at_min
(&self)
concordium-std/src/state_btree.rs:1255
↓ 5 callers
Method
key_with_map_prefix
Serializes the key and prepends the unique map prefix to it.
concordium-std/src/impls.rs:1080
↓ 5 callers
Method
module_deploy_v1_debug
Like [`module_deploy_v1`](Self::module_deploy_v1) except that optionally debugging output may be allowed in the module.
contract-testing/src/impls.rs:520
↓ 5 callers
Method
new_state_container
(&mut self)
concordium-std/src/impls.rs:2409
↓ 5 callers
Method
next
(&mut self)
contract-testing/src/types.rs:866
↓ 5 callers
Method
register_credential
( &mut self, credential_info: &CredentialInfo, state_builder: &mut StateBuilder<S>,
examples/credential-registry/src/lib.rs:220
↓ 5 callers
Function
setup_chain_and_contract
A helper method for setting up: - The chain, - The two accounts `ACC_ADDR_OWNER` and `ACC_ADDR_OTHER`, both with `ACC_INITIAL_BALANCE` CCD, - The depl
examples/piggy-bank/part2/tests/tests.rs:18
↓ 5 callers
Method
subtract_amount
Subtract an [`Amount`] from [`Self`].
contract-testing/src/invocation/impls.rs:1827
↓ 5 callers
Method
view_credential_status
( &self, now: Timestamp, credential_id: CredentialHolderId, )
examples/credential-registry/src/lib.rs:209
↓ 5 callers
Method
with_client
Execute an async task with the [`sdk::v2::Client`]. If a block is provided, it will be used for the query. Otherwise, it will use the default query b
contract-testing/src/impls.rs:1915
↓ 4 callers
Method
account
Returns an immutable reference to an [`Account`].
contract-testing/src/impls.rs:1570
↓ 4 callers
Function
account_address
()
concordium-std/src/test_env.rs:143
↓ 4 callers
Method
add_amount
Add an [`Amount`] from [`Self`].
contract-testing/src/invocation/impls.rs:1841
↓ 4 callers
Function
alice_deposits_ccd
Alice deposits CCD into the smart contract wallet.
examples/cis5-smart-contract-wallet/tests/tests.rs:986
↓ 4 callers
Method
as_key
Construct the key for the node in the key-value store from the node ID.
concordium-std/src/state_btree.rs:1193
↓ 4 callers
Function
assert_contract_paused_error
Check that the returned error is `ContractPaused`.
examples/cis2-multi/tests/tests.rs:1408
↓ 4 callers
Function
assert_contract_paused_error
Check that the returned error is `ContractPaused`.
examples/cis2-wccd/tests/tests.rs:838
↓ 4 callers
Method
block_time
Configure the block time. By default the block time is `0`. This cannot be used in combination with [`ChainBuilder::block_time_from_external`]. # E
contract-testing/src/impls.rs:290
↓ 4 callers
Method
change_contract_balance
Changes the contract balance in the topmost checkpoint on the changeset. If contract isn't already present in the changeset, it is added. Returns an
contract-testing/src/invocation/impls.rs:1133
↓ 4 callers
Function
check_event
Check that the voting event is produced and that it is correct.
examples/voting/tests/tests.rs:311
↓ 4 callers
Method
check_invariants
Check invariants, producing an error if any of them are violated. See [`InvariantViolation`] for the of list invariants being checked. Should only be
concordium-std/src/state_btree.rs:1365
↓ 4 callers
Method
debug_events
(&self)
contract-testing/src/types.rs:830
↓ 4 callers
Method
delete
(self)
concordium-std/src/impls.rs:3142
↓ 4 callers
Function
deserialize_update_events
Deserialize the events from an update.
examples/nametoken/tests/tests.rs:842
↓ 4 callers
Method
effective_trace_elements
Get an iterator over references of all the [`ContractTraceElement`]s that have *not* been rolled back. The trace elements returned here corresponds t
contract-testing/src/types.rs:552
↓ 4 callers
Method
first
Returns a reference to the first key in the set, if any. This key is always the minimum of all keys in the set.
concordium-std/src/state_btree.rs:667
↓ 4 callers
Function
get_balances
Get the balances for Alice and Bob.
examples/cis2-wccd/tests/tests.rs:795
↓ 4 callers
Function
get_balances
Get the `TOKEN_1` balances for Alice and Bob.
examples/cis3-nft-sponsored-txs/tests/tests.rs:1004
↓ 4 callers
Function
get_canonical_address
Convert the address into its canonical account address (in case it is an account address). Account addresses on Concordium have account aliases. We ca
examples/cis2-multi/src/lib.rs:862
↓ 4 callers
Function
get_cis2_token_balances_from_alice_and_bob_and_service_fee_recipient
Get the token balances for Alice, Bob, and the service_fee_recipient.
examples/cis5-smart-contract-wallet/tests/tests.rs:819
↓ 4 callers
Function
get_credential_status
Helper for looking up the status of a credential.
templates/credential-registry/tests/tests.rs:283
↓ 4 callers
Function
get_credential_status
Helper for looking up the status of a credential.
examples/credential-registry/tests/tests.rs:308
↓ 4 callers
Function
get_policy_section
(_policy_bytes: *mut u8, _length: u32, _offset: u32)
concordium-std/src/prims.rs:392
↓ 4 callers
Function
init
Initialize chain and contract. Also creates the following accounts: - `ALICE`: Account with 1000 CCD. - `BOB`: Account with 1000 CCD. The contract i
examples/voting/tests/tests.rs:213
↓ 4 callers
Function
initialize_chain
Initialize the chain, create two accounts (ACC_0, ACC_1) and deploy the module.
examples/icecream/tests/tests.rs:227
↓ 4 callers
Function
initialize_chain_and_auction
Setup auction and chain.
examples/sponsored-tx-enabled-auction/tests/tests.rs:789
↓ 4 callers
Function
initialize_contract_with_alice_tokens
Helper function that sets up the contract with two types of tokens minted to Alice. She has 400 of `TOKEN_0` and 400 of `TOKEN_2`.
examples/cis2-dynamic-nft/tests/tests.rs:295
↓ 4 callers
Function
initialize_icecream
Initialize the icecream contract with the given weather contract address.
examples/icecream/tests/tests.rs:203
↓ 4 callers
Function
invoke_contract_construct_parameter
A helper that constructs the parameter to invoke_contract.
concordium-std/src/impls.rs:2252
↓ 4 callers
Function
issuer_metadata
()
templates/credential-registry/src/lib.rs:1827
↓ 4 callers
Method
last
Returns a reference to the last key in the set, if any. This key is always the maximum of all keys in the set.
concordium-std/src/state_btree.rs:682
↓ 4 callers
Method
micro_ccd_per_euro
Configure the 'microCCD per euro' exchange rate. By default the rate is `50000 / 1`. This cannot be used together with [`ChainBuilder::micro_ccd_per
contract-testing/src/impls.rs:208
↓ 4 callers
Function
operator_of
Check if Bob is an operator of Alice.
examples/cis3-nft-sponsored-txs/tests/tests.rs:1040
↓ 4 callers
Function
parse_bytes_exact
Parses a hex string as a little endian array of bytes of length `N`.
concordium-cis2/src/lib.rs:627
↓ 4 callers
Function
parse_call_response_code
Decode the the response code. The response is encoded as follows. - Success if the last 5 bytes are all zero: - the first 3 bytes encodes the return
concordium-std/src/impls.rs:2006
↓ 4 callers
Function
permit
Execute a permit function invoke
examples/cis2-multi/tests/tests.rs:1434
↓ 4 callers
Method
print_debug
Print the desired level of debug information that was recorded. This function is meant to be used in a method-chaining style.
contract-testing/src/types.rs:662
↓ 4 callers
Method
register_revocation_key
(&mut self, pk: PublicKeyEd25519)
examples/credential-registry/src/lib.rs:292
↓ 4 callers
Function
setup
Setup chain and contract.
templates/credential-registry/tests/tests.rs:308
↓ 4 callers
Function
setup
Setup chain and contract.
examples/credential-registry/tests/tests.rs:335
↓ 4 callers
Function
state_entry_read
( _entry: u64, _start: *mut u8, _length: u32, _offset: u32, )
concordium-std/src/prims.rs:441
↓ 4 callers
Method
truncate
(&mut self, new_size: u32)
concordium-std/src/impls.rs:254
↓ 4 callers
Method
update_energy
Update the `remaining_energy` field by converting the input to [`InterpreterEnergy`] and then [`Energy`].
contract-testing/src/invocation/impls.rs:1489
↓ 4 callers
Function
validate_signature_and_increase_nonce
Validates the message signature and increases the public key nonce. It rejects if: - the message is expired. - the signature is invalid. - the nonce
examples/cis5-smart-contract-wallet/src/lib.rs:655
↓ 4 callers
Method
verify_ed25519_signature
( &self, public_key: PublicKeyEd25519, signature: SignatureEd25519, message: &
concordium-std/src/impls.rs:2813
↓ 3 callers
Method
account_mut
Returns a mutable reference to [`Account`].
contract-testing/src/impls.rs:1577
↓ 3 callers
Method
account_public_keys
(&self, address: AccountAddress)
concordium-std/src/impls.rs:2629
↓ 3 callers
Method
add
(self, rhs: Self)
concordium-cis2/src/lib.rs:862
↓ 3 callers
Function
alice_deposits_cis2_tokens
Alice deposits cis2 tokens into the smart contract wallet.
examples/cis5-smart-contract-wallet/tests/tests.rs:899
↓ 3 callers
Function
assert_counter_state
Looks up in the root of the state trie and compares the value with the `expected`.
contract-testing/tests/counter.rs:94
↓ 3 callers
Method
check_account_signature
( &self, address: AccountAddress, signatures: &AccountSignatures, data: &[u8],
concordium-std/src/impls.rs:2633
↓ 3 callers
Method
clear
Clears the map, removing all key-value pairs. This also includes values pointed at, if `V`, for example, is a [StateBox](crate::StateBox). **If applic
concordium-std/src/state_btree.rs:295
↓ 3 callers
Method
contains
Returns `true` if the set contains an element equal to the key.
concordium-std/src/state_btree.rs:470
↓ 3 callers
Method
contract_balance
Looks up the contract balance from the topmost checkpoint on the changeset. Or, alternatively, from persistence.
contract-testing/src/invocation/impls.rs:1235
↓ 3 callers
Function
contract_events_from_logs
A helper function for converting `[v0::Logs]` into [`Vec<ContractEvent>`].
contract-testing/src/impls.rs:2255
↓ 3 callers
Method
create_node
Internal function for constructing a node. It will increment the next node ID and create an entry in the smart contract key-value store.
concordium-std/src/state_btree.rs:954
↓ 3 callers
Function
credential_entry
A helper that returns a credential that is not revoked, cannot expire and is immediately activated. It is also possible to revoke it by the holder.
templates/credential-registry/src/lib.rs:1813
↓ 3 callers
Method
delete_entry
(&mut self, entry: Self::EntryType)
concordium-std/src/impls.rs:842
↓ 3 callers
Method
delete_node
Internal function for deleting a node, removing the entry in the smart contract key-value store. Traps if no node was present.
concordium-std/src/state_btree.rs:976
↓ 3 callers
Method
energy_used
The energy used so far in this transaction.
contract-testing/src/invocation/impls.rs:1611
↓ 3 callers
Method
euro_per_energy
Configure the 'euro per energy' exchange rate. By default the rate is `1 / 50000`. This cannot be used together with [`ChainBuilder::euro_per_energy
contract-testing/src/impls.rs:226
↓ 3 callers
Method
external_node_connection_mut
Try to get a mutable reference to [`ExternalNodeConnection`] or return an error. The connection is only available, if the [`Chain`] has been set up w
contract-testing/src/impls.rs:1853
↓ 3 callers
Method
get_event
Gets event number `i` in the smart contract state. Returns None if `i` is an invalid index.
concordium-std/src/test_env.rs:58
↓ 3 callers
Method
get_nonce
A function to get the next nonce of the wallet account.
templates/default/deploy-scripts/src/deployer.rs:327
↓ 3 callers
Method
get_status
Compute the credential status based on validity dates and the revocation flag. If a VC is revoked the status will be `Revoked` regardless the validity
examples/credential-registry/src/lib.rs:70
↓ 3 callers
Function
init
Setup chain and contract.
examples/eSealing/tests/tests.rs:167
↓ 3 callers
Function
initialize_weather
Initialize the weather contract with the given weather.
examples/icecream/tests/tests.rs:181
← previous
next →
101–200 of 1,394, ranked by callers