Skip to content

Deploy Smart Contract

To deploy a smart contract to the selected blockchain, you can use the deployContract wallet method.

import { ChainId, KriptonioSdk } from '@kriptonio/sdk';
 
const sdk = new KriptonioSdk({
  accessToken: 'your-access-token',
});
 
const wallet = await sdk.wallet.generate({
  chainId: ChainId.BaseSepolia,
  type: 'kernel',
});
 

const deployment = await wallet.deployContract({
  bytecode: '0x...',
  value: 0n, // optional
});

Deployment object contains address of the deployed contract and hash which is a transaction hash of the deployment transaction.