Deploy Contract

The "Deploy Contract" feature in the KrypC wallet-dev Service API enables users to seamlessly deploy smart contracts on the blockchain, facilitating the creation and execution of decentralised applications.

This Deploys contract using this method.

API Specification

Deploy Contract

POST https://api.krypcore.com/api/v0/devWallet/deployContract

To deploy Contract API under the given instance.

Headers

NameTypeDescription

DappId*

String

DappId

Authorization*

String

User Auth key obtained

ChainId

String

ChainId

SubscriptionId

String

SubscriptionId

Request Body

NameTypeDescription

service*

String

service

privateKey*

String

private key

byteCode*

String

bytecode

abi*

String

abi

params*

String

params

chainId*

String

chainId


{
    "Data": {
        "contractAddress": "0xAa79a01409D842aD3F6ec0xxxxxxxxxxxxxxx",
        "txHash": "0x1cd443b4573eddcd5e518d1ab31916xxxxxxxxxxxxxxxxxxxxx"
    },
    "Message": "Signed and executed txn successfully",
    "Status": "SUCCESS"
}

Take a look at how you might call this method using our official libraries, or via curl

Here, "abi" will be in json format which we need to convert to base64.


curl --location 'https://api.krypcore.com/api/v0/devWallet/deployContract' \
--header 'DappId: **********' \
--header 'Authorization: **********' \
--header 'SubscriptionId: ********' \
--header 'ChainId: ********' \
--header 'Content-Type: application/json' \
--data '{
    "service": "easy-nft",
    "privateKey": "**********",
    "byteCode":" ",
    "abi":" ",
    "params":[],
    "chainId":80001
}'

Last updated