signandsendTransaction params

Hello,

I am trying to call following method

    connection?.signAndSendTransaction(
            String(account),
            AccountTransactionType.Update,
            contractUpdatePayload(CcdAmount.fromMicroCcd(0), contract, 'mint'),
             {
                parameters: mintParameters,schema:typeSchemaFromBase64("8DAQAAABAAAABjaXMyX2R5bmFtaW")
            } 
        );

but get following error

The given transaction is not valid due to: Error: Unable to serialize value due to: Parsing failed
at ob.sendTransaction (chrome-extension://mnnkpffndmickbiakofclnpoiajlegmg/inject.js:14:8000)

The mintParameters is following

const mintParameters = {
        "owner": {
        
         "Account": ["3SfHLNkmy61ZUQkAhMvAwKj47EYDBiUPbn3wHghFD6qGr8WDGc"]
        
       },
    "tokens": [
        [
            "06",
            {
                "metadata_url": [
                    {
                        
                        "hash": {
                            "Some": [
                                "QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW"
                            ]
                        },
                        "url": "https://silver-tough-swordtail-947.mypinata.cloud/ipfs/QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW"
                    }
                ],
                "token_amount": "1"
            }
        ]
        ]
    }

Hi there!

Which contract are you trying to invoke ‘mint’ on? It would be helpful to see the code defining the parameter expected by the endpoint.

Hello,

its a dnft example you can see the code here

muniryasir/d-nft_v2 (github.com)

I can execute all methods via cli and sctools.mainnet.concordium.software index is 9583

For front end code i am trying to create a very simple example, I used piggybank as starting point and just trying to pass parameters for mint. to statement above when invoking the contract

I am basically doing the same thing as shown

concordium-smart-contract-tools/front-end-tools/src/writing_to_blockchain.ts at main · Concordium/concordium-smart-contract-tools (github.com)

Okay. If you succeed with the parameters supplied when using the concordium client and sc-tools they should be OK. They also look correct when comparing with the source code linked.

Are you sure you’re passing the correct schema to the function? Can you try to give it a module schema instead and see if that works?

How do I give it a module schema, pass the schema.bin file?

there should be a moduleSchemaFromBase64 function in @concordium/wallet-connectors or @concordium/react-components. You pass this function a base64 representation of the schema.

You might be able to get the base64 string by executing

cat schema.bin | base64

Otherwise you could build the contract with the --schema-base64-out - argument. The - makes it write the schema to stdout, i.e. prints it in your terminal.

I get following

//8DAQAAABAAAABjaXMyX2R5bmFtaWNfbmZ0AA0AAAALAAAAYWRkTWV0YWRhdGEEFAABAAAABgAA

AHRva2VucxICHQAUAAIAAAADAAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5vbmUCBAAAAFNvbWUB

AQAAAB4gAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1bmRzAgwA

AABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMCBwAAAExv

Z0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VDb250cmFj

dEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIJAAAAYmFsYW5jZU9mBhABFAACAAAA

CAAAAHRva2VuX2lkHQAHAAAAYWRkcmVzcxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJh

Y3QBAQAAAAwQARslAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1

bmRzAgwAAABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMC

BwAAAExvZ0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VD

b250cmFjdEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIEAAAAbWludAQUAAIAAAAF

AAAAb3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAMBgAAAHRva2Vu

cxICHQAUAAIAAAAMAAAAdG9rZW5fYW1vdW50GyUAAAAMAAAAbWV0YWRhdGFfdXJsEAIUAAIAAAAD

AAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5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lkHQAGAAAAYW1vdW50GyUAAAAFAAAA

b3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAM/gQAAABNaW50AAMA

AAAIAAAAdG9rZW5faWQdAAYAAABhbW91bnQbJQAAAAUAAABvd25lchUCAAAABwAAAEFjY291bnQB

AQAAAAsIAAAAQ29udHJhY3QBAQAAAAz/CAAAAFRyYW5zZmVyAAQAAAAIAAAAdG9rZW5faWQdAAYA

AABhbW91bnQbJQAAAAQAAABmcm9tFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250cmFjdAEB

AAAADAIAAAB0bxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJhY3QBAQAAAAw=

I believe each line represent a schema for different contract method, in react components the method i believe is typeSchemaFromBase64. The error persists

Im not sure that each line represents an individual entity in the contract, but I could be wrong. Anyhow, when using the entire module schema you’d have to use the function moduleSchemaFromBase64 to construct the schema parameter instead, as otherwise (if you use typeSchemaFromBase64 ) the function will definitely fail.

I ran two tests

  1. One line of Scheme with method moduleSchemaFromBase64 I get following error

ERROR
The given transaction is not valid due to: Error: Unable to serialize parameters, due to: Parse error
at ob.sendTransaction (chrome-extension://mnnkpffndmickbiakofclnpoiajlegmg/inject.js:14:8000)

  1. The whole schema, please see the code
        const base64_module = `//8DAQAAABAAAABjaXMyX2R5bmFtaWNfbmZ0AA0AAAALAAAAYWRkTWV0YWRhdGEEFAABAAAABgAA
AHRva2VucxICHQAUAAIAAAADAAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5vbmUCBAAAAFNvbWUB
AQAAAB4gAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1bmRzAgwA
AABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMCBwAAAExv
Z0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJ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            String(account),
            AccountTransactionType.Update,
            contractUpdatePayload(CcdAmount.fromMicroCcd(0), contract, 'mint'),
             {
                parameters: mintParameters,schema:moduleSchemaFromBase64(base64_module)
            } 
        );

I get following error

ERROR
The provided schema '//8DAQAAABAAAABjaXMyX2R5bmFtaWNfbmZ0AA0AAAALAAAAYWRkTWV0YWRhdGEEFAABAAAABgAA
AHRva2VucxICHQAUAAIAAAADAAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5vbmUCBAAAAFNvbWUB
AQAAAB4gAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1bmRzAgwA
AABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMCBwAAAExv
Z0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VDb250cmFj
dEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIJAAAAYmFsYW5jZU9mBhABFAACAAAA
CAAAAHRva2VuX2lkHQAHAAAAYWRkcmVzcxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJh
Y3QBAQAAAAwQARslAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1
bmRzAgwAAABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMC
BwAAAExvZ0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VD
b250cmFjdEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIEAAAAbWludAQUAAIAAAAF
AAAAb3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAMBgAAAHRva2Vu
cxICHQAUAAIAAAAMAAAAdG9rZW5fYW1vdW50GyUAA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HAAAAQWNjb3VudAEBAAAACwgAAABDb250
cmFjdAEBAAAADP0EAAAAQnVybgADAAAACAAAAHRva2VuX2lkHQAGAAAAYW1vdW50GyUAAAAFAAAA
b3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAM/gQAAABNaW50AAMA
AAAIAAAAdG9rZW5faWQdAAYAAABhbW91bnQbJQAAAAUAAABvd25lchUCAAAABwAAAEFjY291bnQB
AQAAAAsIAAAAQ29udHJhY3QBAQAAAAz/CAAAAFRyYW5zZmVyAAQAAAAIAAAAdG9rZW5faWQdAAYA
AABhbW91bnQbJQAAAAQAAABmcm9tFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250cmFjdAEB
AAAADAIAAAB0bxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJhY3QBAQAAAAw=' is not valid base64
Error: The provided schema '//8DAQAAABAAAABjaXMyX2R5bmFtaWNfbmZ0AA0AAAALAAAAYWRkTWV0YWRhdGEEFAABAAAABgAA
AHRva2VucxICHQAUAAIAAAADAAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5vbmUCBAAAAFNvbWUB
AQAAAB4gAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1bmRzAgwA
AABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMCBwAAAExv
Z0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VDb250cmFj
dEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIJAAAAYmFsYW5jZU9mBhABFAACAAAA
CAAAAHRva2VuX2lkHQAHAAAAYWRkcmVzcxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJh
Y3QBAQAAAAwQARslAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc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29udHJh
Y3QBAQAAAAwGAAAAdG9rZW5zEAIdAAEfBQAAAPsNAAAAVG9rZW5NZXRhZGF0YQACAAAACAAAAHRv
a2VuX2lkHQAMAAAAbWV0YWRhdGFfdXJsFAACAAAAAwAAAHVybBYBBAAAAGhhc2gVAgAAAAQAAABO
b25lAgQAAABTb21lAQEAAAAeIAAAAPwOAAAAVXBkYXRlT3BlcmF0b3IAAwAAAAYAAAB1cGRhdGUV
AgAAAAYAAABSZW1vdmUCAwAAAEFkZAIFAAAAb3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAA
AENvbnRyYWN0AQEAAAAMCAAAAG9wZXJhdG9yFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250
cmFjdAEBAAAADP0EAAAAQnVybgADAAAACAAAAHRva2VuX2lkHQAGAAAAYW1vdW50GyUAAAAFAAAA
b3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAM/gQAAABNaW50AAMA
AAAIAAAAdG9rZW5faWQdAAYAAABhbW91bnQbJQAAAAUAAABvd25lchUCAAAABwAAAEFjY291bnQB
AQAAAAsIAAAAQ29udHJhY3QBAQAAAAz/CAAAAFRyYW5zZmVyAAQAAAAIAAAAdG9rZW5faWQdAAYA
AABhbW91bnQbJQAAAAQAAABmcm9tFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250cmFjdAEB
AAAADAIAAAB0bxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJhY3QBAQAAAAw=' is not valid base64
    at schemaAsBuffer (http://localhost:3000/static/js/bundle.js:3787:11)
    at moduleSchemaFromBase64 (http://localhost:3000/static/js/bundle.js:3745:23)
    at handleTransaction (http://localhost:3000/main.6d9cdf73451a9f3ba6fa.hot-update.js:215:99)
    at onClick (http://localhost:3000/main.6d9cdf73451a9f3ba6fa.hot-update.js:298:24)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:50955:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:50999:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:51056:35)
    at invokeGuardedCallbackAndCatchFirstError (http://localhost:3000/static/js/bundle.js:51070:29)
    at executeDispatch (http://localhost:3000/static/js/bundle.js:55214:7)
    at processDispatchQueueItemsInOrder (http://localhost:3000/static/js/bundle.js:55240:11)

I took the liberty of formatting your post’s code snippets in code blocks (``` around the code) and I noticed you use a multiline string literal for the schema. This could explain the base64 validation error. Try defining the schema with quotes instead.

    const mintParameters = {
        "owner": {
        
         "Account": ["3SfHLNkmy61ZUQkAhMvAwKj47EYDBiUPbn3wHghFD6qGr8WDGc"]
        
       },
    "tokens": [
        [
            "06",
            {
                "metadata_url": [
                    {
                        
                        "hash": {
                            "Some": [
                                "QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW"
                            ]
                        },
                        "url": "https://silver-tough-swordtail-947.mypinata.cloud/ipfs/QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW"
                    }
                ],
                "token_amount": "1"
            }
        ]
        ]
    }
        const base64_module = '//8DAQAAABAAAABjaXMyX2R5bmFtaWNfbmZ0AA0AAAALAAAAYWRkTWV0YWRhdGEEFAABAAAABgAA\
AHRva2VucxICHQAUAAIAAAADAAAAdXJsFgEEAAAAaGFzaBUCAAAABAAAAE5vbmUCBAAAAFNvbWUB\
AQAAAB4gAAAAFQQAAAAOAAAASW52YWxpZFRva2VuSWQCEQAAAEluc3VmZmljaWVudEZ1bmRzAgwA\
AABVbmF1dGhvcml6ZWQCBgAAAEN1c3RvbQEBAAAAFQYAAAALAAAAUGFyc2VQYXJhbXMCBwAAAExv\
Z0Z1bGwCDAAAAENvbnRyYWN0T25seQIMAAAATG9nTWFsZm9ybWVkAhMAAABJbnZva2VDb250cmFj\
dEVycm9yAhcAAABVcGdyYWRlVG9rZW5GYWlsZWRFcnJvcgIJAAAAYmFsYW5jZU9mBhABFAAC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WlsZWRFcnJvcgIEAAAAdmlldwEUAAIAAAAFAAAAc3RhdGUQAg8V\
AgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAMFAACAAAACAAAAGJhbGFuY2Vz\
EAIPHQAbJQAAAAkAAABvcGVyYXRvcnMQAhUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJh\
Y3QBAQAAAAwGAAAAdG9rZW5zEAIdAAEfBQAAAPsNAAAAVG9rZW5NZXRhZGF0YQACAAAACAAAAHRv\
a2VuX2lkHQAMAAAAbWV0YWRhdGFfdXJsFAACAAAAAwAAAHVybBYBBAAAAGhhc2gVAgAAAAQAAABO\
b25lAgQAAABTb21lAQEAAAAeIAAAAPwOAAAAVXBkYXRlT3BlcmF0b3IAAwAAAAYAAAB1cGRhdGUV\
AgAAAAYAAABSZW1vdmUCAwAAAEFkZAIFAAAAb3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAA\
AENvbnRyYWN0AQEAAAAMCAAAAG9wZXJhdG9yFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250\
cmFjdAEBAAAADP0EAAAAQnVybgADAAAACAAAAHRva2VuX2lkHQAGAAAAYW1vdW50GyUAAAAFAAAA\
b3duZXIVAgAAAAcAAABBY2NvdW50AQEAAAALCAAAAENvbnRyYWN0AQEAAAAM/gQAAABNaW50AAMA\
AAAIAAAAdG9rZW5faWQdAAYAAABhbW91bnQbJQAAAAUAAABvd25lchUCAAAABwAAAEFjY291bnQB\
AQAAAAsIAAAAQ29udHJhY3QBAQAAAAz/CAAAAFRyYW5zZmVyAAQAAAAIAAAAdG9rZW5faWQdAAYA\
AABhbW91bnQbJQAAAAQAAABmcm9tFQIAAAAHAAAAQWNjb3VudAEBAAAACwgAAABDb250cmFjdAEB\
AAAADAIAAAB0bxUCAAAABwAAAEFjY291bnQBAQAAAAsIAAAAQ29udHJhY3QBAQAAAAw='
        
        connection?.signAndSendTransaction(
            String(account),
            AccountTransactionType.Update,
            contractUpdatePayload(CcdAmount.fromMicroCcd(0), contract, 'mint'),
             {
                parameters: mintParameters,schema:moduleSchemaFromBase64(base64_module)
            } 
        );

Modified code to above, error now

ERROR
The given transaction is not valid due to: Error: Unable to serialize parameters, due to: Unable to find contract schema in module schema
at ob.sendTransaction (chrome-extension://mnnkpffndmickbiakofclnpoiajlegmg/inject.js:14:8000)

Okay. Can you tell me what is returned when you invoke

contractUpdatePayload(CcdAmount.fromMicroCcd(0), contract, 'mint')

The error could suggest that you’re specifying the wrong contract name for the entrypoint.

Alternatively, we recommend using @concordium/ccd-js-gen to generate a contract client for you for a more frictionless experience when integrating with smart contracts.

1 Like

It worked the issue was in the method you pointed out and the fix is below

  function contractUpdatePayload(amount: CcdAmount.Type, contract: any, method: string) {
        return {
            amount,
            address: ContractAddress.create(contract.index, 0),
            receiveName: ReceiveName.create(ContractName.fromString(contract.name), EntrypointName.fromString(method)),
            maxContractExecutionEnergy: Energy.create(MAX_CONTRACT_EXECUTION_ENERGY),
        };
    }

I needed to use the ContractName type, otherwise contract name would be undefined, thx for all the help

Great to hear you got it working!

1 Like