github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/stdlibs/native.go (about)

     1  // This file is autogenerated from the genstd tool (@/misc/genstd); do not edit.
     2  // To regenerate it, run `go generate` from this directory.
     3  
     4  package stdlibs
     5  
     6  import (
     7  	"reflect"
     8  
     9  	gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
    10  	libs_crypto_ed25519 "github.com/gnolang/gno/gnovm/stdlibs/crypto/ed25519"
    11  	libs_crypto_sha256 "github.com/gnolang/gno/gnovm/stdlibs/crypto/sha256"
    12  	libs_math "github.com/gnolang/gno/gnovm/stdlibs/math"
    13  	libs_std "github.com/gnolang/gno/gnovm/stdlibs/std"
    14  	libs_strconv "github.com/gnolang/gno/gnovm/stdlibs/strconv"
    15  	libs_testing "github.com/gnolang/gno/gnovm/stdlibs/testing"
    16  	libs_time "github.com/gnolang/gno/gnovm/stdlibs/time"
    17  )
    18  
    19  type nativeFunc struct {
    20  	gnoPkg  string
    21  	gnoFunc gno.Name
    22  	params  []gno.FieldTypeExpr
    23  	results []gno.FieldTypeExpr
    24  	f       func(m *gno.Machine)
    25  }
    26  
    27  var nativeFuncs = [...]nativeFunc{
    28  	{
    29  		"crypto/ed25519",
    30  		"verify",
    31  		[]gno.FieldTypeExpr{
    32  			{Name: gno.N("p0"), Type: gno.X("[]byte")},
    33  			{Name: gno.N("p1"), Type: gno.X("[]byte")},
    34  			{Name: gno.N("p2"), Type: gno.X("[]byte")},
    35  		},
    36  		[]gno.FieldTypeExpr{
    37  			{Name: gno.N("r0"), Type: gno.X("bool")},
    38  		},
    39  		func(m *gno.Machine) {
    40  			b := m.LastBlock()
    41  			var (
    42  				p0  []byte
    43  				rp0 = reflect.ValueOf(&p0).Elem()
    44  				p1  []byte
    45  				rp1 = reflect.ValueOf(&p1).Elem()
    46  				p2  []byte
    47  				rp2 = reflect.ValueOf(&p2).Elem()
    48  			)
    49  
    50  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
    51  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
    52  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 2, "")).TV, rp2)
    53  
    54  			r0 := libs_crypto_ed25519.X_verify(p0, p1, p2)
    55  
    56  			m.PushValue(gno.Go2GnoValue(
    57  				m.Alloc,
    58  				m.Store,
    59  				reflect.ValueOf(&r0).Elem(),
    60  			))
    61  		},
    62  	},
    63  	{
    64  		"crypto/sha256",
    65  		"sum256",
    66  		[]gno.FieldTypeExpr{
    67  			{Name: gno.N("p0"), Type: gno.X("[]byte")},
    68  		},
    69  		[]gno.FieldTypeExpr{
    70  			{Name: gno.N("r0"), Type: gno.X("[32]byte")},
    71  		},
    72  		func(m *gno.Machine) {
    73  			b := m.LastBlock()
    74  			var (
    75  				p0  []byte
    76  				rp0 = reflect.ValueOf(&p0).Elem()
    77  			)
    78  
    79  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
    80  
    81  			r0 := libs_crypto_sha256.X_sum256(p0)
    82  
    83  			m.PushValue(gno.Go2GnoValue(
    84  				m.Alloc,
    85  				m.Store,
    86  				reflect.ValueOf(&r0).Elem(),
    87  			))
    88  		},
    89  	},
    90  	{
    91  		"math",
    92  		"Float32bits",
    93  		[]gno.FieldTypeExpr{
    94  			{Name: gno.N("p0"), Type: gno.X("float32")},
    95  		},
    96  		[]gno.FieldTypeExpr{
    97  			{Name: gno.N("r0"), Type: gno.X("uint32")},
    98  		},
    99  		func(m *gno.Machine) {
   100  			b := m.LastBlock()
   101  			var (
   102  				p0  float32
   103  				rp0 = reflect.ValueOf(&p0).Elem()
   104  			)
   105  
   106  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   107  
   108  			r0 := libs_math.Float32bits(p0)
   109  
   110  			m.PushValue(gno.Go2GnoValue(
   111  				m.Alloc,
   112  				m.Store,
   113  				reflect.ValueOf(&r0).Elem(),
   114  			))
   115  		},
   116  	},
   117  	{
   118  		"math",
   119  		"Float32frombits",
   120  		[]gno.FieldTypeExpr{
   121  			{Name: gno.N("p0"), Type: gno.X("uint32")},
   122  		},
   123  		[]gno.FieldTypeExpr{
   124  			{Name: gno.N("r0"), Type: gno.X("float32")},
   125  		},
   126  		func(m *gno.Machine) {
   127  			b := m.LastBlock()
   128  			var (
   129  				p0  uint32
   130  				rp0 = reflect.ValueOf(&p0).Elem()
   131  			)
   132  
   133  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   134  
   135  			r0 := libs_math.Float32frombits(p0)
   136  
   137  			m.PushValue(gno.Go2GnoValue(
   138  				m.Alloc,
   139  				m.Store,
   140  				reflect.ValueOf(&r0).Elem(),
   141  			))
   142  		},
   143  	},
   144  	{
   145  		"math",
   146  		"Float64bits",
   147  		[]gno.FieldTypeExpr{
   148  			{Name: gno.N("p0"), Type: gno.X("float64")},
   149  		},
   150  		[]gno.FieldTypeExpr{
   151  			{Name: gno.N("r0"), Type: gno.X("uint64")},
   152  		},
   153  		func(m *gno.Machine) {
   154  			b := m.LastBlock()
   155  			var (
   156  				p0  float64
   157  				rp0 = reflect.ValueOf(&p0).Elem()
   158  			)
   159  
   160  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   161  
   162  			r0 := libs_math.Float64bits(p0)
   163  
   164  			m.PushValue(gno.Go2GnoValue(
   165  				m.Alloc,
   166  				m.Store,
   167  				reflect.ValueOf(&r0).Elem(),
   168  			))
   169  		},
   170  	},
   171  	{
   172  		"math",
   173  		"Float64frombits",
   174  		[]gno.FieldTypeExpr{
   175  			{Name: gno.N("p0"), Type: gno.X("uint64")},
   176  		},
   177  		[]gno.FieldTypeExpr{
   178  			{Name: gno.N("r0"), Type: gno.X("float64")},
   179  		},
   180  		func(m *gno.Machine) {
   181  			b := m.LastBlock()
   182  			var (
   183  				p0  uint64
   184  				rp0 = reflect.ValueOf(&p0).Elem()
   185  			)
   186  
   187  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   188  
   189  			r0 := libs_math.Float64frombits(p0)
   190  
   191  			m.PushValue(gno.Go2GnoValue(
   192  				m.Alloc,
   193  				m.Store,
   194  				reflect.ValueOf(&r0).Elem(),
   195  			))
   196  		},
   197  	},
   198  	{
   199  		"std",
   200  		"bankerGetCoins",
   201  		[]gno.FieldTypeExpr{
   202  			{Name: gno.N("p0"), Type: gno.X("uint8")},
   203  			{Name: gno.N("p1"), Type: gno.X("string")},
   204  		},
   205  		[]gno.FieldTypeExpr{
   206  			{Name: gno.N("r0"), Type: gno.X("[]string")},
   207  			{Name: gno.N("r1"), Type: gno.X("[]int64")},
   208  		},
   209  		func(m *gno.Machine) {
   210  			b := m.LastBlock()
   211  			var (
   212  				p0  uint8
   213  				rp0 = reflect.ValueOf(&p0).Elem()
   214  				p1  string
   215  				rp1 = reflect.ValueOf(&p1).Elem()
   216  			)
   217  
   218  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   219  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   220  
   221  			r0, r1 := libs_std.X_bankerGetCoins(
   222  				m,
   223  				p0, p1)
   224  
   225  			m.PushValue(gno.Go2GnoValue(
   226  				m.Alloc,
   227  				m.Store,
   228  				reflect.ValueOf(&r0).Elem(),
   229  			))
   230  			m.PushValue(gno.Go2GnoValue(
   231  				m.Alloc,
   232  				m.Store,
   233  				reflect.ValueOf(&r1).Elem(),
   234  			))
   235  		},
   236  	},
   237  	{
   238  		"std",
   239  		"bankerSendCoins",
   240  		[]gno.FieldTypeExpr{
   241  			{Name: gno.N("p0"), Type: gno.X("uint8")},
   242  			{Name: gno.N("p1"), Type: gno.X("string")},
   243  			{Name: gno.N("p2"), Type: gno.X("string")},
   244  			{Name: gno.N("p3"), Type: gno.X("[]string")},
   245  			{Name: gno.N("p4"), Type: gno.X("[]int64")},
   246  		},
   247  		[]gno.FieldTypeExpr{},
   248  		func(m *gno.Machine) {
   249  			b := m.LastBlock()
   250  			var (
   251  				p0  uint8
   252  				rp0 = reflect.ValueOf(&p0).Elem()
   253  				p1  string
   254  				rp1 = reflect.ValueOf(&p1).Elem()
   255  				p2  string
   256  				rp2 = reflect.ValueOf(&p2).Elem()
   257  				p3  []string
   258  				rp3 = reflect.ValueOf(&p3).Elem()
   259  				p4  []int64
   260  				rp4 = reflect.ValueOf(&p4).Elem()
   261  			)
   262  
   263  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   264  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   265  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 2, "")).TV, rp2)
   266  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 3, "")).TV, rp3)
   267  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 4, "")).TV, rp4)
   268  
   269  			libs_std.X_bankerSendCoins(
   270  				m,
   271  				p0, p1, p2, p3, p4)
   272  		},
   273  	},
   274  	{
   275  		"std",
   276  		"bankerTotalCoin",
   277  		[]gno.FieldTypeExpr{
   278  			{Name: gno.N("p0"), Type: gno.X("uint8")},
   279  			{Name: gno.N("p1"), Type: gno.X("string")},
   280  		},
   281  		[]gno.FieldTypeExpr{
   282  			{Name: gno.N("r0"), Type: gno.X("int64")},
   283  		},
   284  		func(m *gno.Machine) {
   285  			b := m.LastBlock()
   286  			var (
   287  				p0  uint8
   288  				rp0 = reflect.ValueOf(&p0).Elem()
   289  				p1  string
   290  				rp1 = reflect.ValueOf(&p1).Elem()
   291  			)
   292  
   293  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   294  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   295  
   296  			r0 := libs_std.X_bankerTotalCoin(
   297  				m,
   298  				p0, p1)
   299  
   300  			m.PushValue(gno.Go2GnoValue(
   301  				m.Alloc,
   302  				m.Store,
   303  				reflect.ValueOf(&r0).Elem(),
   304  			))
   305  		},
   306  	},
   307  	{
   308  		"std",
   309  		"bankerIssueCoin",
   310  		[]gno.FieldTypeExpr{
   311  			{Name: gno.N("p0"), Type: gno.X("uint8")},
   312  			{Name: gno.N("p1"), Type: gno.X("string")},
   313  			{Name: gno.N("p2"), Type: gno.X("string")},
   314  			{Name: gno.N("p3"), Type: gno.X("int64")},
   315  		},
   316  		[]gno.FieldTypeExpr{},
   317  		func(m *gno.Machine) {
   318  			b := m.LastBlock()
   319  			var (
   320  				p0  uint8
   321  				rp0 = reflect.ValueOf(&p0).Elem()
   322  				p1  string
   323  				rp1 = reflect.ValueOf(&p1).Elem()
   324  				p2  string
   325  				rp2 = reflect.ValueOf(&p2).Elem()
   326  				p3  int64
   327  				rp3 = reflect.ValueOf(&p3).Elem()
   328  			)
   329  
   330  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   331  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   332  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 2, "")).TV, rp2)
   333  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 3, "")).TV, rp3)
   334  
   335  			libs_std.X_bankerIssueCoin(
   336  				m,
   337  				p0, p1, p2, p3)
   338  		},
   339  	},
   340  	{
   341  		"std",
   342  		"bankerRemoveCoin",
   343  		[]gno.FieldTypeExpr{
   344  			{Name: gno.N("p0"), Type: gno.X("uint8")},
   345  			{Name: gno.N("p1"), Type: gno.X("string")},
   346  			{Name: gno.N("p2"), Type: gno.X("string")},
   347  			{Name: gno.N("p3"), Type: gno.X("int64")},
   348  		},
   349  		[]gno.FieldTypeExpr{},
   350  		func(m *gno.Machine) {
   351  			b := m.LastBlock()
   352  			var (
   353  				p0  uint8
   354  				rp0 = reflect.ValueOf(&p0).Elem()
   355  				p1  string
   356  				rp1 = reflect.ValueOf(&p1).Elem()
   357  				p2  string
   358  				rp2 = reflect.ValueOf(&p2).Elem()
   359  				p3  int64
   360  				rp3 = reflect.ValueOf(&p3).Elem()
   361  			)
   362  
   363  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   364  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   365  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 2, "")).TV, rp2)
   366  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 3, "")).TV, rp3)
   367  
   368  			libs_std.X_bankerRemoveCoin(
   369  				m,
   370  				p0, p1, p2, p3)
   371  		},
   372  	},
   373  	{
   374  		"std",
   375  		"emit",
   376  		[]gno.FieldTypeExpr{
   377  			{Name: gno.N("p0"), Type: gno.X("string")},
   378  			{Name: gno.N("p1"), Type: gno.X("[]string")},
   379  		},
   380  		[]gno.FieldTypeExpr{},
   381  		func(m *gno.Machine) {
   382  			b := m.LastBlock()
   383  			var (
   384  				p0  string
   385  				rp0 = reflect.ValueOf(&p0).Elem()
   386  				p1  []string
   387  				rp1 = reflect.ValueOf(&p1).Elem()
   388  			)
   389  
   390  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   391  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   392  
   393  			libs_std.X_emit(
   394  				m,
   395  				p0, p1)
   396  		},
   397  	},
   398  	{
   399  		"std",
   400  		"AssertOriginCall",
   401  		[]gno.FieldTypeExpr{},
   402  		[]gno.FieldTypeExpr{},
   403  		func(m *gno.Machine) {
   404  			libs_std.AssertOriginCall(
   405  				m,
   406  			)
   407  		},
   408  	},
   409  	{
   410  		"std",
   411  		"IsOriginCall",
   412  		[]gno.FieldTypeExpr{},
   413  		[]gno.FieldTypeExpr{
   414  			{Name: gno.N("r0"), Type: gno.X("bool")},
   415  		},
   416  		func(m *gno.Machine) {
   417  			r0 := libs_std.IsOriginCall(
   418  				m,
   419  			)
   420  
   421  			m.PushValue(gno.Go2GnoValue(
   422  				m.Alloc,
   423  				m.Store,
   424  				reflect.ValueOf(&r0).Elem(),
   425  			))
   426  		},
   427  	},
   428  	{
   429  		"std",
   430  		"CurrentRealmPath",
   431  		[]gno.FieldTypeExpr{},
   432  		[]gno.FieldTypeExpr{
   433  			{Name: gno.N("r0"), Type: gno.X("string")},
   434  		},
   435  		func(m *gno.Machine) {
   436  			r0 := libs_std.CurrentRealmPath(
   437  				m,
   438  			)
   439  
   440  			m.PushValue(gno.Go2GnoValue(
   441  				m.Alloc,
   442  				m.Store,
   443  				reflect.ValueOf(&r0).Elem(),
   444  			))
   445  		},
   446  	},
   447  	{
   448  		"std",
   449  		"GetChainID",
   450  		[]gno.FieldTypeExpr{},
   451  		[]gno.FieldTypeExpr{
   452  			{Name: gno.N("r0"), Type: gno.X("string")},
   453  		},
   454  		func(m *gno.Machine) {
   455  			r0 := libs_std.GetChainID(
   456  				m,
   457  			)
   458  
   459  			m.PushValue(gno.Go2GnoValue(
   460  				m.Alloc,
   461  				m.Store,
   462  				reflect.ValueOf(&r0).Elem(),
   463  			))
   464  		},
   465  	},
   466  	{
   467  		"std",
   468  		"GetHeight",
   469  		[]gno.FieldTypeExpr{},
   470  		[]gno.FieldTypeExpr{
   471  			{Name: gno.N("r0"), Type: gno.X("int64")},
   472  		},
   473  		func(m *gno.Machine) {
   474  			r0 := libs_std.GetHeight(
   475  				m,
   476  			)
   477  
   478  			m.PushValue(gno.Go2GnoValue(
   479  				m.Alloc,
   480  				m.Store,
   481  				reflect.ValueOf(&r0).Elem(),
   482  			))
   483  		},
   484  	},
   485  	{
   486  		"std",
   487  		"origSend",
   488  		[]gno.FieldTypeExpr{},
   489  		[]gno.FieldTypeExpr{
   490  			{Name: gno.N("r0"), Type: gno.X("[]string")},
   491  			{Name: gno.N("r1"), Type: gno.X("[]int64")},
   492  		},
   493  		func(m *gno.Machine) {
   494  			r0, r1 := libs_std.X_origSend(
   495  				m,
   496  			)
   497  
   498  			m.PushValue(gno.Go2GnoValue(
   499  				m.Alloc,
   500  				m.Store,
   501  				reflect.ValueOf(&r0).Elem(),
   502  			))
   503  			m.PushValue(gno.Go2GnoValue(
   504  				m.Alloc,
   505  				m.Store,
   506  				reflect.ValueOf(&r1).Elem(),
   507  			))
   508  		},
   509  	},
   510  	{
   511  		"std",
   512  		"origCaller",
   513  		[]gno.FieldTypeExpr{},
   514  		[]gno.FieldTypeExpr{
   515  			{Name: gno.N("r0"), Type: gno.X("string")},
   516  		},
   517  		func(m *gno.Machine) {
   518  			r0 := libs_std.X_origCaller(
   519  				m,
   520  			)
   521  
   522  			m.PushValue(gno.Go2GnoValue(
   523  				m.Alloc,
   524  				m.Store,
   525  				reflect.ValueOf(&r0).Elem(),
   526  			))
   527  		},
   528  	},
   529  	{
   530  		"std",
   531  		"origPkgAddr",
   532  		[]gno.FieldTypeExpr{},
   533  		[]gno.FieldTypeExpr{
   534  			{Name: gno.N("r0"), Type: gno.X("string")},
   535  		},
   536  		func(m *gno.Machine) {
   537  			r0 := libs_std.X_origPkgAddr(
   538  				m,
   539  			)
   540  
   541  			m.PushValue(gno.Go2GnoValue(
   542  				m.Alloc,
   543  				m.Store,
   544  				reflect.ValueOf(&r0).Elem(),
   545  			))
   546  		},
   547  	},
   548  	{
   549  		"std",
   550  		"callerAt",
   551  		[]gno.FieldTypeExpr{
   552  			{Name: gno.N("p0"), Type: gno.X("int")},
   553  		},
   554  		[]gno.FieldTypeExpr{
   555  			{Name: gno.N("r0"), Type: gno.X("string")},
   556  		},
   557  		func(m *gno.Machine) {
   558  			b := m.LastBlock()
   559  			var (
   560  				p0  int
   561  				rp0 = reflect.ValueOf(&p0).Elem()
   562  			)
   563  
   564  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   565  
   566  			r0 := libs_std.X_callerAt(
   567  				m,
   568  				p0)
   569  
   570  			m.PushValue(gno.Go2GnoValue(
   571  				m.Alloc,
   572  				m.Store,
   573  				reflect.ValueOf(&r0).Elem(),
   574  			))
   575  		},
   576  	},
   577  	{
   578  		"std",
   579  		"getRealm",
   580  		[]gno.FieldTypeExpr{
   581  			{Name: gno.N("p0"), Type: gno.X("int")},
   582  		},
   583  		[]gno.FieldTypeExpr{
   584  			{Name: gno.N("r0"), Type: gno.X("string")},
   585  			{Name: gno.N("r1"), Type: gno.X("string")},
   586  		},
   587  		func(m *gno.Machine) {
   588  			b := m.LastBlock()
   589  			var (
   590  				p0  int
   591  				rp0 = reflect.ValueOf(&p0).Elem()
   592  			)
   593  
   594  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   595  
   596  			r0, r1 := libs_std.X_getRealm(
   597  				m,
   598  				p0)
   599  
   600  			m.PushValue(gno.Go2GnoValue(
   601  				m.Alloc,
   602  				m.Store,
   603  				reflect.ValueOf(&r0).Elem(),
   604  			))
   605  			m.PushValue(gno.Go2GnoValue(
   606  				m.Alloc,
   607  				m.Store,
   608  				reflect.ValueOf(&r1).Elem(),
   609  			))
   610  		},
   611  	},
   612  	{
   613  		"std",
   614  		"derivePkgAddr",
   615  		[]gno.FieldTypeExpr{
   616  			{Name: gno.N("p0"), Type: gno.X("string")},
   617  		},
   618  		[]gno.FieldTypeExpr{
   619  			{Name: gno.N("r0"), Type: gno.X("string")},
   620  		},
   621  		func(m *gno.Machine) {
   622  			b := m.LastBlock()
   623  			var (
   624  				p0  string
   625  				rp0 = reflect.ValueOf(&p0).Elem()
   626  			)
   627  
   628  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   629  
   630  			r0 := libs_std.X_derivePkgAddr(p0)
   631  
   632  			m.PushValue(gno.Go2GnoValue(
   633  				m.Alloc,
   634  				m.Store,
   635  				reflect.ValueOf(&r0).Elem(),
   636  			))
   637  		},
   638  	},
   639  	{
   640  		"std",
   641  		"encodeBech32",
   642  		[]gno.FieldTypeExpr{
   643  			{Name: gno.N("p0"), Type: gno.X("string")},
   644  			{Name: gno.N("p1"), Type: gno.X("[20]byte")},
   645  		},
   646  		[]gno.FieldTypeExpr{
   647  			{Name: gno.N("r0"), Type: gno.X("string")},
   648  		},
   649  		func(m *gno.Machine) {
   650  			b := m.LastBlock()
   651  			var (
   652  				p0  string
   653  				rp0 = reflect.ValueOf(&p0).Elem()
   654  				p1  [20]byte
   655  				rp1 = reflect.ValueOf(&p1).Elem()
   656  			)
   657  
   658  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   659  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   660  
   661  			r0 := libs_std.X_encodeBech32(p0, p1)
   662  
   663  			m.PushValue(gno.Go2GnoValue(
   664  				m.Alloc,
   665  				m.Store,
   666  				reflect.ValueOf(&r0).Elem(),
   667  			))
   668  		},
   669  	},
   670  	{
   671  		"std",
   672  		"decodeBech32",
   673  		[]gno.FieldTypeExpr{
   674  			{Name: gno.N("p0"), Type: gno.X("string")},
   675  		},
   676  		[]gno.FieldTypeExpr{
   677  			{Name: gno.N("r0"), Type: gno.X("string")},
   678  			{Name: gno.N("r1"), Type: gno.X("[20]byte")},
   679  			{Name: gno.N("r2"), Type: gno.X("bool")},
   680  		},
   681  		func(m *gno.Machine) {
   682  			b := m.LastBlock()
   683  			var (
   684  				p0  string
   685  				rp0 = reflect.ValueOf(&p0).Elem()
   686  			)
   687  
   688  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   689  
   690  			r0, r1, r2 := libs_std.X_decodeBech32(p0)
   691  
   692  			m.PushValue(gno.Go2GnoValue(
   693  				m.Alloc,
   694  				m.Store,
   695  				reflect.ValueOf(&r0).Elem(),
   696  			))
   697  			m.PushValue(gno.Go2GnoValue(
   698  				m.Alloc,
   699  				m.Store,
   700  				reflect.ValueOf(&r1).Elem(),
   701  			))
   702  			m.PushValue(gno.Go2GnoValue(
   703  				m.Alloc,
   704  				m.Store,
   705  				reflect.ValueOf(&r2).Elem(),
   706  			))
   707  		},
   708  	},
   709  	{
   710  		"strconv",
   711  		"Itoa",
   712  		[]gno.FieldTypeExpr{
   713  			{Name: gno.N("p0"), Type: gno.X("int")},
   714  		},
   715  		[]gno.FieldTypeExpr{
   716  			{Name: gno.N("r0"), Type: gno.X("string")},
   717  		},
   718  		func(m *gno.Machine) {
   719  			b := m.LastBlock()
   720  			var (
   721  				p0  int
   722  				rp0 = reflect.ValueOf(&p0).Elem()
   723  			)
   724  
   725  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   726  
   727  			r0 := libs_strconv.Itoa(p0)
   728  
   729  			m.PushValue(gno.Go2GnoValue(
   730  				m.Alloc,
   731  				m.Store,
   732  				reflect.ValueOf(&r0).Elem(),
   733  			))
   734  		},
   735  	},
   736  	{
   737  		"strconv",
   738  		"AppendUint",
   739  		[]gno.FieldTypeExpr{
   740  			{Name: gno.N("p0"), Type: gno.X("[]byte")},
   741  			{Name: gno.N("p1"), Type: gno.X("uint64")},
   742  			{Name: gno.N("p2"), Type: gno.X("int")},
   743  		},
   744  		[]gno.FieldTypeExpr{
   745  			{Name: gno.N("r0"), Type: gno.X("[]byte")},
   746  		},
   747  		func(m *gno.Machine) {
   748  			b := m.LastBlock()
   749  			var (
   750  				p0  []byte
   751  				rp0 = reflect.ValueOf(&p0).Elem()
   752  				p1  uint64
   753  				rp1 = reflect.ValueOf(&p1).Elem()
   754  				p2  int
   755  				rp2 = reflect.ValueOf(&p2).Elem()
   756  			)
   757  
   758  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   759  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   760  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 2, "")).TV, rp2)
   761  
   762  			r0 := libs_strconv.AppendUint(p0, p1, p2)
   763  
   764  			m.PushValue(gno.Go2GnoValue(
   765  				m.Alloc,
   766  				m.Store,
   767  				reflect.ValueOf(&r0).Elem(),
   768  			))
   769  		},
   770  	},
   771  	{
   772  		"strconv",
   773  		"Atoi",
   774  		[]gno.FieldTypeExpr{
   775  			{Name: gno.N("p0"), Type: gno.X("string")},
   776  		},
   777  		[]gno.FieldTypeExpr{
   778  			{Name: gno.N("r0"), Type: gno.X("int")},
   779  			{Name: gno.N("r1"), Type: gno.X("error")},
   780  		},
   781  		func(m *gno.Machine) {
   782  			b := m.LastBlock()
   783  			var (
   784  				p0  string
   785  				rp0 = reflect.ValueOf(&p0).Elem()
   786  			)
   787  
   788  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   789  
   790  			r0, r1 := libs_strconv.Atoi(p0)
   791  
   792  			m.PushValue(gno.Go2GnoValue(
   793  				m.Alloc,
   794  				m.Store,
   795  				reflect.ValueOf(&r0).Elem(),
   796  			))
   797  			m.PushValue(gno.Go2GnoValue(
   798  				m.Alloc,
   799  				m.Store,
   800  				reflect.ValueOf(&r1).Elem(),
   801  			))
   802  		},
   803  	},
   804  	{
   805  		"strconv",
   806  		"CanBackquote",
   807  		[]gno.FieldTypeExpr{
   808  			{Name: gno.N("p0"), Type: gno.X("string")},
   809  		},
   810  		[]gno.FieldTypeExpr{
   811  			{Name: gno.N("r0"), Type: gno.X("bool")},
   812  		},
   813  		func(m *gno.Machine) {
   814  			b := m.LastBlock()
   815  			var (
   816  				p0  string
   817  				rp0 = reflect.ValueOf(&p0).Elem()
   818  			)
   819  
   820  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   821  
   822  			r0 := libs_strconv.CanBackquote(p0)
   823  
   824  			m.PushValue(gno.Go2GnoValue(
   825  				m.Alloc,
   826  				m.Store,
   827  				reflect.ValueOf(&r0).Elem(),
   828  			))
   829  		},
   830  	},
   831  	{
   832  		"strconv",
   833  		"FormatInt",
   834  		[]gno.FieldTypeExpr{
   835  			{Name: gno.N("p0"), Type: gno.X("int64")},
   836  			{Name: gno.N("p1"), Type: gno.X("int")},
   837  		},
   838  		[]gno.FieldTypeExpr{
   839  			{Name: gno.N("r0"), Type: gno.X("string")},
   840  		},
   841  		func(m *gno.Machine) {
   842  			b := m.LastBlock()
   843  			var (
   844  				p0  int64
   845  				rp0 = reflect.ValueOf(&p0).Elem()
   846  				p1  int
   847  				rp1 = reflect.ValueOf(&p1).Elem()
   848  			)
   849  
   850  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   851  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   852  
   853  			r0 := libs_strconv.FormatInt(p0, p1)
   854  
   855  			m.PushValue(gno.Go2GnoValue(
   856  				m.Alloc,
   857  				m.Store,
   858  				reflect.ValueOf(&r0).Elem(),
   859  			))
   860  		},
   861  	},
   862  	{
   863  		"strconv",
   864  		"FormatUint",
   865  		[]gno.FieldTypeExpr{
   866  			{Name: gno.N("p0"), Type: gno.X("uint64")},
   867  			{Name: gno.N("p1"), Type: gno.X("int")},
   868  		},
   869  		[]gno.FieldTypeExpr{
   870  			{Name: gno.N("r0"), Type: gno.X("string")},
   871  		},
   872  		func(m *gno.Machine) {
   873  			b := m.LastBlock()
   874  			var (
   875  				p0  uint64
   876  				rp0 = reflect.ValueOf(&p0).Elem()
   877  				p1  int
   878  				rp1 = reflect.ValueOf(&p1).Elem()
   879  			)
   880  
   881  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   882  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 1, "")).TV, rp1)
   883  
   884  			r0 := libs_strconv.FormatUint(p0, p1)
   885  
   886  			m.PushValue(gno.Go2GnoValue(
   887  				m.Alloc,
   888  				m.Store,
   889  				reflect.ValueOf(&r0).Elem(),
   890  			))
   891  		},
   892  	},
   893  	{
   894  		"strconv",
   895  		"Quote",
   896  		[]gno.FieldTypeExpr{
   897  			{Name: gno.N("p0"), Type: gno.X("string")},
   898  		},
   899  		[]gno.FieldTypeExpr{
   900  			{Name: gno.N("r0"), Type: gno.X("string")},
   901  		},
   902  		func(m *gno.Machine) {
   903  			b := m.LastBlock()
   904  			var (
   905  				p0  string
   906  				rp0 = reflect.ValueOf(&p0).Elem()
   907  			)
   908  
   909  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   910  
   911  			r0 := libs_strconv.Quote(p0)
   912  
   913  			m.PushValue(gno.Go2GnoValue(
   914  				m.Alloc,
   915  				m.Store,
   916  				reflect.ValueOf(&r0).Elem(),
   917  			))
   918  		},
   919  	},
   920  	{
   921  		"strconv",
   922  		"QuoteToASCII",
   923  		[]gno.FieldTypeExpr{
   924  			{Name: gno.N("p0"), Type: gno.X("string")},
   925  		},
   926  		[]gno.FieldTypeExpr{
   927  			{Name: gno.N("r0"), Type: gno.X("string")},
   928  		},
   929  		func(m *gno.Machine) {
   930  			b := m.LastBlock()
   931  			var (
   932  				p0  string
   933  				rp0 = reflect.ValueOf(&p0).Elem()
   934  			)
   935  
   936  			gno.Gno2GoValue(b.GetPointerTo(nil, gno.NewValuePathBlock(1, 0, "")).TV, rp0)
   937  
   938  			r0 := libs_strconv.QuoteToASCII(p0)
   939  
   940  			m.PushValue(gno.Go2GnoValue(
   941  				m.Alloc,
   942  				m.Store,
   943  				reflect.ValueOf(&r0).Elem(),
   944  			))
   945  		},
   946  	},
   947  	{
   948  		"testing",
   949  		"unixNano",
   950  		[]gno.FieldTypeExpr{},
   951  		[]gno.FieldTypeExpr{
   952  			{Name: gno.N("r0"), Type: gno.X("int64")},
   953  		},
   954  		func(m *gno.Machine) {
   955  			r0 := libs_testing.X_unixNano()
   956  
   957  			m.PushValue(gno.Go2GnoValue(
   958  				m.Alloc,
   959  				m.Store,
   960  				reflect.ValueOf(&r0).Elem(),
   961  			))
   962  		},
   963  	},
   964  	{
   965  		"time",
   966  		"now",
   967  		[]gno.FieldTypeExpr{},
   968  		[]gno.FieldTypeExpr{
   969  			{Name: gno.N("r0"), Type: gno.X("int64")},
   970  			{Name: gno.N("r1"), Type: gno.X("int32")},
   971  			{Name: gno.N("r2"), Type: gno.X("int64")},
   972  		},
   973  		func(m *gno.Machine) {
   974  			r0, r1, r2 := libs_time.X_now(
   975  				m,
   976  			)
   977  
   978  			m.PushValue(gno.Go2GnoValue(
   979  				m.Alloc,
   980  				m.Store,
   981  				reflect.ValueOf(&r0).Elem(),
   982  			))
   983  			m.PushValue(gno.Go2GnoValue(
   984  				m.Alloc,
   985  				m.Store,
   986  				reflect.ValueOf(&r1).Elem(),
   987  			))
   988  			m.PushValue(gno.Go2GnoValue(
   989  				m.Alloc,
   990  				m.Store,
   991  				reflect.ValueOf(&r2).Elem(),
   992  			))
   993  		},
   994  	},
   995  }