0.3.1 ā€¢ Published 2 years ago

koinos-as-sdk v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

koinos-as-sdk

AssemblyScript (AS) Software Development Toolkit (SDK) for the Koinos Blockchain

See documentation: https://roaminroe.github.io/koinos-as-sdk/

Installation

# with npm
npm install koinos-as-sdk

# with yarn
yarn add koinos-as-sdk

Build test contract

# with npm
npm run buildTest

# with yarn
yarn run buildTest

Upload and trigger the test contract on a local devnet using Local-Koinos

šŸš« šŸ” > open wallets/bob.wallet bob
Opened wallet: wallets/bob.wallet

šŸš« šŸ”“ > connect http://localhost:8080
Connected to endpoint http://localhost:8080

šŸ”“ > register foobar 161DDwJNQyHqYJbP4C7Y8BTULrkjgC4U6g /test/abi/foobar.abi
Contract 'foobar' at address 161DDwJNQyHqYJbP4C7Y8BTULrkjgC4U6g registered

šŸ”“ > foobar.foobar 42
Calling foobar.foobar with arguments 'value:42'
Transaction with ID 0x1220654597dfe99b4d5f841c129be39d3fe725539240b9efb43f8ea8ab4d9cd35742 containing 1 operations submitted.
Mana cost: 0.01831902 (Disk: 10, Network: 254, Compute: 1830532)
Logs:
entryPoint: 3282800625
contractArgs: 42
contractId (b58): 161DDwJNQyHqYJbP4C7Y8BTULrkjgC4U6g
headInfo.head_block_time: 1645327982254
headInfo.head_topology.height: 7771
headInfo.last_irreversible_block.: 7711
callerData.caller_privilege: 1
lastIrreversibleBlock: 7711
putRes: 0
obj: testValue
putRes: 0
obj: testValue2
obj: testValue2
putRes3: 0
obj5.value: 42
recoveredKey (b58): 1DQzuCcTKacbs9GGScRTU1Hc8BsyARTPqe
value2
no key5
value3
key3
value1
key1
nothing before key1
nothing after key3
obj201.value: 200
next obj202.value: 300
prev obj202.value: 100
nothing before key1
nothing after key3
payer: 161DDwJNQyHqYJbP4C7Y8BTULrkjgC4U6g
payer: 161DDwJNQyHqYJbP4C7Y8BTULrkjgC4U6g
0.3.1

2 years ago

0.3.0

2 years ago