mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
*: support customisable NotaryServiceFeePerKey value
* Add corresponding methods to Notary contract. * Extend RPC Client API. * Adjust tests.
This commit is contained in:
parent
26b76ed858
commit
92282c70cb
14 changed files with 157 additions and 48 deletions
|
@ -878,7 +878,11 @@ func (c *Client) CalculateNotaryFee(nKeys uint8) (int64, error) {
|
|||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to get FeePerByte: %w", err)
|
||||
}
|
||||
return int64((nKeys+1))*transaction.NotaryServiceFeePerKey + // fee for NotaryAssisted attribute
|
||||
feePerKey, err := c.GetNotaryServiceFeePerKey()
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to get NotaryServiceFeePerKey: %w", err)
|
||||
}
|
||||
return int64((nKeys+1))*feePerKey + // fee for NotaryAssisted attribute
|
||||
fee.Opcode(baseExecFee, // Notary node witness
|
||||
opcode.PUSHDATA1, opcode.RET, // invocation script
|
||||
opcode.PUSH0, opcode.SYSCALL, opcode.RET) + // System.Contract.CallNative
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue