MCPcopy Create free account

hub / github.com/Concordium/concordium-rust-smart-contracts / functions

Functions1,394 in github.com/Concordium/concordium-rust-smart-contracts

↓ 333 callersMethodget
(self)
concordium-std/src/impls.rs:513
↓ 231 callersMethodcontract_update
Update a contract by calling one of its entrypoints. If successful, all changes will be saved. Parameters: - `signer`: a [`Signer`] with a number of
contract-testing/src/impls.rs:1086
↓ 192 callersMethodparameter_cursor
(&self)
concordium-std/src/impls.rs:1900
↓ 147 callersMethodinsert
Sets the value of the entry with the `VacantEntryRaw`’s key. This differs from [`insert_raw`](Self::insert_raw) in that it automatically serializes th
concordium-std/src/impls.rs:479
↓ 117 callersMethodstate
(&self)
concordium-std/src/impls.rs:2657
↓ 116 callersMethodunwrap_abort
(self)
concordium-std/src/impls.rs:3019
↓ 110 callersMethodentry
Get an entry for the given key.
concordium-std/src/impls.rs:988
↓ 109 callersMethodlen
(&self)
concordium-std/src/state_btree.rs:271
↓ 108 callersMethoditer
Get an iterator over the key-value pairs of the map. The iterator returns values in increasing order of keys, where keys are ordered lexicographically
concordium-std/src/impls.rs:1112
↓ 103 callersMethodparse_return_value
Try to parse the return value into a type that implements [`Deserial`]. Ensures that all bytes of the return value are read.
contract-testing/src/types.rs:621
↓ 98 callersMethodcreate_account
Create an account. If an account with a matching address already exists this method will replace it and return the old account. Note that if the fir
contract-testing/src/impls.rs:1460
↓ 94 callersMethodstate_mut
(&mut self)
concordium-std/src/impls.rs:2661
↓ 87 callersMethodlog
Log a serializable event by serializing it with a supplied serializer. Note that the serialized event must be no larger than `512` bytes.
concordium-std/src/traits.rs:623
↓ 86 callersMethodcontract_invoke
Invoke a contract by calling an entrypoint. Similar to [`Chain::contract_update`](Self::contract_update) except that all changes are discarded afterw
contract-testing/src/impls.rs:1236
↓ 78 callersMethodcontract_init
Initialize a contract. Parameters: - `signer`: the signer with a number of keys, which affects the cost. - `sender`: The account paying for the trans
contract-testing/src/impls.rs:659
↓ 73 callersMethodmodule_deploy_v1
Deploy a smart contract module using the same validation rules as enforced by the node. The `WasmModule` can be loaded from disk with either [`module
contract-testing/src/impls.rs:509
↓ 58 callersMethodnew_map
Create a new empty [`StateMap`].
concordium-std/src/impls.rs:2414
↓ 56 callersMethodsender
(&self)
concordium-std/src/impls.rs:2939
↓ 54 callersMethodinsert
(&mut self, key: K, value: V)
concordium-std/src/state_btree.rs:123
↓ 45 callersFunctionmodule_load_v1_raw
Load a raw wasm module, i.e. one **without** the prefix of 4 version bytes and 4 module length bytes. The module still has to be a valid V1 smart cont
contract-testing/src/impls.rs:2040
↓ 45 callersFunctionwasm_test_file
Get the path to a wasm test file in wasm test folder. This is simply prepends the test folder path to the file name: `WASM_TEST_FOLDER/{file_name}`.
contract-testing/tests/helpers/mod.rs:23
↓ 43 callersMethodevents
Extract all the events logged by all the contracts in the invocation. The events are returned in the order that they are emitted, and are paired with
contract-testing/src/types.rs:515
↓ 41 callersMethodget_mut
(&mut self)
concordium-std/src/impls.rs:522
↓ 34 callersMethodor_insert_with
Ensures a value is in the entry by inserting the result of the default function if empty.
concordium-std/src/impls.rs:750
↓ 33 callersMethodcontains
Returns `true` if the set contains a value.
concordium-std/src/impls.rs:1349
↓ 33 callersFunctionmodule_load_v1
Load a v1 wasm module as it is output from `cargo concordium build`, i.e. **including** the prefix of 4 version bytes and 4 module length bytes.
contract-testing/src/impls.rs:2075
↓ 30 callersMethodstate_and_builder
(&mut self)
concordium-std/src/impls.rs:2687
↓ 27 callersMethodlen
(&self)
concordium-std/src/impls.rs:1807
↓ 27 callersMethodnew_set
Create a new empty [`StateSet`].
concordium-std/src/impls.rs:2420
↓ 27 callersMethodoccupied_or
(self, e: E)
concordium-std/src/impls.rs:722
↓ 26 callersMethodserial
(&self, out: &mut W)
concordium-std/src/impls.rs:1319
↓ 25 callersMethodmetadata
(&self)
concordium-std/src/impls.rs:1883
↓ 22 callersFunctiondeserial
()
concordium-std/tests/derives.rs:25
↓ 22 callersMethodis_leaf
(&self)
concordium-std/src/state_btree.rs:1249
↓ 22 callersMethodslot_time
(&self)
concordium-std/src/impls.rs:1725
↓ 21 callersMethodget_node
Internal function for looking up a node in the tree. This assumes the node is present and traps if this is not the case.
concordium-std/src/state_btree.rs:1058
↓ 21 callersMethodremove
Remove a key from the map. This also deletes the value in the state.
concordium-std/src/impls.rs:1070
↓ 21 callersFunctiontrap
()
concordium-std/src/lib.rs:414
↓ 20 callersMethodas_ref
(&self)
concordium-cis2/src/lib.rs:1429
↓ 18 callersFunctioninitialize_contract_with_alice_tokens
Helper function that sets up the contract with two types of tokens minted to Alice. She has 100 of `TOKEN_0` and 100 of `TOKEN_1`. Alice's account is
examples/cis2-multi/tests/tests.rs:1606
↓ 18 callersMethodlookup_entry
(&self, key: &[u8])
concordium-std/src/impls.rs:831
↓ 17 callersMethodremove
Remove a key from the map. This also deletes the value in the state.
concordium-std/src/state_btree.rs:160
↓ 16 callersFunctiondeserial_with_state
()
concordium-std/tests/derives.rs:5
↓ 16 callersMethodinvoke_contract
( &self, host: &mut impl HasHost<State>, method: EntrypointName, parameter: &P
concordium-cis2/src/cis2_client.rs:246
↓ 16 callersMethodor_insert
Ensures a value is in the entry by inserting the default if empty, and returns the [`HasStateEntry`] type. This differs from [`or_insert_raw`](Self::o
concordium-std/src/impls.rs:563
↓ 16 callersMethodself_address
(&self)
concordium-std/src/impls.rs:2925
↓ 15 callersFunctioninitialize_contract_with_alice_names
Helper function that sets up the contract with two names owned by Alice, `NAME_0` and `NAME_1`. Returns the `ContractInvokeSuccess` for the `NAME_1`
examples/nametoken/tests/tests.rs:775
↓ 14 callersMethodinvoke_transfer
(&self, receiver: &AccountAddress, amount: Amount)
concordium-std/src/impls.rs:2553
↓ 14 callersMethodmove_to_start
(&mut self)
concordium-std/src/impls.rs:241
↓ 14 callersMethodnew_box
(&mut self, value: T)
concordium-std/src/impls.rs:2462
↓ 14 callersMethodowner
(&self)
concordium-std/src/impls.rs:2965
↓ 14 callersMethodsize
(&self)
concordium-std/src/impls.rs:246
↓ 14 callersFunctionunwrap_or_report
(res: syn::Result<TokenStream>)
concordium-std-derive/src/lib.rs:66
↓ 13 callersMethodand_modify
If the entry is occupied apply the given function to its contents. If the entry is vacant no changes are made.
concordium-std/src/impls.rs:777
↓ 13 callersMethodto_owned
Convert to owned standard identifier.
concordium-cis2/src/lib.rs:1719
↓ 12 callersFunctioninitialize_contract_with_alice_tokens
Helper function that initializes the contract and wraps 100 microCCD into wCCD for Alice.
examples/cis2-wccd/tests/tests.rs:708
↓ 12 callersFunctioninvoke
(_tag: u32, _start: *const u8, _length: u32)
concordium-std/src/prims.rs:367
↓ 12 callersMethodinvoke_contract_raw
( &mut self, to: &ContractAddress, parameter: Parameter, method: EntrypointNam
concordium-std/src/impls.rs:2557
↓ 12 callersMethodtick_block_time
Tick the block time on the [`Chain`] by a [`Duration`]. Returns an error if ticking causes the block time to overflow. # Example ``` # use concordi
contract-testing/src/impls.rs:1731
↓ 11 callersMethodaddress
Get the Address of the receiver.
concordium-cis2/src/lib.rs:1388
↓ 11 callersMethodas_standard_identifier
Convert to standard identifier.
concordium-cis2/src/lib.rs:1751
↓ 11 callersMethodcalculate_energy_cost
Helper function for converting [`Energy`] to [`Amount`] using the two [`ExchangeRate`]s `euro_per_energy` and `micro_ccd_per_euro`.
contract-testing/src/impls.rs:109
↓ 11 callersFunctioninitialize_contract_with_alice_tokens
Helper function that sets up the contract with two tokens minted to Alice, `TOKEN_0` and `TOKEN_1`. Only one token can be minted per update, so two u
examples/cis3-nft-sponsored-txs/tests/tests.rs:1074
↓ 10 callersMethodcontract_balance_unchecked
Returns the contract balance from the topmost checkpoint on the changeset. Or, alternatively, from persistence. Preconditions: - Contract must exist.
contract-testing/src/invocation/impls.rs:1228
↓ 10 callersFunctionget_invoke_failure_code
(code: u64)
concordium-std/src/impls.rs:1933
↓ 10 callersMethoditer_mut
Like [iter](Self::iter), but allows modifying the values during iteration.
concordium-std/src/impls.rs:1130
↓ 10 callersMethodpush_regular_trace_element
Helper for that constructs and pushes a [`DebugTraceElement::Regular`] to the `trace_elements` list provided.
contract-testing/src/invocation/impls.rs:1617
↓ 9 callersFunctionget_balances
Get the `TokenIdU8(1)` balances for Alice and the auction contract.
examples/sponsored-tx-enabled-auction/tests/tests.rs:753
↓ 9 callersMethodget_node_mut
Internal function for looking up a node, providing mutable access. This assumes the node is present and traps if this is not the case.
concordium-std/src/state_btree.rs:1069
↓ 9 callersMethodnext
(&mut self)
concordium-std/src/impls.rs:896
↓ 9 callersMethodor_insert_raw
Ensures a value is in the entry by inserting the default if empty, and returns the [`HasStateEntry`] type for the entry.
concordium-std/src/impls.rs:550
↓ 9 callersMethodread_u8
Read a `u8` in little-endian format. This is optimized to not initialize a dummy value before calling an external function.
concordium-std/src/impls.rs:401
↓ 9 callersMethodself_balance
(&self)
concordium-std/src/impls.rs:2677
↓ 8 callersMethodapply_to_balance
Returns a new balance with the `AmountDelta` applied, or a [`BalanceError`] error if the change would result in a negative balance or an overflow.
contract-testing/src/invocation/impls.rs:1873
↓ 8 callersMethodbuild
Build the [`Chain`] with the configured options. # Example ``` # use concordium_smart_contract_testing::*; let chain = Chain::builder() // Use zero
contract-testing/src/impls.rs:330
↓ 8 callersFunctioncall_produce
Helper to call `produce` on the factory smart contract.
examples/factory/tests/tests.rs:205
↓ 8 callersMethodcontains_key
(&self, key: &K)
concordium-std/src/state_btree.rs:202
↓ 8 callersMethodcreate_entry
(&mut self, key: &[u8])
concordium-std/src/impls.rs:821
↓ 8 callersMethodhash_sha2_256
(&self, data: &[u8])
concordium-std/src/impls.rs:2846
↓ 8 callersMethodrevoke_credential
( &mut self, now: Timestamp, credential_id: CredentialHolderId, )
examples/credential-registry/src/lib.rs:253
↓ 7 callersFunctioncheck_exchange_rates
Helper function that checks the validity of the exchange rates. More specifically, it checks that the cost of one energy is <= `u64::MAX / `100_000_0
contract-testing/src/impls.rs:2236
↓ 7 callersFunctioncreate_factory
Helper to create an instance of the factory smart contract.
examples/factory/tests/tests.rs:165
↓ 7 callersFunctioncrypto_primitives
()
concordium-std/src/test_env.rs:131
↓ 7 callersMethodcurrent
Get an immutable reference the current (latest) checkpoint.
contract-testing/src/invocation/impls.rs:1681
↓ 7 callersMethoddebug_trace
An internal helper function to construct a [`DebugTraceElement`] from a set of debug events.
contract-testing/src/invocation/impls.rs:50
↓ 7 callersFunctiondeserialize_update_events_of_specified_contract
Deserialize the events from an update.
examples/cis5-smart-contract-wallet/tests/tests.rs:1044
↓ 7 callersFunctionget_balances
Get the `TOKEN_1` balances for Alice and Bob.
examples/cis2-multi/tests/tests.rs:1567
↓ 7 callersMethodget_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
templates/credential-registry/src/lib.rs:72
↓ 7 callersFunctionget_token_res
Parses the given tokens and transforms them using the provided worker function. If parsing fails, then an error with the given message is produced.
concordium-std-derive/src/lib.rs:36
↓ 7 callersFunctionget_token_res_env
Parses the given tokens, looks up an environment variable with the parsed input as key and transforms the corresponding value using the provided worke
concordium-std-derive/src/lib.rs:48
↓ 7 callersFunctioninitialize_chain_and_contract
Setup chain and contract. Also creates the three accounts, Alice, Bob, and Charlie. Alice is the owner of the contract.
examples/cis5-smart-contract-wallet/tests/tests.rs:757
↓ 7 callersFunctioninvoke_view
Invoke the view entrypoint and return its results.
examples/nametoken/tests/tests.rs:824
↓ 7 callersMethodis_empty
(&self)
concordium-std/src/state_btree.rs:277
↓ 7 callersMethoditer
(&self)
concordium-std/src/state_btree.rs:284
↓ 7 callersMethoditerator
(&self, prefix: &[u8])
concordium-std/src/impls.rs:863
↓ 7 callersMethodread_root
Read and deserialize the state stored at the root of the state trie. If such a state does not exist, or cannot be deserialized into the provided type,
concordium-std/src/traits.rs:332
↓ 6 callersMethodclear
Clears the map, removing all key-value pairs. This also includes values pointed at, if `V`, for example, is a [StateBox]. **If applicable use [`clear_
concordium-std/src/impls.rs:1011
↓ 6 callersMethodconvert_to_invoke_error
Convert a [`ContractInvokeErrorKind`] to a [`ContractInvokeError`] by calculating the `energy_used` and `transaction_fee`. If the `kind` is an out of
contract-testing/src/impls.rs:1614
↓ 6 callersMethodcurrent_mut
Get a mutable reference to the current (latest) checkpoint.
contract-testing/src/invocation/impls.rs:1688
↓ 6 callersMethodexternal_node_connection
Configure a connection to an external Concordium node. The connection can be used for getting the current exchange rates between CCD, Euro and Energy
contract-testing/src/impls.rs:161
next →1–100 of 1,394, ranked by callers