Skip to content

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

License

Notifications You must be signed in to change notification settings

koinos/koinos-sdk-as

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d93ad34 Β· Aug 14, 2024
Jul 15, 2024
Aug 9, 2024
Aug 13, 2024
Dec 26, 2022
Apr 7, 2023
Jan 30, 2022
Dec 26, 2022
Mar 23, 2022
Apr 19, 2022
Aug 25, 2022
Mar 23, 2024
Sep 8, 2022
Dec 26, 2022
Dec 26, 2022
Dec 26, 2022
Dec 26, 2022
Dec 26, 2022
Aug 13, 2024
Dec 26, 2022
Dec 26, 2022
Aug 2, 2024

Repository files navigation

Test

koinos-sdk-as

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

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

Learn how to create smart contracts by looking at the examples repo: https://github.com/roaminro/koinos-sdk-as-examples

Requirements:

You need to install NodeJS v16 or higher download

Installation

# with npm
npm install koinos-sdk-as

# with yarn
yarn add koinos-sdk-as

Run unit tests

# with npm
npm test

# with yarn
yarn test

Build test contract

# with npm
npm run buildTestContract

# with yarn
yarn run buildTestContract

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
no obj5
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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published