Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0: Convert algod responses to typed #776

Merged
merged 58 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4d83ddb
Merge branch 'release/v1.16.0'
algojack May 2, 2022
cfd5b88
Merge branch 'release/v1.17.0'
onetechnical Jun 2, 2022
b31187f
Merge branch 'release/v1.18.0'
algojack Jun 22, 2022
2b36126
Merge branch 'release/v1.18.1'
algolucky Jul 5, 2022
0d7608a
Merge branch 'release/v1.19.0'
algojack Jul 21, 2022
ea72af2
Merge branch 'release/v1.19.1'
algobarb Aug 22, 2022
be3fdd3
Merge branch 'release/v1.20.0'
egieseke Sep 6, 2022
98243e5
Merge branch 'release/v1.21.0'
algojack Sep 19, 2022
26affb5
Merge branch 'release/v1.22.0'
egieseke Oct 12, 2022
f229953
Merge branch 'release/v1.23.0'
algobarb Nov 2, 2022
8504afd
Merge branch 'release/v1.23.1'
algobarb Nov 3, 2022
c8d1d0a
Merge branch 'release/v1.23.2'
algolucky Nov 10, 2022
607515e
Merge branch 'release/v1.24.0'
algolucky Dec 5, 2022
db8a746
Merge branch 'release/v1.24.1'
algojack Dec 15, 2022
5eb7b4f
Merge branch 'release/v2.0.0'
algobarb Jan 3, 2023
1fa884d
Merge branch 'release/v2.1.0'
excalq Jan 27, 2023
7fa7330
Merge branch 'release/v2.2.0'
algobarb Mar 23, 2023
004baae
Convert algod responses to typed
Eric-Warehime May 3, 2023
23133b5
Update eslint, fix lint errors
Eric-Warehime May 5, 2023
67cd0d6
Fix test
Eric-Warehime May 5, 2023
4f648d5
Fix some tests due to changes in put signature
Eric-Warehime May 5, 2023
abff22f
Fix examples, block response
Eric-Warehime May 5, 2023
85e6196
Fix test errors
Eric-Warehime May 8, 2023
e3bcc3b
Merge branch 'release/v2.3.0'
onetechnical May 8, 2023
afe67b0
Merge branch 'release/v2.4.0'
Algo-devops-service Jun 16, 2023
4e8c1b0
Merge remote-tracking branch 'upstream/3.0.0' into 3.0.0
Eric-Warehime Jul 21, 2023
bc272cb
Update prepare method for typed responses
Eric-Warehime Jul 26, 2023
f4a3589
Fixes for typed response tests
Eric-Warehime Jul 28, 2023
ace0d16
Merge remote-tracking branch 'upstream/3.0.0' into 3.0.0
Eric-Warehime Jul 28, 2023
9e6394a
Fix the rest of the tests
Eric-Warehime Jul 28, 2023
e7ef82f
Fix dryrun test
Eric-Warehime Jul 28, 2023
2baaabd
Fix some examples
Eric-Warehime Jul 31, 2023
45104d1
Fix debug example
Eric-Warehime Jul 31, 2023
4b807de
Remove buffer
Eric-Warehime Jul 31, 2023
59c2512
Convert number to bigint union
Eric-Warehime Aug 1, 2023
923d535
Add comment on doRaw
Eric-Warehime Aug 1, 2023
e56540f
PR comments
Eric-Warehime Aug 15, 2023
7bda5ed
Merge remote-tracking branch 'upstream/master' into 3.0.0
Eric-Warehime Aug 15, 2023
5996dee
Merge remote-tracking branch 'upstream/3.0.0' into 3.0.0
Eric-Warehime Aug 15, 2023
22b7a40
Remove integer check from statusAfterBlock
Eric-Warehime Aug 15, 2023
1df8de9
Remove the rest of the integer checks
Eric-Warehime Aug 15, 2023
d36436e
Remove type casts for round in example
Eric-Warehime Aug 15, 2023
7569f07
Update chromedriver to 116
Eric-Warehime Aug 16, 2023
acfc50b
Add toString to more tests, fixing number bigint comparisons
Eric-Warehime Aug 16, 2023
f79e0e7
Move import
Eric-Warehime Aug 16, 2023
8727b60
Replace json with json-bigint
Eric-Warehime Aug 16, 2023
070bf95
wrap require in function
Eric-Warehime Aug 16, 2023
91c646a
fix browsers
Eric-Warehime Aug 16, 2023
9d172c3
export jsonbig
Eric-Warehime Aug 17, 2023
45864d9
fix browser requires
Eric-Warehime Aug 17, 2023
1c147e6
Merge remote-tracking branch 'upstream/develop' into 3.0.0
Eric-Warehime Aug 17, 2023
2176b7a
Merge remote-tracking branch 'upstream/3.0.0' into 3.0.0
Eric-Warehime Aug 23, 2023
fc8f510
Increase wait
Eric-Warehime Aug 23, 2023
fbadfc2
Revert bigint changes
Eric-Warehime Aug 29, 2023
6e79945
Final lint fixes
Eric-Warehime Aug 30, 2023
ce2192f
make format
Eric-Warehime Aug 30, 2023
fef1997
Convert block to typed
Eric-Warehime Aug 30, 2023
fd0c6f3
Fix exmaples utils
Eric-Warehime Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function main() {
3
);
// Grab app id from confirmed transaction result
const appId = result['application-index'];
const appId = result.applicationIndex;
console.log(`Created app with index: ${appId}`);
// example: APP_CREATE

Expand Down Expand Up @@ -148,7 +148,7 @@ async function main() {

// example: APP_READ_STATE
const appInfo = await algodClient.getApplicationByID(appId).do();
const globalState = appInfo.params['global-state'][0];
const globalState = appInfo.params.globalState[0];
console.log(`Raw global state - ${JSON.stringify(globalState)}`);

// decode b64 string key with Buffer
Expand All @@ -162,7 +162,7 @@ async function main() {
.accountApplicationInformation(caller.addr, appId)
.do();

const localState = accountAppInfo['app-local-state']['key-value'][0];
const localState = accountAppInfo.appLocalState.keyValue[0];
console.log(`Raw local state - ${JSON.stringify(localState)}`);

// decode b64 string key with Buffer
Expand Down
6 changes: 3 additions & 3 deletions examples/asa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main() {
3
);

const assetIndex = result['asset-index'];
const { assetIndex } = result;
console.log(`Asset ID created: ${assetIndex}`);
// example: ASSET_CREATE

Expand All @@ -49,7 +49,7 @@ async function main() {
console.log(`Asset Params: ${JSON.stringify(assetInfo.params)}`);
// example: ASSET_INFO

await new Promise((f) => setTimeout(f, 5000)); // sleep to ensure indexer is caught up
await new Promise((f) => setTimeout(f, 45000)); // sleep to ensure indexer is caught up

// example: INDEXER_LOOKUP_ASSET
const indexer = getLocalIndexerClient();
Expand Down Expand Up @@ -79,7 +79,7 @@ async function main() {
txn.txID().toString(),
3
);
console.log(`Result confirmed in round: ${configResult['confirmed-round']}`);
console.log(`Result confirmed in round: ${configResult.confirmedRound}`);
// example: ASSET_CONFIG

const receiver = accounts[2];
Expand Down
2 changes: 1 addition & 1 deletion examples/atc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function main() {
createTxn.txID().toString(),
3
);
const appIndex = response['application-index'];
const appIndex = response.applicationIndex;

// example: ATC_CREATE
const atc = new algosdk.AtomicTransactionComposer();
Expand Down
2 changes: 1 addition & 1 deletion examples/block_fetcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function removeNulls(obj) {

while (true) {
// Get latest round number
let lastRound = status['last-round'];
let { lastRound } = status;
console.log(`Round: ${lastRound}`);

// Fetch block
Expand Down
3 changes: 1 addition & 2 deletions examples/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ async function main() {
// example: DEBUG_DRYRUN_SUBMIT
const dryrunResponse = await algodClient.dryrun(dryrunRequest).do();
dryrunResponse.txns.forEach((txn) => {
console.log('Txn:', txn.txn);
console.log('Txn Results:', txn.txnresults);
console.log('Txn:', txn);
});
// example: DEBUG_DRYRUN_SUBMIT
}
Expand Down
4 changes: 2 additions & 2 deletions examples/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ async function main() {
// example: TRANSACTION_PAYMENT_SIGN

// example: TRANSACTION_PAYMENT_SUBMIT
const { txId } = await algodClient.sendRawTransaction(signedTxn).do();
const result = await algosdk.waitForConfirmation(algodClient, txId, 4);
const { txid } = await algodClient.sendRawTransaction(signedTxn).do();
const result = await algosdk.waitForConfirmation(algodClient, txid, 4);
console.log(result);
console.log(`Transaction Information: ${JSON.stringify(result.txn)}`);
console.log(
Expand Down
2 changes: 1 addition & 1 deletion examples/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ export async function deployCalculatorApp(
appCreateTxn.txID().toString(),
3
);
const appId = result['application-index'];
const appId = Number(result.applicationIndex);
return appId;
}
Loading