## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
thekomx
@thekomx

<aion4j.plugin.version>0.5.0</aion4j.plugin.version>
avmtestnet-2019-03-26
Can you please show me how to update them?
I've tried
Help>Check for update
Files>Settings>Plugins

Satya
@satran004
Just change the version no to 0.6.1 manually. Then delete the lib folder. Then right click on the project->Aion Virtual Machine—> Run Initializer
That will recreate lib folder and copy new jars
The above version is for maven plugin.
You can update Intellij plugin version in standard way if not done yet.
thekomx
@thekomx
@satran004 Thanks lots lots
Thank you again and have a good one. : )
thekomx
@thekomx
@satran004 Every time I create new project I still get the old version of lib files ("avmtestnet-2019-03-26"). I know how to fix this manually (as you showed me earlier) but it would be better if everything works as it should be IMO. Or maybe I've been doing things wrong from the first place.
Can you please have a look at these screen shots if my setting were incorrect when I create new project.

Satya
@satran004
@thekomx I can't see the attachments. Can you please confirm what's the avm-archetype version you see in Intellij while generating a new project ? It should be 0.17 . Also can you go to the Intellij plugin UI and check what's the AVM Intellij Plugin version ?
Jennifer
@jennijuju
Hi and thanks @jennijuju we're trying to figure it out if I can update it without doing it manually. Cheers
thekomx
@thekomx
@satran004 I got it now
Need to select 0.17 not 0.9 🤦‍♀️
They're version numbers not Maths 🤦‍♂️
Satya
@satran004
@thekomx 0.17 is the newest archetype version
thekomx
@thekomx
Thanks again and sorry for the troubles😢
thekomx
@thekomx
@satran004 I need one more favor please.
If you have some AVM Testnet tokens, can you please send me some?
I haven't been able to try to deploy anything at all since the faucet is broken.
0xa0b74e549296ce9422612d422245f06a7e5af5f433b1598ce84b811ee5f8c39e
Satya
@satran004
@thekomx I have sent few tokens. You can request from this url https://faucets.blockxlabs.com/aion
thekomx
@thekomx
https://faucets.blockxlabs.com/aion ====>Has been broken forever :(
Satya
@satran004
Yes. I realized that after sending the link :(
thekomx
@thekomx
All good lol
thekomx
@thekomx

Hi @satran004 it's me again ☺
2 problems about Nodejs and NPM this time.

• I followed the instruction to setup Web3 from https://github.com/aionnetwork/aion_web3
and get this error message
'''
C:\Users\theko\aion_web3>npm install
npm ERR! Unexpected string in JSON at position 147215 while parsing '{
npm ERR! "name": "aion-web3",
npm ERR! "version": '

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\theko\AppData\Roaming\npm-cache_logs\2019-05-09T11_51_34_499Z-debug.log

(My nodejs version v12.1.0, NPM version 6.9.0)
'''

• And
'''
C:\Users\theko\aion_web3>node console.js
throw err;
^

Error: Cannot find module 'aion-web3-core'
Require stack:

• C:\Users\theko\aion_web3\packages\web3\src\index.js
• C:\Users\theko\aion_web3\console.js
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (C:\Users\theko\aion_web3\packages\web3\src\index.js:33:12)

Are these errors from me or the source?

Satya
@satran004
@thekomx It seems like you are missing aion-web3-core module. I need to check the steps. @jennijuju, any idea ?
Kevin Taylor
So hey there...
I attempted to use the token swap bridge to convert my erc-20 aion tokens to the new ones, provided an aion wallet addy, they never showed up, can somebody please provide some help?
followed directions provided by palm beach confidential by the way, so I'm pretty sure I did it correctly...
Jonas Hals
@boxhock
Hi everyone. I need to deploy a contract to the Mastery testnet, but I can't seem to find a faucet that works. Is there anyone here kind enough to send me some so I can get going?
My address is 0xa0c16e04adad6d83bbe183c8d1e3e2295c6c475506800330eeb8c0620bd8bdb1
kzeine
@kzeine
@boxhock the https://faucets.blockxlabs.com/ should be working now
parinaA
@parinaA
Hey everyone! I'm trying to deploy my java contracts onto the AVM through Maven. I am successfully able to compile it so doesn't seem like there's a problem with the contract. I am getting the following error during mvn clean install:
Failed to execute goal org.aion4j:aion4j-maven-plugin:0.6.7:postpack (default) on project hello-world: Contract Jar post compilation failed: InvocationTargetException: NullPointerException -> [Help 1]
Satya
@satran004
Can u check if the contract.class.name property in pom.xml is pointing to your contract class ?
parinaA
@parinaA
Do you mean the contract.main.class property? I don't see a contract.class.name
Satya
@satran004
Yes. Contract.main.class
parinaA
@parinaA
Yes it is pointing to my contract class
I am not able to find details about this particular goal(postpack) that I'm failing at even on github. Do you think you can point me to a better resource to understand the problem?
Satya
@satran004
Postpack does the abi compilation and jar optimization. You can comment this in pom.xml goal section but your contract may not work as annotations will not be processed. This error usually occurs when your contract class is wrongly specified in pom.xml or doesn’t exist in jar. You can verify that inside target folder. There should be a jar file. If that doesn’t work, you may want to try to run mvn clean install -X
to get more debug info.
Btw, postpack is explained here https://github.com/bloxbean/aion4j-maven-plugin
parinaA
@parinaA
I checked the target folder and everything seemed to be correct there. Commenting out the goal worked and I was able to build and deploy the contract. Thank you so much for the help!
parinaA
@parinaA
@satran004 turned out my transaction yesterday was not successful without the successful postpack goal. The error was actually in the contract where I had not included the package in the first line because of which it wasn't able to locate the jar file although it was there in the target folder. I was now able to successfully deploy the contract after adding it.
Satya
@satran004
@parinaA I was wondering how did it work without postpack. Good to know that its working now
parinaA
@parinaA

Hi everyone! I was deploying my contract throught the frontend by using a MERN stack app and came across the following error while compiling:

Module not found: Error: Can't resolve 'fs' in '/home/parina/Documents/aion-counter/node_modules/aion-web3-eth/src'

node: {
fs: "empty"
},

to my webpack.config.js file.
After this, I was successfully able to compile my the project and start the server but on opening the project in the browser, the contract was not deployed and I got the following error in the console:

TypeError: fs.readFileSync is not a function

After searching on various forums, I found out that fs is not supposed to be used on the frontend, but it appears that it is being used by the aion node modules and therefore I can't seem to find the way around it.

Prastut Kumar
@prastut

Hi Aion community!

I am currently building a career accelerator (https://www.thevantageproject.com/ICO-blockchain-engineer-hiring/) that upskills experienced full stack engineers with blockchain skills and readies them for remote jobs.

As we scale the above process, I am currently researching how our current batch of students can contribute to AION ecosystem.

How I plan to add value:
Step 1: Learning by contributing (individual level)
As the person who develops the tech pedagogy for the accelerator, getting a sense of where the community may need help.

Step 2: Students start contributing
We inculcate my learning and mental models that I formed from step 1, into our pedagogy and train students. Students start contributing.

On step 1 at the moment. Glad to be connected to y'all! Any help in that direction would be really helpful :D

I am Prastut, a 23-year-old Carnegie Mellon University dropout, currently on a mission to increase meritocracy and solve equal access to opportunity for all. On a work trip to Bay Area, I discovered the costs startup entrepreneurs had to pay for scarce engineering talent, while on the other hand, engineers back home (I was born in India) lacked such opportunities even though their skills were comparable.

The career accelerator falls in that mission. Being able to give up to a 10x increase in economic opportunity to millions of people in my country is the impact I am working towards.

parinaA
@parinaA

Hi! I'm trying to transfer Aions fro my contract to another account using the following fuction

 public static void checkHours(int hr1, int hr2, byte[] value)
{

user1.setHrs(hr1);
user2.setHrs(hr2);
if(hr1>hr2)
{
}
else
{
}
//onlyOwner();
Blockchain.call(to, new BigInteger(value), new byte[0], Blockchain.getRemainingEnergy());
}

All transactions are succesful but the value is not being transferred to the appropriate account.
I have used Maven through cli to deploy and sign the transaction and also done it through the frontend using js.
For maven I'm using:

mvn aion4j:contract-txn -Dcontract=0xA0CB3a6445B9036D30E955c2496E4c6687643984C0acBE653CD6fe20649338C9 -Dmethod=checkHours -Dargs="-I 3 -I 4 -B[] 2" -Premote

And for using web3 I used:

let data = web3.avm.contract.method('checkHours').inputs(
[
'Int',
'Int',
'Byte[]'
], [
'7',
'5',
value
]).encode();

to create the Transaction object where the variable value is defined as:

var value = new Uint8Array(1);
value = [2];

I need help figuring out if the error is due to the contract logic or the calling statements. Appreciate the help!

Jennifer
@jennijuju
Hi @parinaA :

Hi, I suspect the problem is that AVM is using the smallest unit of Aion for values, which is nAmp.
1 Aion = 10^18 nAmp, that’s why 2 nAmp is barely noticeable. That being said, if you want to transfer 2 Aion in Java contract, the value should be 2*10^18.

If you are using web3.js, instead of using unit8Array, I would suggest you to define an array that is 32 bytes and specify it to be in Big Endian order.

For example:

var namp = new BN("1000000000000000000");
var amount = new BN("2");
let amountInNamp = namp.mul(amount);
let value = amountInNamp.toArray('be',32);

parinaA
@parinaA
Hi @jennijuju thanks for the response. I'll try doing it this way.

Hi everyone! I was deploying my contract throught the frontend by using a MERN stack app and came across the following error while compiling:

Module not found: Error: Can't resolve 'fs' in '/home/parina/Documents/aion-counter/node_modules/aion-web3-eth/src'

node: {
fs: "empty"
},

to my webpack.config.js file.
After this, I was successfully able to compile my the project and start the server but on opening the project in the browser, the contract was not deployed and I got the following error in the console:

TypeError: fs.readFileSync is not a function

After searching on various forums, I found out that fs is not supposed to be used on the frontend, but it appears that it is being used by the aion node modules and therefore I can't seem to find the way around it.

Meanwhile can you also take a look at my previous query?

akanazara
@akanazara
hey guys, I would like to talk with someone closely involved in Aion, I represent Ledger (this is regarding the Aion app)
Sorin Tanasescu
@centrys-sorin
hi @akanazara