How get signature form message forms on Netherum

40 views Asked by At

Tell me how to get a message type signature on C# Netherum

enter image description hereenter image description here For regular messages I do this, but it's no different. Here's what I usually use

                string privateKeyHex = "72d09fdace341e58728b83eb18a97dfefe2b2ed64d04743630f6d69df63af658";
                string originalText = @"textMessage";
                string messageToSign = originalText.Replace("\r\n", "\n");
                //Signature
                var key = new EthECKey(privateKeyHex);
                var signer = new EthereumMessageSigner();
                string signature = signer.EncodeUTF8AndSign(messageToSign, key);
                return signature;`

in the request that is sent there is a date of the form, as far as I understand, the first part is ABI, but I just can’t understand how to form it

"data": { "domain": { "name": "snapshot", "version": "0.1.4" }, "types": { "Vote": [{ "name": "from", "type": "address" }, { "name": "space", "type": "string" }, { "name": "timestamp", "type": "uint64" }, { "name": "proposal", "type": "bytes32" }, { "name": "choice", "type": "uint32" }, { "name": "reason", "type": "string" }, { "name": "app", "type": "string" }, { "name": "metadata", "type": "string" } ] }, "message": { "space": "servise.eth", "proposal": "0xcd749b3b1caea7f5f2ecc3d1270eb2f938819f015d4410e5e07f77cab47e9ec9", "choice": 2, "app": "appVote", "reason": "", "metadata": "{}", "from": "0x8A652fd68C4702AB7Eeba24e21611c2B81dc4596", "timestamp": 1695386652 } }

0

There are 0 answers