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(
|
return string(abi.encodePacked("data:application/json;base64,", Base64.encode(abi.encodePacked(
|
||||||
'{',
|
'{',
|
||||||
'"name":"', curio.name, '",',
|
'"name":"', curio.name(), '",',
|
||||||
'"description":"', curio.description, '",',
|
'"description":"', curio.description(), '",',
|
||||||
'"image":"ipfs://', curio.ipfs_hash, '",',
|
'"image":"ipfs://', curio.ipfs_hash(), '",',
|
||||||
'"external_url":"', urls[_id], '",',
|
'"external_url":"', urls[_id], '",',
|
||||||
'"properties":{',
|
'"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: {
|
ubiq: {
|
||||||
provider: () => new HDWalletProvider(mnemonic, "https://rpc.octano.dev"),
|
provider: () => new HDWalletProvider(mnemonic, "https://rpc.octano.dev"),
|
||||||
gas: 5500000,
|
gas: 5500000,
|
||||||
network_id: 88,
|
network_id: 8,
|
||||||
confirmations: 2,
|
confirmations: 2,
|
||||||
timeoutBlocks: 200,
|
timeoutBlocks: 200,
|
||||||
skipDryRun: true
|
skipDryRun: true
|
||||||
|
|
Loading…
Reference in New Issue