@rareprotocol/rare-cli 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +23 -10
  2. package/package.json +4 -1
package/dist/index.js CHANGED
@@ -45,6 +45,14 @@ var contractAddresses = {
45
45
  mainnet: {
46
46
  factory: "0xAe8E375a268Ed6442bEaC66C6254d6De5AeD4aB1",
47
47
  auction: "0x6D7c44773C52D396F43c2D511B81aa168E9a7a42"
48
+ },
49
+ base: {
50
+ factory: "0xf776204233bfb52ba0ddff24810cbdbf3dbf94dd",
51
+ auction: "0x51c36ffb05e17ed80ee5c02fa83d7677c5613de2"
52
+ },
53
+ "base-sepolia": {
54
+ factory: "0x2b181ae0f1aea6fed75591b04991b1a3f9868d51",
55
+ auction: "0x1f0c946f0ee87acb268d50ede6c9b4d010af65d2"
48
56
  }
49
57
  };
50
58
  function getContractAddresses(chain) {
@@ -1336,11 +1344,9 @@ async function pinMetadata(opts) {
1336
1344
  const payload = {
1337
1345
  name: opts.name,
1338
1346
  description: opts.description,
1339
- nftMedia
1347
+ nftMedia,
1348
+ tags: opts.tags ?? []
1340
1349
  };
1341
- if (opts.tags && opts.tags.length > 0) {
1342
- payload.tags = opts.tags;
1343
- }
1344
1350
  if (opts.attributes && opts.attributes.length > 0) {
1345
1351
  payload.attributes = opts.attributes;
1346
1352
  }
@@ -3236,15 +3242,22 @@ Transaction sent: ${txHash}`);
3236
3242
  functionName: "getAuctionDetails",
3237
3243
  args: [opts.contract, BigInt(opts.tokenId)]
3238
3244
  });
3239
- const [seller, startingPrice, currentBid, endTime, currency, , auctionType] = result;
3245
+ const [seller, creationBlock, startingTime, lengthOfAuction, currency, minimumBid, auctionType] = result;
3240
3246
  const isEth = currency === ETH_ADDRESS;
3241
- const endDate = new Date(Number(endTime) * 1e3);
3247
+ const started = Number(startingTime) > 0;
3248
+ const endTime = started ? Number(startingTime) + Number(lengthOfAuction) : null;
3249
+ const endDate = endTime ? new Date(endTime * 1e3) : null;
3242
3250
  console.log("\nAuction Details:");
3243
3251
  console.log(` Seller: ${seller}`);
3244
- console.log(` Starting price: ${formatEther(startingPrice)} ${isEth ? "ETH" : currency}`);
3245
- console.log(` Current bid: ${formatEther(currentBid)} ${isEth ? "ETH" : currency}`);
3246
- console.log(` End time: ${endDate.toISOString()} (${endTime})`);
3252
+ console.log(` Minimum bid: ${formatEther(minimumBid)} ${isEth ? "ETH" : currency}`);
3247
3253
  console.log(` Currency: ${isEth ? "ETH" : currency}`);
3254
+ console.log(` Duration: ${lengthOfAuction}s`);
3255
+ console.log(` Status: ${started ? "RUNNING" : "PENDING"}`);
3256
+ if (started) {
3257
+ console.log(` Started at: ${new Date(Number(startingTime) * 1e3).toISOString()}`);
3258
+ console.log(` Ends at: ${endDate.toISOString()}`);
3259
+ }
3260
+ console.log(` Creation block: ${creationBlock}`);
3248
3261
  console.log(` Auction type: ${auctionType}`);
3249
3262
  });
3250
3263
  return cmd;
@@ -3546,7 +3559,7 @@ Contract imported successfully.`);
3546
3559
 
3547
3560
  // src/index.ts
3548
3561
  var program = new Command10();
3549
- program.name("rare").description("CLI tool for interacting with the RARE protocol smart contracts").version("0.1.0");
3562
+ program.name("rare").description("CLI tool for interacting with the RARE protocol smart contracts").version("0.2.1");
3550
3563
  program.addCommand(configureCommand());
3551
3564
  program.addCommand(deployCommand());
3552
3565
  program.addCommand(mintCommand());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rareprotocol/rare-cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "CLI tool for interacting with the RARE protocol smart contracts",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,6 +21,9 @@
21
21
  "engines": {
22
22
  "node": ">=22"
23
23
  },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
24
27
  "files": [
25
28
  "dist",
26
29
  "LICENSE"