Forming input data

Wert facilitates the execution of payable functions as msg.sender using the input data provided in your widget request. Our service is analogous to a standard wallet extension, conducting transactions on behalf of users paying via card. Our NFT checkout (smart contract checkout) supports a range of functionalities, including:

  • Minting
  • Primary and secondary sales
  • Auctions
  • DeFi token swaps

Using Wert requires an additional transfer method argument in your input data to ensure that the user receives the token within the same transaction. Depending on your contract's logic, this parameter can vary; however, commonly, this uses one of the following:

token_to
address_recipient
owner_address
recipient
beneficiary_
_walletaddress

For ERC20 token transactions, the payable attribute is not necessary. Further details on this process can be found in our Smart Contract FAQ.


The sc_input_data parameter will contain your ABI function encoded as bytecode, which should be generated using your preferred libraries or SDKs. Note that the input data examples demonstrate the function passed to us and include the approval we generated in the transaction hash.

Many tools are available for these purposes, such as:

  • Ethereum Virtual Machine (EVM) compatible: Functions can be encoded using tools such as Web3.js or Viem. The Solidity ABI specification can be referenced at Solidity Documentation.
  • Tezos: Convert Michelson data to JSON, then to hex using Taquito.
  • Concordium: Parameters are hex-encoded bytes representing binary-encoded contract method arguments. Create these using your chosen libraries or SDKs.

Your input data should vary with each order, depending on project type (e.g., minting, secondary sales) and the quantity of purchased assets. Each user's address will be unique and provided when they connect their wallet to your website. This address should be included in the input data.


For a comprehensive example of integration, please refer to our Wert Widget Integration Example.


Ethereum

NFT mint
Tamadoge NFT mint 

Transaction 
https://etherscan.io/tx/0x72d3cd16dacce83d6f7cc26fd3d7e013b396bac0c16e6eec02778f729f8e1fb1

Input data in bytecode:
0xa08720bb00000000000000000000000054cdaa42d26baaff6a47a94ce3e698b8486c8a7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001

ABI function:
{  
"method": "buyWithNativeWert",  
"types": [  
"address",  
"uint256",  
"uint256"  
],  
"inputs": [  
"54Cdaa42d26BAAff6a47A94ce3E698B8486C8a75",  
{  
"type": "BigNumber",  
"hex": "0x00"  
},  
{  
"type": "BigNumber",  
"hex": "0x01"  
}  
],  
"names": [  
"_user",  
"_nftLevel",  
"_num"  
]  
}
Secondary sale on NFT marketplace
Secondary sale on Knownorigin NFT marketplace
https://knownorigin.io/

Transaction
https://etherscan.io/tx/0x18882f7bbad9518b172d9c0fd873ea9586dad0af4a551b0151629ad7d345ef8d

Input data in bytecode:
0x6710c3f20000000000000000000000000000000000000000000000000000000000534c38000000000000000000000000263861e2b00e1581ee5e5fa89ca0af9b7bf606a1

ABI function:
{  
"method": "buyEditionTokenFor",  
"types": [  
"uint256",  
"address"  
],  
"inputs": [  
{  
"type": "BigNumber",  
"hex": "0x534c38"  
},  
"263861e2b00e1581ee5e5fA89ca0Af9B7bF606a1"  
],  
"names": [  
"_id",  
"_recipient"  
]  
}
USDC NFT mint
Crowdmuse USDC NFT mint

Transaction
https://etherscan.io/tx/0x1becda12a3c34fdf3f44811b5e8c19dc655129e07a4a0e07428db27c9e01cb22

Input data in bytecode:
0xc67a839100000000000000000000000060d02a613da7181278e9f48241fdcc0b6ec28b7fdce68bdcb0d0694283e75b5e32be7dac4e532af25842b4deadfdea6bcf270deb

ABI function:
{  
"method": "buyNFT",  
"types": [  
"address",  
"bytes32"  
],  
"inputs": [  
"60D02a613da7181278e9f48241fDCc0b6EC28B7f",  
"0xdce68bdcb0d0694283e75b5e32be7dac4e532af25842b4deadfdea6bcf270deb"  
],  
"names": [  
"_to",  
"garmentType"  
]  
}
Seaport purchase
Seaport purchase through FXHASH 
https://www.fxhash.xyz/

Transaction
https://etherscan.io/tx/0xb68b3aba89d6deb11e8ad6d5a065dc5681294cb8b15e83d0fa6e95c0db7b60d5

Input data in bytecode:
0x76af662900000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000da469a6c78d12996895721fceba62e510b38faf3000000000000000000000000c16157e00b1bff1522c6f01246b4fb621da048d0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000001cdda4faccd0000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000fc1e354b579f669335dbe645046208c8687875e3000000000000000000000000aa0e012d35cf7d6ecb6c2bf861e71248501d3226000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000006583279100000000000000000000000000000000000000000000000000000000667075cd000000000000000000000000000000000000000000000000000000000000000095437d0a1d4da48b000000000000000009632033e72e7d0e8951628ec78482a40000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000076e27d6c7b8324fd42fe21d63da5195551dc1cc4000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000188932a1fae40000000000000000000000000000000000000000000000000000188932a1fae4000000000000000000000000000fc1e354b579f669335dbe645046208c8687875e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004547258d1ec000000000000000000000000000000000000000000000000000004547258d1ec000000000000000000000000000f11a8b885aced459275e42fa4b8f3bb09335b6b50000000000000000000000000000000000000000000000000000000000000041ed8af997f240f49e612ff04e2cc39ca21b9a9e9aee9c3a9ddf00b919f81b2a235e642d28208ddc07dd637ee679a781cdcc23cd1433cd2c6054f7d7b6ad97a5ae1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e0000000000000000000000000000000000000000000000000065838f1b4d9f9d076d34f8c746708d271ca46fd3fbe0106cb87cc3247e87a902ac5d8cbce881106b6be913caf9e4acbddce1b63535d199c2e8d1f1e4386413076b74570b00ede3b9b694b2843c0b0f9aa5cd520b2ed3173ca6135f02b195906d4df330404200000000000000000000000000000000000000000000000000000000000000000000

ABI Function:
{
  "method": "acceptETHListing",
  "types": [
    "(tuple,uint120,uint120,bytes,bytes)",
    "(address,address,bool,uint256)",
    "(address,uint256)[]"
  ],
  "inputs": [
    [
      [
        "0xFc1e354b579f669335dbe645046208c8687875e3",
        "0xAA0e012d35Cf7d6EcB6c2Bf861e71248501D3226",
        [
          [
            2,
            "0x76e27D6C7B8324fD42Fe21D63DA5195551dc1cc4",
            {
              "type": "BigNumber",
              "hex": "0x4a"
            },
            {
              "type": "BigNumber",
              "hex": "0x01"
            },
            {
              "type": "BigNumber",
              "hex": "0x01"
            }
          ]
        ],
        [
          [
            0,
            "0x0000000000000000000000000000000000000000",
            {
              "type": "BigNumber",
              "hex": "0x00"
            },
            {
              "type": "BigNumber",
              "hex": "0x0188932a1fae4000"
            },
            {
              "type": "BigNumber",
              "hex": "0x0188932a1fae4000"
            },
            "0xFc1e354b579f669335dbe645046208c8687875e3"
          ],
          [
            0,
            "0x0000000000000000000000000000000000000000",
            {
              "type": "BigNumber",
              "hex": "0x00"
            },
            {
              "type": "BigNumber",
              "hex": "0x4547258d1ec000"
            },
            {
              "type": "BigNumber",
              "hex": "0x4547258d1ec000"
            },
            "0xF11a8b885aCED459275E42Fa4B8F3Bb09335B6b5"
          ]
        ],
        2,
        {
          "type": "BigNumber",
          "hex": "0x65832791"
        },
        {
          "type": "BigNumber",
          "hex": "0x667075cd"
        },
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        {
          "type": "BigNumber",
          "hex": "0x95437d0a1d4da48b000000000000000009632033e72e7d0e8951628ec78482a4"
        },
        "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
        {
          "type": "BigNumber",
          "hex": "0x02"
        }
      ],
      {
        "type": "BigNumber",
        "hex": "0x01"
      },
      {
        "type": "BigNumber",
        "hex": "0x01"
      },
      "0xed8af997f240f49e612ff04e2cc39ca21b9a9e9aee9c3a9ddf00b919f81b2a235e642d28208ddc07dd637ee679a781cdcc23cd1433cd2c6054f7d7b6ad97a5ae1b",
      "0x0000000000000000000000000000000000000000000000000065838f1b4d9f9d076d34f8c746708d271ca46fd3fbe0106cb87cc3247e87a902ac5d8cbce881106b6be913caf9e4acbddce1b63535d199c2e8d1f1e4386413076b74570b00ede3b9b694b2843c0b0f9aa5cd520b2ed3173ca6135f02b195906d4df3304042"
    ],
    [
      "0xDa469A6C78D12996895721fceBA62E510b38FAf3",
      "0xC16157e00b1bFf1522C6F01246B4Fb621dA048d0",
      true,
      {
        "type": "BigNumber",
        "hex": "0x01cdda4faccd0000"
      }
    ],
    []
  ],
  "names": [
    [
      "order",
      [
        "parameters",
        "numerator",
        "denominator",
        "signature",
        "extraData"
      ]
    ],
    [
      "params",
      [
        "fillTo",
        "refundTo",
        "revertIfIncomplete",
        "amount"
      ]
    ],
    [
      "fees",
      [
        "recipient",
        "amount"
      ]
    ]
  ]
}

Polygon

NFT mint
Overline NFT mint 
https://overline.network/en

Transaction
https://polygonscan.com/tx/0x4ec7a561c37dca1d26208ad7b05fbb30dfad122cc71f647c78488740538a1a65

Input data in bytecode:
0x3c168eab0000000000000000000000006582da7e09056f388873950aac8deb99ed9082880000000000000000000000000000000000000000000000000000000000000001

ABI Function:
{  
"method": "mintNFT",  
"types": [  
"address",  
"uint256"  
],  
"inputs": [  
"6582da7e09056f388873950aac8DeB99eD908288",  
{  
"type": "BigNumber",  
"hex": "0x01"  
}  
],  
"names": [  
"to",  
"numberOfTokens"  
]  
}
USDC to KNOT token swap through Quickswap
Karmaverse USDC to KNOT token swap through Quickswap 
https://karmaverse.io/

Transaction
https://polygonscan.com/tx/0xf1cac6306b8bd547b7e6b9779e0ecdeeb102db3a74fa7b78b850d018e7b0f40f

Input data in bytecode:
0x1927e4d800000000000000000000000000000000000000000000011c94f9415fca610000000000000000000000000000000000000000000000000000000000000625fb8f000000000000000000000000000000000000000000000000000000000000008000000000000000000000000033137dc45ddeefaf09949d5e2eea972714bf50f300000000000000000000000000000000000000000000000000000000000000020000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa84174000000000000000000000000b763f1177e9b2fb66fbe0d50372e3e2575c043e5

ABI Function:
{  
"method": "flashPurchaseToken",  
"types": \[  
"uint256",  
"uint256",  
"address\[]",  
"address"  
],  
"inputs": \[  
{  
"type": "BigNumber",  
"hex": "0x011c94f9415fca610000"  
},  
{  
"type": "BigNumber",  
"hex": "0x0625fb8f"  
},  
[  
"2791Bca1f2de4661ED88A30C99A7a9449Aa84174",  
"b763F1177E9B2Fb66FBe0d50372E3e2575c043e5"  
],  
"33137DC45DdEeFaF09949D5e2EEA972714Bf50F3"  
],  
"names": [  
"amountOut",  
"amountInMax",  
"path",  
"to"  
]  
}
NFT bundle purchase with $MSU token swap
Metasoccer NFT bundle purchase with $MSU token swap 
https://metasoccer.com/

Transaction
https://polygonscan.com/tx/0xcaa648c827ba941225f6d60411aeb500cf2ba4f80f07ad3c1f7dc6e14a288382

Input data in bytecode:
  0xea2d2f450000000000000000000000006ad7a511e911f68cd6fa4c5cb08c5fc34dc5d3740000000000000000000000000000000000000000000000000000000031e9986a0000000000000000000000006f5d7ba06ad7b28319d86fcec09fae5bbc83d32f00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000bda0000000000000000000000000000000000000000000000000000000000000d8a7000000000000000000000000000000000000000000000000000000000000defc000000000000000000000000000000000000000000000000000000000000f6bc00000000000000000000000000000000000000000000000000000000000138f40000000000000000000000000000000000000000000000000000000000013cad00000000000000000000000000000000000000000000000000000000000146d10000000000000000000000000000000000000000000000000000000000014982000000000000000000000000000000000000000000000000000000000001653a00000000000000000000000000000000000000000000000000000000000167cf00000000000000000000000000000000000000000000000000000000000195ed000000000000000000000000000000000000000000000000000000000001964300000000000000000000000000000000000000000000000000000000000197250000000000000000000000000000000000000000000000000000000000019fe4000000000000000000000000000000000000000000000000000000000001bbed000000000000000000000000000000000000000000000000000000000001bd99000000000000000000000000000000000000000000000000000000000001bde8

ABI Function:
  {  
  "method": "purchaseBundle",  
  "types": \[  
  "address",  
  "uint256",  
  "address",  
  "uint256\[]"  
  ],  
  "inputs": \[  
  "6AD7A511e911F68cD6fA4c5Cb08C5Fc34DC5D374",  
  {  
  "type": "BigNumber",  
  "hex": "0x31e9986a"  
  },  
  "6f5D7bA06aD7B28319d86fceC09fae5bbC83d32F",  
  [  
  {  
  "type": "BigNumber",  
  "hex": "0xbda0"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0xd8a7"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0xdefc"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0xf6bc"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x0138f4"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x013cad"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x0146d1"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x014982"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x01653a"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x0167cf"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x0195ed"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x019643"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x019725"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x019fe4"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x01bbed"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x01bd99"  
  },  
  {  
  "type": "BigNumber",  
  "hex": "0x01bde8"  
  }  
  ]  
  ],  
  "names": [  
  "_recipient",  
  "_totalPayableTokenAmount",  
  "_nft",  
  "_assetIds"  
  ]  
  }
UNIswap on Polygon for Vicicoin
UNIswap on Polygon for Vicicoin

Transaction
https://polygonscan.com/tx/0xe21ff8d51f300831b61671e266a256b70dae0b5e5600252b2a766fcc3e2ae55f

Input data in bytecode:
0xc04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000064da86fdba61d3de7bc0ed6d11176a5044c466390000000000000000000000000000000000000000000000000000000064f5af71000000000000000000000000000000000000000000000017c3dfb069929e1800000000000000000000000000000000000000000000000002b799b6e279d4d78a00000000000000000000000000000000000000000000000000000000000000420d500b1d8e8ef31e21c99d1db9a6444d3adf12700001f42791bca1f2de4661ed88a30c99a7a9449aa84174000bb88a16d4bf8a0a716017e8d2262c4ac32927797a2f000000000000000000000000000000000000000000000000000000000000

ABI Function:
{
  "method": "exactInput",
  "types": [
    "(bytes,address,uint256,uint256,uint256)"
  ],
  "inputs": [
    [
      "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf12700001f42791bca1f2de4661ed88a30c99a7a9449aa84174000bb88a16d4bf8a0a716017e8d2262c4ac32927797a2f",
      "0x64dA86fdba61d3DE7bc0ED6D11176a5044c46639",
      {
        "type": "BigNumber",
        "hex": "0x64f5af71"
      },
      {
        "type": "BigNumber",
        "hex": "0x17c3dfb069929e1800"
      },
      {
        "type": "BigNumber",
        "hex": "0x02b799b6e279d4d78a"
      }
    ]
  ],
  "names": [
    [
      "params",
      [
        "path",
        "recipient",
        "deadline",
        "amountIn",
        "amountOutMinimum"
      ]
    ]
  ]
}
UNIswap on Polygon for Dolz
UNIswap on Polygon for Dolz

Transaction
https://polygonscan.com/tx/0xeff0f818fa9f6bc8f43df0a0059165b5014f24ca820b237f0d69a21afdfd05ce

Input data in bytecode:
0xb9ea2f4b00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000c2132d05d31c914a87c6611c10748aeb04b58e8f0000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000006ab4e20f36ca48b61ecd66c0450fdf665fa130be000000000000000000000000000000000000000000000000000000000000012c0000000000000000000000001b7694e960cb993c235e1d4565ec6c476a6ff137

ABI Function:
{
  "method": "swapExactInputMultihop",
  "types": [
    "uint24",
    "address",
    "uint24",
    "address",
    "uint24",
    "address"
  ],
  "inputs": [
    500,
    "c2132D05D31c914a87C6611C10748AEb04B58e8F",
    3000,
    "6ab4E20f36ca48B61ECd66c0450fDf665Fa130be",
    300,
    "1b7694e960cb993C235e1D4565eC6c476a6FF137"
  ],
  "names": [
    "_firstFee",
    "_multihopToken",
    "_secondFee",
    "_tokenToReceive",
    "_additionnalDeadline",
    "_receiver"
  ]
}

Tezos

Gen1 NFT mint
Playstables Gen1 NFT mint 
https://www.playstables.io/

Transaction
https://tzkt.io/oo57FmVtc5jE5SyGbk7FSvg8YZfrdKHSRKhB72jPQCaANGSUtgs/12924024

Input data HEX:
7B0A22656E747279706F696E74223A0A226372656174655F6F726465725F666F72222C0A2276616C7565223A0A7B0A22737472696E67223A0A22747A325061647768553878616F50316D626E786A38357043487A6673576B44725035424E220A7D0A7D

Michelson encoded as JSON:
{
"entrypoint":
"create_order_for",
"value":
{
"string":
"tz2PadwhU8xaoP1mbnxj85pCHzfsWkDrP5BN"
}
}
Secondary sale
Secondary sale through Plenty wallet on Objkt NFT Marketplace 
https://plenty.network/

Transaction
https://tzkt.io/ooEAReC1CvfPHPGSLNNC5XdHF3ytPFMSKLfHNUy85oX5WtUS9o1/12924386

Input data HEX:
7B0A22656E747279706F696E74223A0A2266756C66696C6C5F61736B222C0A2276616C7565223A0A7B0A227072696D223A0A2250616972222C0A2261726773223A0A5B0A7B0A22696E74223A0A2233323132373730220A7D2C0A7B0A227072696D223A0A22536F6D65222C0A2261726773223A0A5B0A7B0A22737472696E67223A0A22747A32544B664B504A31764D737A6D4832706546717950353532506F6F4C553938513278220A7D0A5D0A7D0A5D0A7D0A7D

Michelson encoded as JSON:
{
"entrypoint":
"fulfill_ask",
"value":
{
"prim":
"Pair",
"args":
[
{
"int":
"3212770"
},
{
"prim":
"Some",
"args":
[
{
"string":
"tz2TKfKPJ1vMszmH2peFqyP552PooLU98Q2x"
}
]
}
]
}
}
Item purchase on Dogami NFT marketplace using $DOGA token
Item purchase on Dogami NFT marketplace using $DOGA token 
https://dogami.com/

Transaction
https://tzkt.io/opZQk2oRBrMXVj3yXSBYXd5ngSHyNUf5pK7Nhe6qo4yakQ6G3xh/61665636

Input data HEX:
7b0d0a22656e747279706f696e74223a0d0a22617070726f7665222c0d0a2276616c7565223a0d0a7b0d0a227072696d223a0d0a2250616972222c0d0a2261726773223a0d0a5b0d0a7b0d0a22737472696e67223a0d0a224b5431486e5636574a464c6b734c614c5a524c636b31545834536262635458554c583974220d0a7d2c0d0a7b0d0a22696e74223a0d0a2230220d0a7d0d0a5d0d0a7d0d0a7d

Michelson encoded as JSON:
{
"entrypoint":
"approve",
"value":
{
"prim":
"Pair",
"args":
[
{
"string":
"KT1HnV6WJFLksLaLZRLck1TX4SbbcTXULX9t"
},
{
"int":
"0"
}
]
}
}

Concordium

Concordium entrypoint

As sc_input_data you should send data that will be added to the transaction to your contract and that will be used to call on your contract.

It should be sent as a hex and contain an entrypoint, method, and parameters to be called on a contract.

Example:

7b22656e747279706f696e74223a227472616465722e627579222c22706172616d73223a22307836313035303030303030303030303030227d

Which, when decoded, would look like this:

 {"entrypoint":"trader.buy","params":"0x6105000000000000"}

The entry point is the contract name, and the method is divided by a dot. This format is the only available way to call the contract method based on their protocol.


Documentation related to this page