diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..7d8fc6a --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,13 @@ +name: codecov +"on": + push: + branches: + - main +jobs: + uploader: + runs-on: ubuntu-latest + steps: + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/app/src/lib/History.svelte b/app/src/lib/History.svelte index a67d7e4..a079724 100644 --- a/app/src/lib/History.svelte +++ b/app/src/lib/History.svelte @@ -6,10 +6,6 @@ import { Link } from "svelte-routing"; const web3 = new Web3(window.ethereum); - //let etherscanURL = `https://api.etherscan.io/api?module=logs&action=getLogs&fromBlock=10221728&toBlock=${web3.eth.getBlockNumber()}&address=0x5f0B6625541d613ea33098d2afdE2aE466dbF1ec&topic0=${web3.eth.abi.encodeEventSignature('PassportUpdate(uint256,address,uint8,string,string,string,string,string)')}&topic0_1_opr=and&topic1=${web3.eth.abi.encodeParameter("uint256", tokenId)}&page=1&offset=10&apikey=8GMF6CSE9AW2BQ2T5XZHT5BGJPBQSSY29H`; - //console.log(etherscanURL) - //fetch(etherscanURL).then((res) => res.json()).then((data) => console.log(data)).catch((err) => console.error(err)) - async function getHistory() { let history = await contract.getPastEvents("PassportUpdate", { filter: { diff --git a/contract/test/ItemBlocksTest.t.sol b/contract/test/ItemBlocksTest.t.sol index 9c7d4cf..131c44c 100644 --- a/contract/test/ItemBlocksTest.t.sol +++ b/contract/test/ItemBlocksTest.t.sol @@ -35,6 +35,11 @@ contract ItemBlocksTest is Test{ itemBlocks.safeMint(address(42), 0); assertEq(itemBlocks.ownerOf(0), address(42)); } + + function testFailSafeMintZeroAddress() public { + vm.prank(address(0)); + itemBlocks.safeMint(address(0), 0); + } // TESTS FOR isEligible // should pass because 42 minted token 12