Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
qalisander committed May 23, 2024
1 parent 1375a99 commit e9a75b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 4 additions & 3 deletions e2e-tests/test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -o pipefail
set -e

# make sure we will be running script from the project root.
mydir=$(dirname "$0")
Expand Down Expand Up @@ -47,10 +47,11 @@ deploy_contract () {
set +a
}

# Retrieve all contract's crate names in `./examples` directory.
# Retrieve all alphanumeric contract's crate names in `./examples` directory.
get_example_crate_names () {
# shellcheck disable=SC2038
# NOTE: optimistically relying on the 'name = ' string at Cargo.toml file
find ./examples -type f -print0 -name "Cargo.toml" | xargs -0 grep 'name = ' | grep -oE '".*"' | tr -d "'\""
find ./examples -type f -name "Cargo.toml" | xargs grep 'name = ' | grep -oE '".*"' | tr -d "'\""
}

export ALICE_PRIV_KEY=${ALICE_PRIV_KEY:-0x5744b91fe94e38f7cde31b0cc83e7fa1f45e31c053d015b9fb8c9ab3298f8a2d}
Expand Down
8 changes: 2 additions & 6 deletions examples/erc721/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@ impl Token {
self.metadata.constructor(name, symbol, base_uri);
}

pub fn mint(
&mut self,
to: Address,
token_id: U256,
) -> Result<(), contracts::erc721::Error> {
pub fn mint(&mut self, to: Address, token_id: U256) -> Result<(), Vec<u8>> {
self.pausable.when_not_paused()?;
self.erc721._mint(to, token_id)
self.erc721._mint(to, token_id).map_err(|e| e.into())
}

pub fn burn(&mut self, token_id: U256) -> Result<(), Vec<u8>> {
Expand Down

0 comments on commit e9a75b7

Please sign in to comment.