Comments (12)
It worked.
Thank you very much.
from eos-sharp.
Did a commit with some fixes and a unit test for this.
Owner and active key must be a authority Structure.
Sync the source code.
Something like this should work now.
var result = await Eos.CreateTransaction(new Transaction()
{
Actions = new List<Api.v1.Action>()
{
new Api.v1.Action()
{
Account = "eosio",
Authorization = new List<PermissionLevel>()
{
new PermissionLevel() {Actor = "tester112345", Permission = "active"}
},
Name = "newaccount",
Data = new {
creator = "tester112345",
name = "mynewaccount",
owner = new {
threshold = 1,
keys = new List<object>() {
new { key = "EOS8Q8CJqwnSsV4A6HDBEqmQCqpQcBnhGME1RUvydDRnswNngpqfr", weight = 1}
}
},
active = new {
threshold = 1,
keys = new List<object>() {
new { key = "EOS8Q8CJqwnSsV4A6HDBEqmQCqpQcBnhGME1RUvydDRnswNngpqfr", weight = 1}
}
}
}
},
new Api.v1.Action()
{
Account = "eosio",
Authorization = new List<PermissionLevel>()
{
new PermissionLevel() { Actor = "tester112345", Permission = "active"}
},
Name = "buyrambytes",
Data = new {
payer = "tester112345",
receiver = "mynewaccount",
bytes = 8192,
}
},
new Api.v1.Action()
{
Account = "eosio",
Authorization = new List<PermissionLevel>()
{
new PermissionLevel() { Actor = "tester112345", Permission = "active"}
},
Name = "delegatebw",
Data = new {
from = "tester112345",
receiver = "mynewaccount",
stake_net_quantity = "1.0000 EOS",
stake_cpu_quantity = "1.0000 EOS",
transfer = false,
}
}
}
});
from eos-sharp.
Thank you for your help.
But I still got "Out of Range" message using your code.
from eos-sharp.
Did you get the master latest version? I did a commit to fix those errors.
from eos-sharp.
Yes, I tested with the master latest version. Have you tested?
from eos-sharp.
Yes I did.
Created unittest here: https://github.com/GetScatter/eos-sharp/blob/master/EosSharp/EosSharp.UnitTests/EosUnitTests.cs#L184
If you debug and create a breakpoint and it pass this line:
https://github.com/GetScatter/eos-sharp/blob/master/EosSharp/EosSharp/Eos.cs#L308
It means the transaction is packed and ready to be sent. The out of range erros is packing the trx.
Please can you show more detail on the exception? Stack trace etc?
from eos-sharp.
The trx is packed and sent successfully.
"out of range" message is responsed from the EOS mainnet:
{"code":500,"error":{"code":8,"name":"out_of_range_exception","what":"Out of Range","details":[]}
from eos-sharp.
I have tested https://github.com/GetScatter/eos-sharp/blob/master/EosSharp/EosSharp.UnitTests/EosUnitTests.cs#L184 on EOS mainnet,
and got the same error.
from eos-sharp.
Ok then show me the output information that serializes the exception throw.
from eos-sharp.
{"code":500,"error":{"code":8,"name":"out_of_range_exception","what":"Out of Range","details":[]},"Message":"引发类型为“EosSharp.Exceptions.ApiErrorException”的异常。","Data":{},"InnerException":null,"TargetSite":{"Name":"MoveNext","AssemblyName":"EosSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","ClassName":"EosSharp.Helpers.HttpHelper+d__18","Signature":"Void MoveNext()","Signature2":"System.Void MoveNext()","MemberType":8,"GenericArguments":null},"StackTrace":" 在 EosSharp.Helpers.HttpHelper.d__18.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter1.GetResult() 在 EosSharp.Helpers.HttpHelper.<SendAsync>d__12.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)" 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
在 EosSharp.Helpers.HttpHelper.d__61.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
在 EosSharp.Api.v1.EosApi.d__22.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter1.GetResult() 在 EosSharp.Eos.<CreateTransaction>d__30.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
在 EosSharp.UnitTests.EosUnitTests.d__12.MoveNext() 位置 D:\tt\eos-sharp-master(3)\eos-sharp-master\EosSharp\EosSharp.UnitTests\EosUnitTests.cs:行号 189","HelpLink":null,"Source":"EosSharp","HResult":-2146233088}
from eos-sharp.
Ok thank you for your efford. I was getting a out of range inside eos-sharp. But with your exception I can see is now throwing from nodeos. Managed to replicate.
Looking into it.
from eos-sharp.
This commit fixs this problems 54ff219
Check the unit test for a working new version.
from eos-sharp.
Related Issues (20)
- a GetBlock bug HOT 1
- AesEncrypt throws CryptographicException: 'Specified initialization vector (IV) does not match the block size for this algorithm.' HOT 1
- Implement TAPoS ref block with blocks behind
- How to generate the public key from a private key in eos-Sharp? HOT 1
- object to float conversion InvalidCastException HOT 2
- eos-sharp api call gets failed HOT 1
- Broadcast fails when data contains Digital Signature HOT 2
- How to use eos-sharp with ASP .NET core web API
- How to access multiindex table by its primary key?
- How to call action from eos-sharp? HOT 1
- Use TLS 1.2 in ASP.NET Core 3.1 HOT 1
- Generate uuid or unique ID in smart contract. HOT 1
- AbiSerialization error
- get Actions Count HOT 1
- Get table rows limit
- eos-sharp is not actively maintained discussion HOT 7
- Incorrect SIGN_KEY_DATA_SIZE
- When calling CreateTransaction - the response ended prematurely - Calling Wax chain
- incorrect ReadAction in AbiSerializationProvider
- Error when pushing transaction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eos-sharp.