Skip to content

Commit

Permalink
chore(loader): add rest of handlers to test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Jun 13, 2024
1 parent a763cd2 commit c02cd9a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
62 changes: 33 additions & 29 deletions ant/tools/load-process.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,39 @@ async function main() {

const address = '7waR8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5-5dV7nk';
const testCases = [
// ['Info', {}],
// ['Set-Controller', { Controller: ''.padEnd(43, '1') }],
//['Remove-Controller', { Controller: ''.padEnd(43, '1') }],
// ['Set-Name', { Name: 'Test Name' }],
// ['Set-Ticker', { Ticker: 'TEST' }],
// [
// 'Set-Record',
// {
// 'Transaction-Id': ''.padEnd(43, '1'),
// 'TTL-Seconds': '1000',
// 'Sub-Domain': '@',
// },
// ],
// [
// 'Set-Record',
// {
// 'Transaction-Id': ''.padEnd(43, '1'),
// 'TTL-Seconds': '1000',
// 'Sub-Domain': 'bob',
// },
// ],
// ['Remove-Record', { 'Sub-Domain': 'bob' }],
// ['Balance', {}],
// ['Balance', { Recipient: address }],
//['Balances', {}],
//['Get-Controllers', {}],
// ['Get-Records', {}],
// ['Get-Record', { 'Sub-Domain': '@' }],
// ['Initialize-State', {}],
['Info', {}],
['Set-Controller', { Controller: ''.padEnd(43, '1') }],
['Remove-Controller', { Controller: ''.padEnd(43, '1') }],
['Set-Name', { Name: 'Test Name' }],
['Set-Ticker', { Ticker: 'TEST' }],
[
'Set-Record',
{
'Transaction-Id': ''.padEnd(43, '1'),
'TTL-Seconds': '1000',
'Sub-Domain': '@',
},
],
[
'Set-Record',
{
'Transaction-Id': ''.padEnd(43, '1'),
'TTL-Seconds': '1000',
'Sub-Domain': 'bob',
},
],
['Remove-Record', { 'Sub-Domain': 'bob' }],
['Balance', {}],
['Balance', { Recipient: address }],
['Balances', {}],
['Get-Controllers', {}],
['Get-Records', {}],
['Get-Record', { 'Sub-Domain': '@' }],
['Initialize-State', {}],
['Transfer', { Recipient: 'iKryOeZQMONi2965nKz528htMMN_sBcjlhc-VncoRjA' }],
['Total-Supply', {}],
['Mint', {}],
['Burn', {}],
];

for (const [method, args] of testCases) {
Expand Down
4 changes: 2 additions & 2 deletions ant/tools/spawn-ant.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function main() {
//const processId = 'AxHXaiKg7c4FAYZ5eo4OPAaEhmB0I0PRxLqzW6ZNHXk';
console.log('Process ID:', processId);
console.log('Waiting 20 seconds to ensure process is readied.');
await new Promise((resolve) => setTimeout(resolve, 2_000));
await new Promise((resolve) => setTimeout(resolve, 20_000));
console.log('Continuing...');

const testCases = [
Expand Down Expand Up @@ -62,7 +62,7 @@ async function main() {
['Get-Records', {}],
['Get-Record', { 'Sub-Domain': '@' }],
['Initialize-State', {}],
['Transfer', { Recipient: 'iKryOeZQMONi2965nKz528htMMN_sBcjlhc-VncoRjA' }],
['Transfer', { Recipient: 'ZjmB2vEUlHlJ7-rgJkYP09N5IzLPhJyStVrK5u9dDEo' }],
];

for (const [method, args] of testCases) {
Expand Down

0 comments on commit c02cd9a

Please sign in to comment.