Add budget example
This commit is contained in:
@ -118,6 +118,14 @@ export class BudgetContract {
|
||||
return '4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM';
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount of space this contract requires
|
||||
*/
|
||||
static get space(): number {
|
||||
return 128;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a timestamp condition
|
||||
*/
|
||||
@ -196,7 +204,7 @@ export class BudgetContract {
|
||||
|
||||
return new Transaction({
|
||||
fee: 0,
|
||||
keys: [from, contract],
|
||||
keys: [from, contract, to],
|
||||
contractId: this.contractId,
|
||||
userdata: userdata.slice(0, pos),
|
||||
});
|
||||
@ -217,7 +225,7 @@ export class BudgetContract {
|
||||
|
||||
return new Transaction({
|
||||
fee: 0,
|
||||
keys: [from, to],
|
||||
keys: [from, contract, to],
|
||||
contractId: this.contractId,
|
||||
userdata: userdata.slice(0, pos),
|
||||
});
|
||||
|
@ -2,3 +2,5 @@
|
||||
export {Account} from './account';
|
||||
export {Connection} from './connection';
|
||||
export {Transaction} from './transaction';
|
||||
export {SystemContract} from './system-contract';
|
||||
export {BudgetContract} from './budget-contract';
|
||||
|
Reference in New Issue
Block a user