Zhuang's Diary

言之有物,持之以恒

ERC stands for “Ethereum Request for Comment” This is Ethereum’s version of a Request for Comments (RFC), a concept devised by the Internet Engineering Task Force. Memos within an RFC contain technical and organizational notes. For ERCs, this includes some technical guidelines for the buildout of the Ethereum network.

This was written by Ethereum developers for the Ethereum community. Thus, the workflow of generating an ERC includes a developer. To create standards for the Ethereum platform, a developer submits an Ethereum Improvement Proposal (EIP). This includes protocol specifications and contract standards. Once that EIP is approved by a committee and finalized, it becomes an ERC. The complete list of EIPs can be found here.

The finalized EIPs give the Ethereum developers a set of implementable standards. This allows Smart Contracts to be built with these standards, which a common interface can access. ERC20 is the most well-known of all the standards within the entire crypto community, and most tokens issued on top of the Ethereum platform use it.

Sources link ==> https://github.com/OpenZeppelin/openzeppelin-contracts

ERC20

任何 ERC20 代币都能立即兼容以太坊钱包(几乎所有支持以太币的钱包,包括Jaxx、MEW、imToken等,也支持 erc20的代币

The ERC20 standard includes the following functions:

1
2
3
4
5
6
7
totalSupply() //returns total token supply
balanceOf(address _owner) //returns account balance of _owner’s account
transfer(address _to, uint256 _value) //takes in number _value and transfers that amount of tokens to address _to and triggers transferevent
transferFrom(address _from, address _to, uint256 _value) //transfers _value amount of tokens from the address _from to the address _to, and triggers the transfer event.拥有者从 _from地址给 _to地址转账授权范围内的一定额度的一类同质化通证。
approve(address _spender, uint256 _value) //allows _spender to withdraw any number up to _value amount
allowance(address _owner, address _spender) //returns the amount which the_spender is still allowed to withdraw from the _owner
// 授权给_spender账户一定额度。拥有者 _owner给消费者_spender在当前查询账户授权(approve)的额度。

The following events are triggered based on the functions above:

1
2
transfer(address indexed _from, address indexed _to, uint256 _value) //this is triggered whenever tokens are transferred
approval(address indexed _owner, address indexed _spender, uint256 _value) //is triggered on any call to approve()

ERC20 was proposed in 2015 and officially formalized in September 2017. It is a great starting point for token standardization. However, some in the developer community have noted that it has certain flaws and vulnerabilities. Additionally, there are some use cases that require something different.

另外,https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC20

Extensions\扩张功能

Utilities\工具方法

ERC223

Status: Open

Date Proposed: 3/5/2017

一句话:ERC223令牌标准可以防止令牌在以太坊网络上丢失。

A post by developer Dexaran describes these two scenarios in detail:

There are two ways of performing a transaction in ERC20 tokens:

  1. transfer function.
  2. approve + transferFrom mechanism.

Token balance is just a variable in the token contract.

The transaction of a token is a change in the internal variables of the contract. The balance of the sender will be decreased and the balance of the recipient will be increased.

The transfer function will not notify the recipient when the transaction occurs. The recipient will not be able to recognize the incoming transaction! I wrote this illustration of the process that is leading to unhandled transactions and money losses.
As a result, if the recipient is a contract, users must transfer their tokens using the approve +transferFrom mechanism. If the recipient is an externally owned account address, users must transfer their tokens via the transfer function. If a user makes a mistake and chooses the wrong function, the token will get stuck inside contract (contract will not recognize a transaction). There will be no way to extract stuck tokens.

His proposed solution to this issue is contained within ERC223. It is very similar to the ERC20 standard, but it solves the problems described above. When tokens are transferred to a smart contract, a special function of that contract is tokenFallback. This allows the receiving contract to decline the tokens or trigger further actions. This can be used in place of the approvefunction in most cases.

由openzeppelin-contracts SafeERC20 完成。

ERC621

Status: Open

Date Proposed: 5/1/2017

一句话:发行 Token 总量可变。ERC621 = ERC20 + increaseSupply() + decreaseSupply()

ERC621 is an extension of the ERC20 token standard. It adds two additional functions, increaseSupply and decreaseSupply. This can increase and decrease the token supply in circulation. ERC20 only allows a single token issuance event. This restricts the supply to a certain amount which can’t be changed. ERC621 proposes that totalSupply can be modified.

ERC721

Status: Open

Date Proposed: 9/22/2017

一句话:每个代币都是 unique,例如以太猫。

ERC721 is very different than ERC20 and ERC223. It describes a non-fungible token. This means that each token is totally different and each one can have a different value to different users. One way to think about this is to recall CryptoKittes. Each one is its own separate commodity whose value is based on its own rarity and desirability by users.

ERC721 tokens can be used in any exchange, but the token value is “a result of the uniqueness and rareness associated with each token.” The standard functions are name, symbol, totalSupply, balanceOf, ownerOf , approve , takeOwnership , transfer , tokenOfOwnerByIndex, and tokenMetadata. It also defines two events: Transfer and Approval. This article by Gerald Nash does a good job explaining the concept of fungibility as it relates to tokens and goes into good technical detail.

ERC1155

Status: Final

Date Proposed: 2018-06-17

一句话:ERC-1155的创造者是Enjin coin的CTO Witek Radomski。ERC1155标准定义了一种解决上述问题的新方法。现在“物品”(可能包含ERC20的token或ERC721的token或两者都有)可以被单一的一个合约(打包处理)来定义了。合约里包含区别token们所需的最小量的数据。

ERC1155协议主要包括ERC1155Mintable.sol同质化可增发智能合约和ERC1155NonFungibleMintable.sol非同质化可增发智能合约,本章只讲解同质化可增发智能合约的功能。

UNIX/Linux用户在系统或者应用中触发动作,想要看到针对动作的实时log,这个时候tail命令正是可以一展身手的时候了。

例:

1
tail -f sci.log.D20120224.T000000 | grep -v getCommonCodeList | grep -v getRuleDetails | grep -v getExceptionList | grep zhuangwm | grep "Invoking api Method:"

tail —用于输出文件的最后10行信息的内容。-f 是指当文件长度增长的时候,输出文件增长的部分。
sci.log.D20120224.T000000 —被搜索的文件名称。
| —是指管道,用于将前面的输出作为输入到后面的命令中
grep -v getCommonCodeList —是查找文件里符合条件的字符串。 -v 是指反转查找,用于排除所列出来的文字对象

==============================================================

Gosh darnit, I miss you guys!

Congrats to everyone with all of the great things that are going on in each of your lives! I hope things just continue to progress more and more! Happy Birthday to you, Keith!

I’m glad that I’ve had a chance to see Erika and Belen, but since I’ve started a new position where I’m traveling ALL of the time, I’m hoping to be in a city near each of you soon!

Much love to G5!

Regards,

Regina D. Holley Information Security Advisor and Global ISA Program Lead

ITD - Security Operations Management

972.561.6790 [TL: 861.6790]

holleyr@us.ibm.com

“Do not follow the path. Go where there is no path to begin the trail.”

-Ashanti proverb

===============================================================

From: Erika V Quezada/Mexico/IBM@IBMMX

To: Keith M Bantle/Fairfax/IBM@IBMUS

Cc: Srinivas Manem/India/IBM@IBMIN, Belen Martin Lopez/Spain/IBM@IBMES@IBMGB, Wei Ming Zhuang/China/IBM@IBMCN@IBMAU@IBMGB, Anouk Bikkel/Netherlands/IBM@IBMNL, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Roy Hebert/CanWest/IBM@IBMCA

Date: 10/27/2011 01:34 AM

Subject: Re: One year later….

FELIZ CUMPLEAÑOS KEITH!!!

My best wishes to you! Pls put a picture of Wilson next to your shots. And drink one wooden boat shot for us =) Have a great birthday!!

I will be in NYC from friday to wednesday morning for vacation, aren’t you planning to be there for Halloween?

Srini, are you part of the Acapulco mexican team? If yes you should visit us, Is the biggest project in Mexico!!

Today, I was chatting with Tina by Facebook and she ask me to say hello to everybody, she is now an expert surffer and still miss all of us.

Kisses!

Saludos,

Erika V. Quezada Ruiz

Sales Manager

Public Sector

IBM de México

Tel. (55) 52703701

Cel. 04455 54551278

===============================================================

From: Keith M Bantle/Fairfax/IBM@IBMUS

To: Srinivas Manem/India/IBM@IBMIN

Cc: Belen Martin Lopez/Spain/IBM@IBMES@IBMGB, Wei Ming Zhuang/China/IBM@IBMCN@IBMAU@IBMGB, Anouk Bikkel/Netherlands/IBM@IBMNL, Erika V Quezada/Mexico/IBM@IBMMX, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Roy Hebert/CanWest/IBM@IBMCA

Date: 26/10/2011 11:57

Subject: Re: One year later….

Yes, all such wonderful memories for all of us! I still cannot even imagine a better team!

ps- and for the record, I will be using my little wooden boat ‘shooter’ for my birthday shots this evening!

Keith Bantle

IBM Global Business Services

AIS - Application Innovation Services

4401 Belle Oaks Drive, Ashley Center

Charleston, SC 29405

Mobile: 843.860.9174

Fax: 845.432.0121

kbantle@us.ibm.com

===============================================================

From: Srinivas Manem/India/IBM@IBMIN

To: Belen Martin Lopez/Spain/IBM@IBMES@IBMGB, Keith M Bantle/Fairfax/IBM@IBMUS, Wei Ming Zhuang/China/IBM@IBMCN@IBMAU@IBMGB, Anouk Bikkel/Netherlands/IBM@IBMNL, Erika V Quezada/Mexico/IBM@IBMMX, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Roy Hebert/CanWest/IBM@IBMCA

Date: 10/26/2011 12:44 PM

Subject: Re: One year later….

Hi Keith,

Wish you a very happy Birthday..!! Have a great time

It’s already been an year.. The memories are still very fresh in my mind. I really miss all those great days. Last year, this week we were rushing to complete projects & finalizing our presentations..

Playing golf, eating fufu, early morning monkey search, playing darts, wonderful excursions on the weekends & wonderful team work to complete the projects.. We had so much of fun in just one month time..

Truly, ours is the BEST TEAM ever.. Wish we’d meet again some day!!

Freddie: Congratulations on your new house.. :) Please share some pictures..

Thanks & Regards,

Srini

Srinivas Manem,

Release Management, Acapulco,

Global Telecom CoC

IBM Global Business Services

Mobile +91 99497 03030

Email Srinivas.Manem@in.ibm.com

===============================================================

From: Belen Martin Lopez/Spain/IBM@IBMES

To: Wei Ming Zhuang/China/IBM@IBMCN@IBMAU@IBMGB

Cc: Anouk Bikkel/Netherlands/IBM@IBMNL, Erika V Quezada/Mexico/IBM@IBMMX, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Keith M Bantle/Fairfax/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Roy Hebert/CanWest/IBM@IBMCA, Srinivas Manem/India/IBM@IBMIN

Date: 10/26/2011 02:07 PM

Subject: Re: One year later….

I almost forgot,

Happy Birthday Keith!!

Have a great day! Wilson and I miss you!

Saludos/Regards

Belén Martín López

Senior Managing Consultant

Phone: +34 660 413 703

email: belen.martin@es.ibm.com

IBM Global Services España, S.A.

Mar Adriático, 2, 28830 San Fernando de Henares (Madrid)

Registro Mercantil de Madrid, Folio 49; Tomo 6430; Hoja M-104.742

CIF A80-599459

===============================================================

Wei Ming Zhuang/China/IBM@IBMCN

26/10/2011 10:36

To

Keith M Bantle/Fairfax/IBM@IBMUS@IBMAU, Regina D Holley/Dallas/IBM@IBMUS

cc

Roy Hebert/CanWest/IBM@IBMCA, Erika V Quezada/Mexico/IBM@IBMMX@IBMUS, Anouk Bikkel/Netherlands/IBM@IBMNL, Belen Martin Lopez/Spain/IBM@IBMES, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Srinivas Manem/India/IBM@IBMIN

Subject

Re: One year later….

Hi,

I often talk about our G5 experience with friends and others, I do not know why, a lot of things become more clear with the flow at time.

Last week Regina was the most close to me (about 4 hours fly from Dalian to Hong Kong, Taipei). But I am still so happy to know this, just like one guy in island after air crash shouts at the near boat.

Miss all of you. Must be let me if anyone come to Beijing or Dalian. Must!

Have a good working day !

==============================================

庄伟铭/Wei Ming, E-mail: zhuangwm@cn.ibm.com

TEL:0411-88151143 Tie-Line:61143

IBM Dalian Global Delivery Center, GBS/GCG

==============================================

From: Keith M Bantle/Fairfax/IBM@IBMUS

To: Roy Hebert/CanWest/IBM@IBMCA

Cc: Erika V Quezada/Mexico/IBM@IBMMX@IBMUS, Anouk Bikkel/Netherlands/IBM@IBMNL, Belen Martin Lopez/Spain/IBM@IBMES, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Srinivas Manem/India/IBM@IBMIN, Wei Ming Zhuang/China/IBM@IBMCN

Date: 2011-10-26 02:23

Subject: Re: One year later….

Hello, ¡Hola , Hallo, Ello, Ahoj, 您好,??????, and Top O’ the Mornin’ to Ya (that one is for you, Roy, and I hope the others are correct),

I think we need a G5 summit! It really is very hard to believe it’s been a year already! I have been thinking of all of you, especially as the month of October has been passing by, remembering what we were doing ‘that week’.

It certainly does appear that the girls have been much better about staying in touch and Belen has even come to visit already! Hopefully she and Carlos enjoyed their stay in Charleston (Savannah and Asheville too), which was still too short. I must admit that I was tempted to surprise her one day by pounding ‘fufu’ and putting a ball of pizza dough in some tomato soup, although she may have actually preferred that over the real thing.

Roy, I was disappointed to see the Sabres schedule does not include Calgary this season, but hopefully next year and I promise I will be there. No excuses! Bring on the wings and Canadian beer!!

Freddie, congrats on your new house!! I forgot to tell you about our 3 day Dave Matthews concert in NYC last month- it was awesome!

Erika, thanks for rounding all of us up and glad to hear you are enjoying life! I miss all of the different candy!

Anouk, hopefully you are doing well and keep us posted on your baby’s arrival! We’ll have to figure out his or her Ghanaian name and we can always have some of that awful clove porridge I made the mistake of eating early one morning exported to you…

GoG and AB- it was great speaking with both of you earlier today!!

Srini, I hope you’ve continued playing golf… you must be preparing for the PGA already!

Martin, I’m sure you are as glad as I am that the NHL season is underway- hope you have been playing as often as you can!

Herbie, I wonder if you and Anouk have played darts and been able to replicate your double dart achievements?!

Will, every time I see ‘Firefly Sweet Tea Vodka’, I remember you drinking that whole bottle at once!

Hope everyone is doing well and look forward to catching up soon!

Keith

ps- if anyone needs about a lb. or so of shea butter, I still have 98.2% of the container remaining… Belen can attest to that!

Keith Bantle

IBM Global Business Services

AIS - Application Innovation Services

4401 Belle Oaks Drive, Ashley Center

Charleston, SC 29405

Mobile: 843.860.9174

Fax: 845.432.0121

kbantle@us.ibm.com

===============================================================

From: Roy Hebert/CanWest/IBM@IBMCA

To: Erika V Quezada/Mexico/IBM@IBMMX@IBMUS

Cc: Anouk Bikkel/Netherlands/IBM@IBMNL, Belen Martin Lopez/Spain/IBM@IBMES, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS, Keith M Bantle/Fairfax/IBM@IBMUS, Martin Jesko/Slovakia/IBM@IBMSK, Regina D Holley/Dallas/IBM@IBMUS, Srinivas Manem/India/IBM@IBMIN, Wei Ming Zhuang/China/IBM@IBMCN

Date: 10/25/2011 11:23 AM

Subject: Re: One year later….

I know … have been thinking about our 1 year anniversary all month!

By the way, the girls seem to be ruling in the reunion category … Freddie travelled to Mexico to visit Ms. Erica, and Regina and Erica have connected …. Regina I think you and Friddie met up in London? I think Belen has met with at least one of you as well?

Le girls rule, as usual.

Keith … was looking forward to hosting you for a Sabres game vs the Flames this year … but your beloved team doesn’t come to Calgary this season.

With fondest memories of my best team ever!!

Roy Hebert

Alberta Territory Manager, IBM

Office 403 539 3145

rhebert@ca.ibm.com

===============================================================

From: Erika V Quezada/Mexico/IBM@IBMMX

To: Anouk Bikkel/Netherlands/IBM@IBMNL, Belen Martin Lopez/Spain/IBM@IBMES, Martin Jesko/Slovakia/IBM@IBMSK, Keith M Bantle/Fairfax/IBM@IBMUS, Srinivas Manem/India/IBM@IBMIN, Wei Ming Zhuang/China/IBM@IBMCN, Regina D Holley/Dallas/IBM@IBMUS, Roy Hebert/CanWest/IBM@IBMCA, Frederique Tenthoff/UK/IBM@IBMGB, Herbie Pearthree/Raleigh/IBM@IBMUS

Date: 10/25/2011 08:43 AM

Subject: One year later….

Hellooo Superb Team!!!

How are u one year later?? Hope everything is good with all of you…. To me, it has been a year of many changes either in my personal and professional life. But I am very happy enjoying my life, Still remember each particular moment we shared in Ghana and the things I learned of all of u that marked my life.

I already met with Regina and Freddie … and I really hope to meet with all of u anytime.

Big kiss and huge hug!

Miss u all!!

Remember: we are The Best Team Ever!!!

Erika Q

Erika V. Quezada Ruiz

Sales Manager

Public Sector

IBM de México

Tel. (55) 52703701

Cel. 04455 54551278

=============================================================

Sitting at my desk back in my office during my lunch break, I started to reminisce about my month long stay in Ghana with my 10 IBM colleagues – now my close friends. One week ago we were in Accra, the capital, preparing for our press conference, dressed in our business best (and the ladies looked amazing). Our goal for the press conference was to state what we had achieved for Ghana and our clients during our short stay. Five of us summarized the projects we worked on and the tangible deliverables in addition to the intangible short, medium, and long-term goals we left for our Ghanaian colleagues to achieve. It was the three client’s statements that really made us all realize the positive impact we had made – how much we had done for them in 16 working days, how we’ve shown them that when focused on a common set of goals, great things can be accomplished in a very short time. We all hope the excitement and drive we were able to share continues and the pace of success remains steady.

29 days earlier eleven of us from all over the world landed in Accra – all IBMers but strangers nonetheless. We came from very diverse cultural and business backgrounds yet we all shared similar interests: the love of travel, the openness to new cultures, the joy of laughter and friendships, and the love of family and friends back home. Though our business skills were also diverse, we have core similarities there as well: we are all driven to achieve, we all have excellent problem solving skills, we all have great soft skills, and we all have excellent time management skills. We work hard, and we play hard – I guess that’s the IBM way.

As the working days passed, the eleven of us became as close as family. We leaned on each other for support and wisdom; we celebrated each others’ successes and embraced each others’ challenges. We shared outstanding experiences touring Ghana and learning about its people and the growing economy. We realized how special this program was to us and our clients. Many of us shared stories where our clients first realized we were strangers when we started this assignment; they thought we had been working together for years. I don’t know how our team mates were selected, but I commend whomever it was that put the 11 of us together – it was perfect.

As my last post to this blog, I just want to let anybody that is considering joining the IBM Corporate Service Corps know that they absolutely should do it. You will grow in many ways, both personally and professionally. On the professional side, how often do you get the chance to work on a two or three person team where your project deliverables will help shape a growing economy? How often do you get the business opportunity to lead such positively impacting projects? How often do your clients become great friends where they start telling you they’ll miss you 5 days before the project is over? It’s a life-changing experience, do it, and thank IBM while you’re at it.

How times flying. I went back to China, but I can not forget what happened on my last working day in Ghana.

On the last day, the last three team did their final presentations, including Chamber, GTB and NBSSI Team. The final presentation was very successful, we did a great job and we got a great satisfaction from client, and detailed action plan was created. It means we delivered these results to client, they are not only deliverables, but also they will become a big impact in future. I feel an honest and happy pride!

In the evening, Mr.Hammond and staffs of GTB met Anouk and I in Valley Beach Hotel, they sent us great presents.

We chatted for long time, the most unforgettable sentence from clients is “Unbelievable, I thought you (Anouk and I) are working together one year at least!”

Absolutely, our understanding really more than one year already in CSC program Ghana Team V.

Will
Nov.04 2010