Skip to content

Commit 575fb2f

Browse files
committed
test: metadata asm
1 parent 0e800e1 commit 575fb2f

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

src/Deployer.evm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ MSTORE(MSIZE, 0x436f6e7472616374000000000000000000000000000000000000000000000000
211211
RETURN(0, MSIZE)
212212

213213
tokenuri:
214+
// tokenURI(uint256)
215+
214216
// https://filecoin.blockscout.com/address/0x<tokenid>
215217
MSTORE(MSIZE, 32)
216218
MSTORE(MSIZE, 82) // 42 + 40
@@ -228,7 +230,7 @@ MSTORE8(DUP2, ADD)
228230
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ADD // outIndex -= 1
229231
SWAP1 4 SHR SWAP1 // token >>= 4
230232
JUMPI(loop, LT(105, DUP1))
231-
RETURN(0, 147)
233+
RETURN(0, 146)
232234

233235
ownerof:
234236
// ownerOf(uint256)

test/dio/Metadata.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"address": "0x000000000000c57CF0A1f923d44527e703F1ad70",
4+
"construct": "src/Deployer.evm",
5+
"tests": [
6+
{
7+
"name": "name",
8+
"gasUsed": "0x53a7",
9+
"input": "0x06fdde03",
10+
"output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008436f6e7472616374000000000000000000000000000000000000000000000000"
11+
},
12+
{
13+
"name": "symbol",
14+
"gasUsed": "0x5391",
15+
"input": "0x95d89b41",
16+
"output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004434f444500000000000000000000000000000000000000000000000000000000"
17+
},
18+
{
19+
"name": "totalSupply",
20+
"gasUsed": "0x5365",
21+
"input": "0x18160ddd",
22+
"output": "0x0000000000000000000000010000000000000000000000000000000000000000"
23+
},
24+
{
25+
"name": "tokenURI",
26+
"gasUsed": "0x6192",
27+
"input": "0xc87b56dd0000000000000000000000008408502033C418E1bbC97cE9ac48E5528F371A9f",
28+
"output": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000005268747470733a2f2f66696c65636f696e2e626c6f636b73636f75742e636f6d2f616464726573732f307838343038353032303333633431386531626263393763653961633438653535323866333731613966"
29+
}
30+
]
31+
}
32+
]

0 commit comments

Comments
 (0)