You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am working on velas account using sponsor host. I am using the following code `const web3 = new Web3(vaclient.provider)
const nonce = await web3.eth.getTransactionCount(userInfo.account_key_evm) // userinfo object from prev step;
const from = userInfo.account_key_evm;
console.log(from);
const contract = new web3.eth.Contract(MEMBER_ABI, "0xd4faA4a9cA8879E48aED6635e6f77eEaeE568Bad");
const contract1 = new web3.eth.Contract(CONTACT_ABI, nft.contractAddress);
const member = await contract.methods.walletOfOwner(from).call();
console.log(member);
let csrf_token = null;
Now I have funded the logged in velas account the evm transaction is happening but it still gives error Raw transaction failed and custom instruction error is invalid rent paying account. the code for evm transaction is as below
`try {
const response = await fetch("http://localhost:3002/csrf/");
const { token } = await response.json();
csrf_token = token;
const raw = {
nonce: nonce,
from: from,
gas: '500000',
gasPrice: '20000000001',
value:'0',
broadcast: true,
csrf_token,
}
contract.methods.transfer().send(raw)
.on('error', function(error){
console.log(error.message)
})
.on('receipt', function(receipt){
console.log(receipt.transactionHash)
})
} catch (error) {
console.log("csrf host is not available");
};`
Hi, I am working on velas account using sponsor host. I am using the following code `const web3 = new Web3(vaclient.provider)
const nonce = await web3.eth.getTransactionCount(userInfo.account_key_evm) // userinfo object from prev step;
const from = userInfo.account_key_evm;
console.log(from);
const contract = new web3.eth.Contract(MEMBER_ABI, "0xd4faA4a9cA8879E48aED6635e6f77eEaeE568Bad");
const contract1 = new web3.eth.Contract(CONTACT_ABI, nft.contractAddress);
const member = await contract.methods.walletOfOwner(from).call();
console.log(member);
let csrf_token = null;
return;`
and I am gettint the following error on running the code
The text was updated successfully, but these errors were encountered: