Skip to content

Instantly share code, notes, and snippets.

View juanfranblanco's full-sized avatar
👋
Always here... (when not sleeping)

Juan Blanco juanfranblanco

👋
Always here... (when not sleeping)
  • United Kingdom
View GitHub Profile
@juanfranblanco
juanfranblanco / MetaMaskWalletUnityNethereumInterop.cs
Last active March 19, 2023 07:54
Nethereum Metamask SDK Unity PoC interop
//PoC Interop to integrate Nethereum and MM Sdk in Unity.
using System;
using System.Numerics;
using System.Threading.Tasks;
using MetaMask.Models;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Contracts;
using Nethereum.JsonRpc.Client;
using Nethereum.JsonRpc.Client.RpcMessages;
using Nethereum.Metamask;
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<WasiNativeFileReference Include="&quot;$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\native\*.c))&quot;" />
<WasiAfterRuntimeLoaded Include="native_networking_attach_internal_calls" />
</ItemGroup>
</Project>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WasiSdkTaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">net7.0</WasiSdkTaskDir>
<WasiSdkTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">netstandard2.0</WasiSdkTaskDir>
<WasiSdkTaskAssembly>$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)..\tools\$(WasiSdkTaskDir)\Wasi.Sdk.dll"))</WasiSdkTaskAssembly>
</PropertyGroup>
<UsingTask TaskName="Wasi.Sdk.Tasks.EmitWasmBundleObjectFile" AssemblyFile="$(WasiSdkTaskAssembly)" />
<UsingTask TaskName="Wasi.Sdk.Tasks.WasmResolveAssemblyDependencies" AssemblyFile="$(WasiSdkTaskAssembly)" />
@juanfranblanco
juanfranblanco / NethereumRPL1559.md
Last active July 1, 2021 08:55
EIP1559 RLP Nethereum Signing test scenarios

EIP1559 RLP Nethereum Signing test scenarios

Private key: 0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7

Check out the RLP Debugger, pretty cool tool -> https://codechain-io.github.io/rlp-debugger/

Test scenarios RLP with no access lists

First RLP, used to sign Second RLP signed

Stuff That Software Developers Do

This is a list of stuff that the average software developer does from week to week

Coding

  • Code design
  • Refactoring
  • Algorithms
  • Profiling
  • Code reviews
  • Building frameworks
public class PropertyOverridingTypeDescriptor : CustomTypeDescriptor
{
private readonly Dictionary<string, PropertyDescriptor> overridePds = new Dictionary<string, PropertyDescriptor>();
public PropertyOverridingTypeDescriptor(ICustomTypeDescriptor parent)
: base(parent)
{ }
public void OverrideProperty(PropertyDescriptor pd)
{
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Web3;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;
//Example of creating a simple custom blockchain crawler orchestrator that stops the crawling at transaction receipt.
//This is done as crawling currently does not disable steps before getting the data.
using Nethereum.BlockchainProcessing.Processor;
using Nethereum.BlockchainProcessing.BlockProcessing;
using Nethereum.BlockchainProcessing.BlockProcessing.CrawlerSteps;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Web3;
using System;
using System.Collections.Generic;
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Web3;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;
using System;
using Nethereum.ABI;
using System.Collections.Generic;
public class AbiEncode
{
private static void Main(string[] args)
{
Console.WriteLine(new ABIEncode().GetABIEncoded(new ABIValue("string[]", new[]{"foo"})).Length);
}