Add

PureSafeMath Calculate Plugin - Add

Description

Add 2 uint256 values

Method

add(uint256, uint256)

Method Parameters

NamePlugin TypeDescription

value1

FctValue

value2

FctValue

Returned Values

NamePlugin TypeDescription

value

FctValue

Returns the result of calculation

Example

Example with initParams

const add = new PureSafeMath.calculate.Add({
 chainId: 1,
 initParams: {
   methodParams: {
     value1: "20",
     value2: "40"
   }
 }
})

Example without initParams

const add = new PureSafeMath.calculate.Add({ chainId: 1 })

add.input.set({
   methodParams: {
     value1: "20",
     value2: "40"
   }
})

Last updated