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
↓ 3 callers
Method
insert_raw
Sets the value of the entry with the [`VacantEntryRaw`’s](Self) key.
concordium-std/src/impls.rs:466
↓ 3 callers
Function
is_blacklisted
Check if Alice and Bob are blacklisted.
examples/cis2-multi/tests/tests.rs:1539
↓ 3 callers
Method
is_zero
Whether the [`Self`] is zero (either `+0` or `-0`).
contract-testing/src/invocation/impls.rs:1863
↓ 3 callers
Method
key_with_set_prefix
(&self, key: &T)
concordium-std/src/impls.rs:1382
↓ 3 callers
Function
lookup_module_cost
Calculate the energy for looking up a [`ContractModule`].
contract-testing/src/impls.rs:2192
↓ 3 callers
Method
merge
Move key at `index` from the node to the lower child and then merges this child with the content of its larger sibling, deleting the sibling. Assumes
concordium-std/src/state_btree.rs:935
↓ 3 callers
Method
or_default
(self)
concordium-std/src/impls.rs:804
↓ 3 callers
Method
prepare_child_for_key_removal
Internal function for key rotation, preparing a node for deleting a key. Returns the now prepared child at `index`. Assumes: - The provided `node` is
concordium-std/src/state_btree.rs:825
↓ 3 callers
Function
register_credential
Helper that registers a credential and returns the update type.
templates/credential-registry/tests/tests.rs:202
↓ 3 callers
Function
register_credential
Helper that registers a credential and returns the update type.
examples/credential-registry/tests/tests.rs:227
↓ 3 callers
Method
replace
(&mut self, new_val: T)
concordium-std/src/impls.rs:1532
↓ 3 callers
Method
restore_credential
( &mut self, now: Timestamp, credential_id: CredentialHolderId, )
examples/credential-registry/src/lib.rs:271
↓ 3 callers
Method
run_interpreter
Run the interpreter with the provided function and the `self.remaining_energy`. This function ensures that the energy calculations is handled as in t
contract-testing/src/invocation/impls.rs:1498
↓ 3 callers
Function
setup_chain_and_contract
()
examples/smart-contract-upgrade/contract-version1/tests/tests.rs:33
↓ 3 callers
Method
store_value
(&mut self)
concordium-std/src/impls.rs:685
↓ 3 callers
Function
to_interpreter_energy
Convert [`Energy`] to [`InterpreterEnergy`] by multiplying by `1000`.
contract-testing/src/impls.rs:2182
↓ 3 callers
Method
transfer_ccd
Updates the state with a transfer of CCD amount and logs an `TransferCcd` event. Results in an error if the from public key has insufficient balance t
examples/cis5-smart-contract-wallet/src/lib.rs:257
↓ 3 callers
Method
transfer_cis2_tokens
Updates the state with a transfer of some tokens and logs an `TransferCis2Tokens` event. Results in an error if the token contract, or the token id do
examples/cis5-smart-contract-wallet/src/lib.rs:300
↓ 3 callers
Method
update
Update the existing value with the given function.
concordium-std/src/impls.rs:1278
↓ 3 callers
Function
update_data
Update the data of a name using the Alice account. Returns the result.
examples/nametoken/tests/tests.rs:746
↓ 3 callers
Function
view_product
Helper to view the state of a product contract.
examples/factory/tests/tests.rs:226
↓ 3 callers
Method
view_revocation_keys
(&self)
examples/credential-registry/src/lib.rs:300
↓ 2 callers
Method
account_exists
Check whether an [`Account`] exists.
contract-testing/src/impls.rs:1587
↓ 2 callers
Function
add_bob_the_operator
Helper function that adds BOB as an operator for ALICE. Returns the `ContractInvokeSuccess` for the update.
examples/nametoken/tests/tests.rs:890
↓ 2 callers
Method
add_delta
Add two [`Self`] to create a new one.
contract-testing/src/invocation/impls.rs:1855
↓ 2 callers
Method
address_exists
Check whether an object with the [`Address`] exists. That is, if it is an account address, whether the account exists, and if it is a contract addres
contract-testing/src/impls.rs:1600
↓ 2 callers
Function
assert_success
Helper for asserting the success.
contract-testing/tests/self_balance.rs:129
↓ 2 callers
Function
authorize_with_signature
Performs authorization based on the signature and the public key.
templates/credential-registry/src/lib.rs:908
↓ 2 callers
Function
authorize_with_signature
Performs authorization based on the signature and the public key.
examples/credential-registry/src/lib.rs:915
↓ 2 callers
Function
build_token_metadata_url
Build a string from TOKEN_METADATA_BASE_URL appended with the token ID encoded as hex.
templates/cis2-nft/src/lib.rs:284
↓ 2 callers
Function
build_token_metadata_url
Build a string from TOKEN_METADATA_BASE_URL appended with the token ID encoded as hex.
examples/nametoken/src/lib.rs:514
↓ 2 callers
Function
build_token_metadata_url
Build a string from TOKEN_METADATA_BASE_URL appended with the token ID encoded as hex.
examples/cis2-multi-royalties/src/lib.rs:411
↓ 2 callers
Function
build_token_metadata_url
Build a string from TOKEN_METADATA_BASE_URL appended with the token ID encoded as hex.
examples/cis2-nft/src/lib.rs:299
↓ 2 callers
Function
burn
Internal `burn/permit` helper function. Invokes the `burn` function of the state. Logs a `Burn` event. The function assumes that the burn is authorize
examples/cis2-multi/src/lib.rs:1110
↓ 2 callers
Method
calculate_royalty_payments
( &mut self, params: CheckRoyaltyParams, )
examples/cis2-multi-royalties/src/lib.rs:386
↓ 2 callers
Method
change_account_balance
Changes the account balance in the topmost checkpoint on the changeset. If account isn't already present in the changeset, it is added. Returns an e
contract-testing/src/invocation/impls.rs:1182
↓ 2 callers
Function
check_account_signature_worker
( address: AccountAddress, signatures: &AccountSignatures, data: &[u8], )
concordium-std/src/impls.rs:2316
↓ 2 callers
Method
commit_state
(&mut self)
concordium-std/src/impls.rs:2665
↓ 2 callers
Method
contract_exists
Check whether a [`Contract`] exists.
contract-testing/src/impls.rs:1592
↓ 2 callers
Method
contract_invocation_process_response
( &self, result: InvokeResponse, trace_elements: Vec<DebugTraceElement>, energ
contract-testing/src/impls.rs:1035
↓ 2 callers
Method
contract_invocation_worker
Helper method that handles contract invocation. Preconditions: - `invoker` exists. - `sender` exists. - `invoker` has sufficient balance to pay for `
contract-testing/src/impls.rs:948
↓ 2 callers
Method
contract_module_reference
( &self, address: ContractAddress, )
concordium-std/src/impls.rs:2644
↓ 2 callers
Method
contract_name
Looks up the contract name from persistence. (Since the contract name cannot change, and new contracts cannot be deployed within contract invocations,
contract-testing/src/invocation/impls.rs:1265
↓ 2 callers
Method
contract_state
Get the contract state, either from the changeset or by thawing it from persistence. Preconditions: - Contract instance must exist.
contract-testing/src/invocation/impls.rs:1312
↓ 2 callers
Method
convert_to_init_error
Convert a [`ContractInitErrorKind`] to a [`ContractInitError`] by calculating the `energy_used` and `transaction_fee`.
contract-testing/src/impls.rs:1659
↓ 2 callers
Method
current_balance
Get the current balance by adding the original balance and the balance delta. Preconditions: - `balance_delta + original_balance` must be larger than
contract-testing/src/invocation/impls.rs:1899
↓ 2 callers
Function
debug_events_worker
Get an iterator over all the debug traces emitted by the execution.
contract-testing/src/types.rs:851
↓ 2 callers
Method
delete_iterator
(&mut self, iter: Self::IterType)
concordium-std/src/impls.rs:874
↓ 2 callers
Function
deploy_and_init
Helper for deploying and initializing the provided contract.
contract-testing/tests/self_balance.rs:92
↓ 2 callers
Function
deploy_and_init
Helper for deploying and initializing the `relaxed-restrictions.wasm` contract.
contract-testing/tests/relaxed_restrictions.rs:110
↓ 2 callers
Method
ensure_cached
If the value isn't cached, load the value from the state. Return a reference to the entry, and the value. Note that **if the value is modified, the en
concordium-std/src/impls.rs:1557
↓ 2 callers
Method
expect_report
(self, msg: &str)
concordium-std/src/impls.rs:3030
↓ 2 callers
Method
external_query_block
Configure the block to be used for all external queries. If this is not set, then the last final block will be queried during [`ChainBuilder::build`]
contract-testing/src/impls.rs:188
↓ 2 callers
Function
get_balances
Get the `TOKEN_ID` balance for Bob.
examples/cis5-smart-contract-wallet/tests/tests.rs:1062
↓ 2 callers
Function
get_credential_schema
()
templates/credential-registry/tests/tests.rs:187
↓ 2 callers
Function
get_credential_schema
()
examples/credential-registry/tests/tests.rs:212
↓ 2 callers
Function
get_liabilities
Compute liabilities from given settlements for a sender address
examples/offchain-transfers/src/lib.rs:247
↓ 2 callers
Function
get_receive_self_balance
()
concordium-std/src/prims.rs:479
↓ 2 callers
Method
get_token_state_medata_counter
Returns the current counter value which is using for indexing the vector of MetadataUrls
examples/cis2-dynamic-nft/src/lib.rs:264
↓ 2 callers
Function
get_with_inner
Return a reference to the value stored inside the [`StateBoxInner`], as well as a reference to the flag that indicates whether the value has been modi
concordium-std/src/impls.rs:1476
↓ 2 callers
Method
grant_role
Grant role to an address.
examples/cis2-multi/src/lib.rs:830
↓ 2 callers
Method
has_implementors
(&self, std_id: &StandardIdentifierOwned)
examples/credential-registry/src/lib.rs:316
↓ 2 callers
Method
higher
(&self, key: &K)
concordium-std/src/state_btree.rs:212
↓ 2 callers
Method
host_calls
Get an iterator over all host calls that have occurred, both in the remaining trace and in the rolled back part.
contract-testing/src/types.rs:738
↓ 2 callers
Function
initialize
Helper method for initializing the contract. Does the following: - Creates the [`Chain`] - Creates one account, `Alice` with `10_000` CCD as the init
templates/default/tests/tests.rs:60
↓ 2 callers
Function
initialize_chain_and_contract
Setup chain and contract. Also creates the two accounts, Alice and Bob. Alice is the owner of the contract.
examples/cis2-wccd/tests/tests.rs:739
↓ 2 callers
Method
insert_borrowed
Inserts the value with the given key. If a value already exists at the given key it is replaced and the old value is returned. This only borrows the k
concordium-std/src/impls.rs:955
↓ 2 callers
Method
insert_non_full
Internal function for inserting into a subtree. Assumes the given node is not full.
concordium-std/src/state_btree.rs:987
↓ 2 callers
Function
into_view_name_info
(name_info: &NameInfo)
examples/nametoken/src/lib.rs:552
↓ 2 callers
Method
invocation_out_of_energy_error
Construct a [`ContractInvokeErrorKind`] of the `OutOfEnergy` kind with the energy and transaction fee fields based on the `energy_reserved` parameter.
contract-testing/src/impls.rs:1641
↓ 2 callers
Function
invoke_transfer_worker
Helper factoring out the common behaviour of invoke_transfer for the two extern hosts below.
concordium-std/src/impls.rs:2226
↓ 2 callers
Method
invoker
(&self)
concordium-std/src/impls.rs:2914
↓ 2 callers
Function
is_debug_enabled
Return whether execution is running under `cargo concordium test` with debugging enabled.
contract-testing/src/impls.rs:2388
↓ 2 callers
Method
is_empty
Return `true` if the map contains no elements.
concordium-std/src/impls.rs:1003
↓ 2 callers
Method
is_full
(&self)
concordium-std/src/state_btree.rs:1243
↓ 2 callers
Method
load_value
Load the value referenced by the entry from the chain data.
concordium-std/src/impls.rs:1256
↓ 2 callers
Function
log_event
(_start: *const u8, _length: u32)
concordium-std/src/prims.rs:396
↓ 2 callers
Method
lower
(&self, key: &K)
concordium-std/src/state_btree.rs:232
↓ 2 callers
Method
message_bytes
(&self, bytes: &mut Vec<u8>)
templates/credential-registry/src/lib.rs:811
↓ 2 callers
Method
message_bytes
(&self, bytes: &mut Vec<u8>)
examples/credential-registry/src/lib.rs:814
↓ 2 callers
Function
mint
Internal `mint/permit` helper function. Invokes the `mint` function of the state. Logs a `Mint` event. The function assumes that the mint is authorize
examples/cis2-multi/src/lib.rs:1000
↓ 2 callers
Method
modification_index
Returns the modification index for a contract. It looks it up in the changeset, and if it isn't there, it will return `0`.
contract-testing/src/invocation/impls.rs:1469
↓ 2 callers
Method
modify
(&mut self, f: F)
concordium-std/src/impls.rs:655
↓ 2 callers
Method
named_entrypoint
(&self)
concordium-std/src/impls.rs:2975
↓ 2 callers
Function
operator_of
Check if Bob is an operator of Alice.
examples/cis2-multi/tests/tests.rs:1509
↓ 2 callers
Function
parse_input
Parses the input tokens of a proc macro and returns the given error message on parse error.
concordium-std-derive/src/lib.rs:27
↓ 2 callers
Function
parse_upgrade_response_code
(code: u64)
concordium-std/src/impls.rs:1976
↓ 2 callers
Function
query_account_balance_worker
Helper factoring out the common behaviour of account_balance for the two extern hosts below.
concordium-std/src/impls.rs:2270
↓ 2 callers
Function
query_account_public_keys_worker
Helper factoring out the common behaviour of `account_public_keys` for the two extern hosts below.
concordium-std/src/impls.rs:2308
↓ 2 callers
Function
query_contract_balance_worker
Helper factoring out the common behaviour of contract_balance for the two extern hosts below.
concordium-std/src/impls.rs:2284
↓ 2 callers
Function
query_contract_module_reference_worker
( address: &ContractAddress, )
concordium-std/src/impls.rs:2341
↓ 2 callers
Function
query_contract_name_worker
(address: &ContractAddress)
concordium-std/src/impls.rs:2359
↓ 2 callers
Function
query_exchange_rates_worker
Helper factoring out the common behaviour of exchange_rates for the two extern hosts below.
concordium-std/src/impls.rs:2299
↓ 2 callers
Method
read_u64
Read a `u64` in little-endian format. This is optimized to not initialize a dummy value before calling an external function.
concordium-std/src/impls.rs:355
↓ 2 callers
Method
remove_revocation_key
(&mut self, pk: PublicKeyEd25519)
examples/credential-registry/src/lib.rs:307
↓ 2 callers
Function
report_error
(message: &str, filename: &str, line: u32, column: u32)
concordium-std/src/test_infrastructure.rs:8
↓ 2 callers
Method
resize
(&mut self, new_size: u32)
concordium-std/src/impls.rs:266
↓ 2 callers
Function
revoke_credential
Helper that revokes the credential.
templates/credential-registry/tests/tests.rs:240
↓ 2 callers
Function
revoke_credential
Helper that revokes the credential.
examples/credential-registry/tests/tests.rs:265
↓ 2 callers
Method
save_state_changes
Saves a mutable state for a contract in the changeset. If the contract already has an entry in the changeset, the old state will be replaced. Otherwi
contract-testing/src/invocation/impls.rs:1385
← previous
next →
201–300 of 1,394, ranked by callers