Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

suidouble

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suidouble - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

4

lib/SuiPackageModule.js

@@ -82,4 +82,4 @@ const sui = require('@mysten/sui.js');

for (let param of params) {
if (param.indexOf && param.indexOf('<SUI>') === 0) {
let amount = BigInt(param.split('>')[1]);
if (param && param.type && param.amount && param.type === 'SUI') {
let amount = BigInt(param.amount);
const coin = tx.add(sui.Transactions.SplitCoins(tx.gas, [tx.pure(amount)]));

@@ -86,0 +86,0 @@ callArgs.push(coin);

{
"name": "suidouble",
"version": "0.0.13",
"version": "0.0.14",
"description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -158,6 +158,8 @@ # suidouble

If you need to transfer some SUI as part of executing contract method, you can use a magic parameter in form of '<SUI>400000000000' where 400000000000 is the amount of MIST you want to send. SuiPackageModule will convert this amount to Coin object using Transactions.SplitCoins method.
If you need to transfer some SUI as part of executing contract method, you can use a magic parameter in form of {type: 'SUI', amount: 400000000000n} where 400000000000 is the amount of MIST you want to send. SuiPackageModule will convert this amount to Coin object using Transactions.SplitCoins method.
`amount: 400000000000n`, `amount: '400000000000'`, `amount: 400000000000` will work too
```javascript
const moveCallResult = await contract.moveCall('suidouble_chat', 'post_pay', [chatShopObjectId, '<SUI>400000000000', messageText, 'metadata']);
const moveCallResult = await contract.moveCall('suidouble_chat', 'post_pay', [chatShopObjectId, {type: 'SUI', amount: 400000000000n}, messageText, 'metadata']);
```

@@ -164,0 +166,0 @@

@@ -258,3 +258,3 @@ 'use strict'

// but can post with with post_pay function sending some sui to it
const moveCallResult = await contract.moveCall('suidouble_chat', 'post_pay', [chatShopObjectId, '<SUI>400000000000', longMessageYouCanNotPostForFree, 'metadata']);
const moveCallResult = await contract.moveCall('suidouble_chat', 'post_pay', [chatShopObjectId, {type: 'SUI', amount: 400000000000n}, longMessageYouCanNotPostForFree, 'metadata']);

@@ -261,0 +261,0 @@ // there're at least some object created

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc