Skip to content

Commit

Permalink
test(torii): add metadata to erc1155 and update
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Feb 20, 2025
1 parent f244197 commit 0604b32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/spawn-and-move/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [

[[package]]
name = "dojo_examples"
version = "1.2.0"
version = "1.2.1"
dependencies = [
"armory",
"bestiary",
Expand Down
6 changes: 6 additions & 0 deletions examples/spawn-and-move/src/externals/erc1155.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ mod ERC1155Token {
#[generate_trait]
#[abi(per_item)]
impl ExternalImpl of ExternalTrait {
#[external(v0)]
fn token_uri(ref self: ContractState, token_id: u256) -> ByteArray {
let tx_hash = starknet::get_tx_info().transaction_hash;
format!("{{ \"image\": \"https://api.dicebear.com/9.x/lorelei-neutral/png?seed={:x}\" }}", tx_hash)
}

#[external(v0)]
fn mint(ref self: ContractState, token_id: u256, value: u256) {
self
Expand Down

0 comments on commit 0604b32

Please sign in to comment.