Add budget example

This commit is contained in:
Michael Vines
2018-09-19 17:35:16 -07:00
parent a96ab72e8e
commit 864940f63b
3 changed files with 125 additions and 2 deletions

View File

@ -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),
});

View File

@ -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';