아래는 caver 예제내용인데요, 아래와같이 설정하실 수 있습니다. IDE에서는 gasLimit이라는 필드를 이용해서 설정할수 있도록 되어있는거 같아요
// This example uses the FeeDelegatedValueTransfer transaction.
> const transaction = caver.transaction.feeDelegatedValueTransfer.create({
from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
value: 1,
gas: 30000,
})
> const customHasher = () => { ... }
// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey
> transaction.signAsFeePayer(roleBasedKeyring).then(console.log)
FeeDelegatedValueTransfer {
_type: 'TxTypeFeeDelegatedValueTransfer',
_from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
_gas: '0x7530',
_signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
_feePayerSignatures: [
SignatureData { _v: '0x4e44', _r: '0x7010e...', _s: '0x65d6b...' },
SignatureData { _v: '0x4e43', _r: '0x96ef2...', _s: '0x77f34...' }
],
_to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
_value: '0x1',
_chainId: '0x2710',
_gasPrice: '0x5d21dba00',
_nonce: '0x0'
}
// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey and index
> transaction.signAsFeePayer(roleBasedKeyring, 1).then(console.log)
FeeDelegatedValueTransfer {
_type: 'TxTypeFeeDelegatedValueTransfer',
_from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
_gas: '0x7530',
_signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
_feePayerSignatures: [
SignatureData { _v: '0x4e43', _r: '0x96ef2...', _s: '0x77f34...' }
],
_to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
_value: '0x1',
_chainId: '0x2710',
_gasPrice: '0x5d21dba00',
_nonce: '0x0'
}
// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey and hasher
> transaction.signAsFeePayer(roleBasedKeyring, customHasher).then(console.log)
FeeDelegatedValueTransfer {
_type: 'TxTypeFeeDelegatedValueTransfer',
_from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
_gas: '0x7530',
_signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
_feePayerSignatures: [
SignatureData { _v: '0x4e43', _r: '0xe48bf...', _s: '0x1cf36...' },
SignatureData { _v: '0x4e43', _r: '0x82976...', _s: '0x3c5e0...' }
],
_to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
_value: '0x1',
_chainId: '0x2710',
_gasPrice: '0x5d21dba00',
_nonce: '0x0'
}
// Sign a transaction with the address of RoleBasedKeyring which use two private keys for roleFeePayerKey, index and hasher
> transaction.signAsFeePayer(roleBasedKeyring, 1, customHasher).then(console.log)
FeeDelegatedValueTransfer {
_type: 'TxTypeFeeDelegatedValueTransfer',
_from: '0x6fddbcb99d31b8755c2b840a367f53eea4b4f45c',
_gas: '0x7530',
_signatures: [ SignatureData { _v: '0x01', _r: '0x', _s: '0x' } ],
_feePayer: '0xe7e9184c125020af5d34eab7848bab799a1dcba9',
_feePayerSignatures: [
SignatureData { _v: '0x4e43', _r: '0x82976...', _s: '0x3c5e0...' }
],
_to: '0x3424b91026bdc5ec55df4548e6ebf0f28b60abd7',
_value: '0x1',
_chainId: '0x2710',
_gasPrice: '0x5d21dba00',
_nonce: '0x0'
}