// Sign a SmartContractDeploy
> myContract.sign({ from: '0x{address in hex}', gas: 1000000 }, 'constructor', byteCode, 123).then(console.log)
_type: 'TxTypeSmartContractDeploy',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e43', _r: '0xeb6b5...', _s: '0x5e4f9...' } ],
_gasPrice: '0x5d21dba00',
// Sign a FeeDelegatedSmartContractDeploy
> myContract.sign({ from: '0x{address in hex}', feeDelegation: true, gas: 1000000 }, 'constructor', byteCode, 123).then(console.log)
FeeDelegatedSmartContractDeploy {
_type: 'TxTypeFeeDelegatedSmartContractDeploy',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e43', _r: '0xee0f5...', _s: '0x31cbf...' } ],
_feePayer: '0x0000000000000000000000000000000000000000',
_feePayerSignatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_gasPrice: '0x5d21dba00',
// Sign a FeeDelegatedSmartContractDeployWithRatio
> myContract.sign({ from: keyring.address, feeDelegation: true, feeRatio: 30, gas: 1000000 }, 'constructor', byteCode, 123).then(console.log)
FeeDelegatedSmartContractDeployWithRatio {
_type: 'TxTypeFeeDelegatedSmartContractDeployWithRatio',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e44', _r: '0x4c2b0...', _s: '0x47df8...' } ],
_feePayer: '0x0000000000000000000000000000000000000000',
_feePayerSignatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_gasPrice: '0x5d21dba00',
// Sign a SmartContractExecution
> myContract.sign({ from: '0x{address in hex}', gas: 1000000 }, 'methodName', 123).then(console.log)
_type: 'TxTypeSmartContractExecution',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e44', _r: '0xb2846...', _s: '0x422c1...' } ],
_to: '0x361870b50834a6afc3358e81a3f7f1b1eb9c7e55',
_gasPrice: '0x5d21dba00',
// Sign a FeeDelegatedSmartContractExecution
from: '0x{address in hex}',
}, 'methodName', 123).then(console.log)
FeeDelegatedSmartContractExecution {
_type: 'TxTypeFeeDelegatedSmartContractExecution',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e43', _r: '0xf7676...', _s: '0x42673...' } ],
_feePayer: '0x0000000000000000000000000000000000000000',
_feePayerSignatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_to: '0x361870b50834a6afc3358e81a3f7f1b1eb9c7e55',
_gasPrice: '0x5d21dba00',
// Sign a FeeDelegatedSmartContractExecutionWithRatio
from: '0x{address in hex}',
}, 'methodName', 123).then(console.log)
FeeDelegatedSmartContractExecutionWithRatio {
_type: 'TxTypeFeeDelegatedSmartContractExecutionWithRatio',
_from: '0x69c3a6e3485446118d8081063dcef2e65b69ae91',
_signatures: [ SignatureData { _v: '0x4e44', _r: '0x58b06...', _s: '0x637ff...' } ],
_feePayer: '0x0000000000000000000000000000000000000000',
_feePayerSignatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_to: '0x361870b50834a6afc3358e81a3f7f1b1eb9c7e55',
_gasPrice: '0x5d21dba00',