Compare commits
3 Commits
31f0c6f84e
...
c29b0a0336
Author | SHA1 | Date |
---|---|---|
Moon Man | c29b0a0336 | |
Moon Man | c4d1ab0b7f | |
Moon Man | e430270130 |
|
@ -53,12 +53,12 @@ contract CurioERC1155Wrapper is ERC1155, ERC1155Metadata_URI, ERC1155Metadata, O
|
|||
|
||||
return string(abi.encodePacked("data:application/json;base64,", Base64.encode(abi.encodePacked(
|
||||
'{',
|
||||
'"name":"', curio.name, '",',
|
||||
'"description":"', curio.description, '",',
|
||||
'"image":"ipfs://', curio.ipfs_hash, '",',
|
||||
'"name":"', curio.name(), '",',
|
||||
'"description":"', curio.description(), '",',
|
||||
'"image":"ipfs://', curio.ipfs_hash(), '",',
|
||||
'"external_url":"', urls[_id], '",',
|
||||
'"properties":{',
|
||||
'"symbol":"', curio.symbol, '"',
|
||||
'"symbol":"', curio.symbol(), '"',
|
||||
'}',
|
||||
'}'
|
||||
))));
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
const Wrapper = artifacts.require("CurioERC1155Wrapper");
|
||||
|
||||
module.exports = async (callback) => {
|
||||
console.log("Start.");
|
||||
|
||||
const wrapper = await Wrapper.deployed();
|
||||
|
||||
const dataURI = await wrapper.uri(1);
|
||||
console.log(`Data URI: ${dataURI}`);
|
||||
|
||||
const data = dataURI.split(',')[1];
|
||||
const raw = Buffer.from(data, "base64").toString("utf8");
|
||||
console.log(JSON.stringify(JSON.parse(raw), null, 4));
|
||||
|
||||
console.log("Done.");
|
||||
callback();
|
||||
}
|
|
@ -55,7 +55,7 @@ module.exports = {
|
|||
ubiq: {
|
||||
provider: () => new HDWalletProvider(mnemonic, "https://rpc.octano.dev"),
|
||||
gas: 5500000,
|
||||
network_id: 88,
|
||||
network_id: 8,
|
||||
confirmations: 2,
|
||||
timeoutBlocks: 200,
|
||||
skipDryRun: true
|
||||
|
|
Loading…
Reference in New Issue