Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
fix issue with some cids not decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
John committed Mar 9, 2022
1 parent 82a5904 commit 1fef99e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LoopMintSharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//Changes these variables to suit
string loopringApiKey = Environment.GetEnvironmentVariable("LOOPRINGAPIKEY", EnvironmentVariableTarget.Machine);//you can either set an environmental variable or input it here directly. You can export this from your account using loopring.io
string loopringPrivateKey = Environment.GetEnvironmentVariable("LOOPRINGPRIVATEKEY", EnvironmentVariableTarget.Machine); //you can either set an environmental variable or input it here directly. You can export this from your account using loopring.io
var ipfsCid = "QmdjmxTW6fvS9Pn9oqKU1Kb3ryxhmPB4ScCHfZrUP7LHhS"; //the ipfs cid of your metadata.json
var ipfsCid = "QmVQ4jnoHAMrRycy4JMrndjrLVXDzPn6d7tjabZmCX5eXy"; //the ipfs cid of your metadata.json
var minterAddress = "0x36Cd6b3b9329c04df55d55D41C257a5fdD387ACd"; //your loopring address
var accountId = 40940; //your loopring account id
var nftType = 0; //nfttype 0 = ERC1155, shouldn't need to change this unless you want ERC721 which is 1
Expand Down Expand Up @@ -46,7 +46,7 @@
#region Generate Eddsa Signature

//Generate the nft id here
Multihash multiHash = Multihash.Parse(ipfsCid);
Multihash multiHash = Multihash.Parse(ipfsCid, Multiformats.Base.MultibaseEncoding.Base58Btc);
string multiHashString = multiHash.ToString();
var ipfsCidBigInteger = Utils.ParseHexUnsigned(multiHashString);
var nftId = "0x" + ipfsCidBigInteger.ToString("x").Substring(4);
Expand Down

0 comments on commit 1fef99e

Please sign in to comment.