Skip to content

Commit

Permalink
Improve error parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN committed Jan 3, 2024
1 parent 9b9000d commit 3c6f6c5
Show file tree
Hide file tree
Showing 9 changed files with 1,430 additions and 904 deletions.
4 changes: 2 additions & 2 deletions sponsoredTransactionsAuction/backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ async fn handle_signature_bid(
events: _,
used_energy,
} => {
tracing::debug!("TransactionSimulationSuccess");
tracing::debug!("TransactionSimulationSuccess with used energy: {:#?}.", used_energy);
used_energy
}
InvokeContractResult::Failure {
return_value: _,
reason,
used_energy: _,
} => {
tracing::warn!("TransactionSimulationError {:#?}.", reason);
tracing::warn!("TransactionSimulationError with reason: {:#?}.", reason);
return Err(ServerError::TransactionSimulationError(RevertReason {
reason,
}));
Expand Down
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions sponsoredTransactionsAuction/frontend/generated/cis2_multi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import * as SDK from "@concordium/web-sdk";

/** The reference of the smart contract module supported by the provided client. */
export const moduleReference: SDK.ModuleReference.Type = /*#__PURE__*/ SDK.ModuleReference.fromHexString('d4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75');
export const moduleReference: SDK.ModuleReference.Type = /*#__PURE__*/ SDK.ModuleReference.fromHexString('238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2');

/** Client for an on-chain smart contract module with module reference 'd4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75', can be used for instantiating new smart contract instances. */
/** Client for an on-chain smart contract module with module reference '238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2', can be used for instantiating new smart contract instances. */
class Cis2MultiModule {
/** Having a private field prevents similar structured objects to be considered the same type (similar to nominal typing). */
private __nominal = true;
Expand All @@ -17,7 +17,7 @@ class Cis2MultiModule {
}
}

/** Client for an on-chain smart contract module with module reference 'd4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75', can be used for instantiating new smart contract instances. */
/** Client for an on-chain smart contract module with module reference '238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2', can be used for instantiating new smart contract instances. */
export type Type = Cis2MultiModule;

/**
Expand Down Expand Up @@ -46,7 +46,7 @@ export function createUnchecked(grpcClient: SDK.ConcordiumGRPCClient): Cis2Multi
/**
* Construct a Cis2MultiModule client for interacting with a smart contract module on chain.
* This function ensures the smart contract module is deployed on chain.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence 'd4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75'.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence '238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2'.
* @throws If failing to communicate with the concordium node or if the module reference is not present on chain.
* @returns {Cis2MultiModule} A module client ensured to be deployed on chain.
*/
Expand All @@ -56,7 +56,7 @@ export function checkOnChain(moduleClient: Cis2MultiModule): Promise<void> {

/**
* Get the module source of the deployed smart contract module.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence 'd4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75'.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence '238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2'.
* @throws {SDK.RpcError} If failing to communicate with the concordium node or module not found.
* @returns {SDK.VersionedModuleSource} Module source of the deployed smart contract module.
*/
Expand All @@ -80,7 +80,7 @@ export function createCis2MultiParameter(parameter: Cis2MultiParameter): SDK.Par

/**
* Send transaction for instantiating a new 'cis2_multi' smart contract instance.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence 'd4a3a3bf1fc4eec66c5407602fb7a30955136df4982436f2445773925a8baf75'.
* @param {Cis2MultiModule} moduleClient - The client of the on-chain smart contract module with referecence '238d15143fa68dd5cd6f28b46d4d9650d34c23d8e9e10acf4d025baf7d411dd2'.
* @param {SDK.ContractTransactionMetadata} transactionMetadata - Metadata related to constructing a transaction for a smart contract module.
* @param {Cis2MultiParameter} parameter - Parameter to provide as part of the transaction for the instantiation of a new smart contract contract.
* @param {SDK.AccountSigner} signer - The signer of the update contract transaction.
Expand Down
Loading

0 comments on commit 3c6f6c5

Please sign in to comment.