I am using '@taquito/rpc' functions such as forgeOperations, sign('@taquio/signer') and injectOperation to deploy a contract.
I would like to know the contents to be included to originate a contract and generate KT1 addresses.
{
"branch" : "BL9AfayRB7QB8LcRgNNbBZNWzgvs7YpShSqtdGkA3gUaT5uRAgi",
"contents": [
{
"kind": "reveal",
"fee": "374",
"public_key": "edpkuPKqseGYk8sM56F1wdbQBmFDMEY2UcLJeeyjLqbr5jvR7UzkPg",
"source": "tz1XEt22ftRSSGuD1yiCv3X1iGbyy8DLXqYp",
"gas_limit": "1100",
"storage_limit": "0",
"counter": "2"
},
{
"kind": "transaction",
"fee": "502",
"gas_limit": "1520",
"storage_limit": "0",
"amount": "5000000",
"destination": "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6",
"source": "tz1XEt22ftRSSGuD1yiCv3X1iGbyy8DLXqYp",
"counter": "3"
}
]
}
Above one is the operation object I have constructed for transfer between two tz1 addresses. After constructing the operation object, I get forged bytes using forgeOperations function from '@taquito/rpc'. I pass these forged bytes to sign from '@taquito/sign' to get signOpBytes. I pass these sign opbytes to injectOperation function from '@taquito/rpc'. And then, my transfer will be broadcast, validated and update the balances.
I want to use same methodology to deploy a smart contract. So, I want to first create an operation object first to originate. Please help me construct. Thanks in advance.