Skip to content

Commit

Permalink
Merge branch 'master' into update-asset-canister
Browse files Browse the repository at this point in the history
  • Loading branch information
jessiemongeon1 authored Dec 17, 2024
2 parents 6a2b7c3 + 58f974e commit 504b417
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ keywords: [intermediate, tokens, tutorial, ledger]
---

import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# ICP ledger local setup

Expand Down Expand Up @@ -232,4 +234,4 @@ Or, you can interact with it using the Candid UI by navigating to the URL provid

```
http://127.0.0.1:4943/?canisterId=bnz7o-iuaaa-aaaaa-qaaaa-cai&id=ryjl3-tyaaa-aaaaa-aaaba-cai
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ keywords: [intermediate, tokens, icrc, tutorial, ledger]
---

import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# ICRC-1 ledger local setup

Expand Down Expand Up @@ -84,4 +86,4 @@ There is a test suite available for [ICRC-1 ledgers](https://github.com/dfinity/

## Next steps

Before you deploy your ledger canister, you will need to set some variables that you will pass to the canister during initialization that will create a new ICRC-1 or ICRC-2 token. To learn how to set these variables and deploy the ledger canister, see [create a token](/docs/developer-docs/defi/tokens/create.mdx).
Before you deploy your ledger canister, you will need to set some variables that you will pass to the canister during initialization that will create a new ICRC-1 or ICRC-2 token. To learn how to set these variables and deploy the ledger canister, see [create a token](/docs/developer-docs/defi/tokens/create.mdx).
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,65 @@ dfx canister call evm_rpc eth_getTransactionReceipt "(variant {$RPC_SOURCE}, $RP
<AdornedTabs groupId="languages">
<TabItem value="motoko" label="Motoko" default>

Calling an Ethereum smart contract from Motoko is possible but not yet officially supported.
```motoko no-repl
import EvmRpc "canister:evm_rpc";
import Cycles "mo:base/ExperimentalCycles";
import Debug "mo:base/Debug";
actor {
public func call() : async ?Text {
// Configure RPC request
let services = #EthMainnet(null);
let config = null;
// Add cycles to next call
Cycles.add<system>(2000000000);
// Call an Ethereum smart contract. The smart contract's information in this example is hard coded.
let result = await EvmRpc.eth_call(services, config, {
block = null;
transaction = {
to = ?"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
input = ?"0x70a08231000000000000000000000000b25eA1D493B49a1DeD42aC5B1208cC618f9A9B80"; // ABI-encoded
accessList = null;
blobVersionedHashes = null;
blobs = null;
chainId = null;
from = null;
gas = null;
gasPrice = null;
maxFeePerBlobGas = null;
maxFeePerGas = null;
maxPriorityFeePerGas = null;
nonce = null;
type_ = null;
value = null
};
});
// Process results
switch result {
// Prints the response if each RPC provider returns a consistent, successful result
case (#Consistent(#Ok response)) {
Debug.print("Success: " # debug_show response);
?response // ABI-encoded
};
// Trap is an RPC provider returns an error message consistent with the response of the other providers
case (#Consistent(#Err error)) {
Debug.trap("Error: " # debug_show error);
null
};
// Trap if an RPC provider returns a response inconsistent with the other providers
case (#Inconsistent(_results)) {
Debug.trap("Inconsistent results");
null
};
};
};
};
```

</TabItem>
<TabItem value="rust" label="Rust">
Expand Down
42 changes: 21 additions & 21 deletions showcase.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
[
{
"id": "decideai",
"name": "DecideAI",
"display": "Large",
"oneLiner": "A fullstack decentralized AI platform",
"website": "https://decideai.xyz",
"twitter": "https://twitter.com/DecideAI_",
"tags": [
"AI",
"Tools / Infrastructure"
],
"stats": "50,000+ inference requests",
"description": "DecideAI is an ecosystem that consists of three products, Decide Protocol, Decide ID, and Decide Cortex, designed to meet the needs of the high-end, specialized LLM market.",
"usesInternetIdentity": true,
"logo": "/img/showcase/decideai_logo.png",
"screenshots": [
"/img/showcase/decideai_screenshot_0.png"
],
"github": "https://github.com/modclub-app"
},
{
"id": "bitfinity-evm",
"name": "Bitfinity EVM",
Expand All @@ -13,7 +33,7 @@
"description": "Bitfinity is the EVM compatibility layer for the IC. Using Bitfinity, you can deploy your Solidity smart contracts to the Internet Computer, taking advantage of its many advantageous DeFi capabilities: HTTPS Outcalls, the BTC integration, and more.",
"usesInternetIdentity": true,
"stats": "1,000+ TPS",
"display": "Large",
"display": "Normal",
"logo": "/img/showcase/bitfinity_evm.svg",
"screenshots": [
"/img/showcase/bitfinity_showcase.webp"
Expand Down Expand Up @@ -624,26 +644,6 @@
"/img/showcase/plethora_screenshot.webp"
]
},
{
"id": "decideai",
"name": "DecideAI",
"display": "Large",
"oneLiner": "A fullstack decentralized AI platform",
"website": "https://decideai.xyz",
"twitter": "https://twitter.com/DecideAI_",
"tags": [
"AI",
"Tools / Infrastructure"
],
"stats": "50,000+ inference requests",
"description": "DecideAI is an ecosystem that consists of three products, Decide Protocol, Decide ID, and Decide Cortex, designed to meet the needs of the high-end, specialized LLM market.",
"usesInternetIdentity": true,
"logo": "/img/showcase/decideai_logo.png",
"screenshots": [
"/img/showcase/decideai_screenshot_0.png"
],
"github": "https://github.com/modclub-app"
},
{
"id": "querio",
"name": "Querio",
Expand Down

0 comments on commit 504b417

Please sign in to comment.